-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptions.js
95 lines (82 loc) · 2.77 KB
/
options.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
module.exports = {
stats: null,
title: 'Stats Report',
output: 'stats-report.html',
outputStatsJson: false,
// require exporting module source
gzipSize: false,
moduleTypes: {
external: {
patterns: ['external**?(/**)'],
color: 'silver',
priority: 1,
description: 'The webpack externals option provides a way of excluding dependencies from the output bundles. This feature is typically most useful to library developers, however there are a variety of applications for it.'
},
ignored: {
patterns: ['**\\(ignored\\)'],
color: 'olive',
priority: 2,
description: 'Ignored modules, such as Node.js built-in modules. For webpack4 like: fs (ignored)'
},
nested: {
patterns: ['?(**/)node_modules/**/node_modules/**'],
color: 'magenta',
priority: 3,
description: 'Duplicated modules from nested node_modules when the versions are incompatible with the one at top. It should be a issue when multiple versions are bundled.'
},
buildin: {
patterns: [
'\\(webpack\\)/buildin/**',
'?(**/)node_modules/webpack/buildin/**',
// webpack 5 runtime
'webpack/runtime/**'
],
color: 'gray',
priority: 4,
description: 'Webpack built-in modules.'
},
polyfill: {
patterns: [
'?(**/)node_modules/core-js/**',
'?(**/)node_modules/regenerator-runtime/**',
'?(**/)node_modules/whatwg-fetch/**',
'?(**/)node_modules/**/*polyfill*/**'
],
color: 'maroon',
priority: 5,
description: 'core-js to polyfill ECMAScript features, regenerator-runtime for regenerator-compiled generator and async functions and others.'
},
loader: {
patterns: ['?(**/)node_modules/*-loader/**'],
color: 'darkgreen',
priority: 6,
description: 'Webpack built-in loaders.'
},
module: {
patterns: ['?(**/)node_modules/**'],
color: 'red',
priority: 7,
description: 'Normal modules.'
},
source: {
patterns: ['**/src/**'],
color: '',
priority: 8,
description: 'Source codes.'
},
other: {
color: 'orange',
priority: 100,
description: 'Other unmatched.'
}
},
overSizeColors: {
red: 500 * 1024,
orange: 200 * 1024
},
toJsonOptions: {
source: true,
reasons: false,
chunkModules: false
}
};