forked from datalens-tech/datalens-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
statoscope.config.js
39 lines (39 loc) · 1.76 KB
/
statoscope.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
module.exports = {
validate: {
// add webpack plugin with rules
plugins: ['@statoscope/webpack'],
reporters: [
// console-reporter to output results into console (enabled by default)
'@statoscope/console',
// reporter that generates UI-report with validation-results
['@statoscope/stats-report', {saveReportTo: 'report/statoscope/index.html'}],
],
// rules to validate your stats (use all of them or only specific rules)
rules: {
// ensures that bundle hasn't package duplicates
'@statoscope/webpack/no-packages-dups': [
'warn',
{
exclude: [],
},
],
// ensure that the download size of entrypoints is not over the limit (10 mb)
'@statoscope/webpack/entry-download-size-limits': [
'error',
{global: {maxSize: 20 * 1024 * 1024}},
],
// diff download size of entrypoints between input and reference stats. Fails if size diff is over the limit (10 kb)
'@statoscope/webpack/diff-entry-download-size-limits': [
'error',
{global: {maxInitialSizeDiff: 10 * 1024}},
],
// diff download time of entrypoints between input and reference stats. Fails if download time is over the limit (500 ms)
'@statoscope/webpack/diff-entry-download-time-limits': [
'error',
{global: {maxInitialDownloadTimeDiff: 500}},
],
// compares usage of specified packages usage between input and reference stats.
'@statoscope/webpack/diff-deprecated-packages': ['error', ['moment']],
},
},
};