webpack 4.19.0 → 4.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/lib/AmdMainTemplatePlugin.js +5 -3
- package/lib/BannerPlugin.js +13 -5
- package/lib/Chunk.js +3 -0
- package/lib/Compilation.js +23 -18
- package/lib/Compiler.js +6 -12
- package/lib/DllPlugin.js +5 -0
- package/lib/DllReferencePlugin.js +70 -46
- package/lib/DynamicEntryPlugin.js +4 -3
- package/lib/EntryOptionPlugin.js +2 -1
- package/lib/ExternalModule.js +16 -4
- package/lib/HashedModuleIdsPlugin.js +9 -1
- package/lib/HotUpdateChunk.js +1 -0
- package/lib/IgnorePlugin.js +10 -14
- package/lib/LibraryTemplatePlugin.js +33 -10
- package/lib/LoaderOptionsPlugin.js +5 -0
- package/lib/Module.js +4 -0
- package/lib/SourceMapDevToolPlugin.js +16 -3
- package/lib/Template.js +1 -0
- package/lib/UmdMainTemplatePlugin.js +2 -1
- package/lib/WatchIgnorePlugin.js +5 -0
- package/lib/WebpackOptionsApply.js +18 -2
- package/lib/WebpackOptionsDefaulter.js +5 -1
- package/lib/debug/ProfilingPlugin.js +6 -0
- package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +16 -1
- package/lib/dependencies/HarmonyExportExpressionDependency.js +7 -2
- package/lib/dependencies/ImportParserPlugin.js +1 -1
- package/lib/dependencies/WebAssemblyImportDependency.js +9 -1
- package/lib/node/NodeMainTemplatePlugin.js +2 -2
- package/lib/optimize/AggressiveSplittingPlugin.js +9 -2
- package/lib/optimize/ConcatenatedModule.js +10 -2
- package/lib/optimize/LimitChunkCountPlugin.js +9 -2
- package/lib/optimize/MinChunkSizePlugin.js +5 -0
- package/lib/optimize/OccurrenceChunkOrderPlugin.js +5 -0
- package/lib/optimize/OccurrenceModuleOrderPlugin.js +5 -0
- package/lib/web/JsonpExportMainTemplatePlugin.js +3 -0
- package/lib/webpack.js +12 -1
- package/package.json +11 -8
- package/schemas/WebpackOptions.json +1293 -1113
- package/schemas/plugins/BannerPlugin.json +34 -27
- package/schemas/plugins/DllPlugin.json +18 -16
- package/schemas/plugins/DllReferencePlugin.json +180 -68
- package/schemas/plugins/HashedModuleIdsPlugin.json +9 -3
- package/schemas/plugins/IgnorePlugin.json +17 -11
- package/schemas/plugins/LoaderOptionsPlugin.json +27 -26
- package/schemas/plugins/SourceMapDevToolPlugin.json +87 -83
- package/schemas/plugins/WatchIgnorePlugin.json +18 -16
- package/schemas/plugins/debug/ProfilingPlugin.json +13 -12
- package/schemas/plugins/optimize/AggressiveSplittingPlugin.json +23 -22
- package/schemas/plugins/optimize/LimitChunkCountPlugin.json +16 -15
- package/schemas/plugins/optimize/MinChunkSizePlugin.json +4 -3
- package/schemas/plugins/optimize/OccurrenceOrderChunkIdsPlugin.json +2 -1
- package/schemas/plugins/optimize/OccurrenceOrderModuleIdsPlugin.json +2 -1
@@ -1,21 +1,21 @@
|
|
1
1
|
{
|
2
|
-
"type": "object",
|
3
|
-
"additionalProperties": false,
|
4
2
|
"definitions": {
|
5
3
|
"rule": {
|
6
4
|
"oneOf": [
|
7
5
|
{
|
8
|
-
"instanceof": "RegExp"
|
6
|
+
"instanceof": "RegExp",
|
7
|
+
"tsType": "RegExp"
|
9
8
|
},
|
10
9
|
{
|
11
|
-
"
|
12
|
-
"
|
10
|
+
"type": "string",
|
11
|
+
"minLength": 1
|
13
12
|
}
|
14
13
|
]
|
15
14
|
},
|
16
15
|
"rules": {
|
17
16
|
"oneOf": [
|
18
17
|
{
|
18
|
+
"type": "array",
|
19
19
|
"items": {
|
20
20
|
"description": "A rule condition",
|
21
21
|
"anyOf": [
|
@@ -23,8 +23,7 @@
|
|
23
23
|
"$ref": "#/definitions/rule"
|
24
24
|
}
|
25
25
|
]
|
26
|
-
}
|
27
|
-
"type": "array"
|
26
|
+
}
|
28
27
|
},
|
29
28
|
{
|
30
29
|
"$ref": "#/definitions/rule"
|
@@ -32,23 +31,27 @@
|
|
32
31
|
]
|
33
32
|
}
|
34
33
|
},
|
34
|
+
"title": "SourceMapDevToolPluginOptions",
|
35
|
+
"type": "object",
|
36
|
+
"additionalProperties": false,
|
35
37
|
"properties": {
|
36
|
-
"
|
37
|
-
"description": "
|
38
|
-
"
|
38
|
+
"append": {
|
39
|
+
"description": "Appends the given value to the original asset. Usually the #sourceMappingURL comment. [url] is replaced with a URL to the source map file. false disables the appending",
|
40
|
+
"oneOf": [
|
39
41
|
{
|
40
|
-
"
|
41
|
-
|
42
|
-
|
43
|
-
},
|
44
|
-
"include": {
|
45
|
-
"description": "Include source maps for module paths that match the given value",
|
46
|
-
"anyOf": [
|
42
|
+
"description": "Append no SourceMap comment to the bundle, but still generate SourceMaps",
|
43
|
+
"enum": [false, null]
|
44
|
+
},
|
47
45
|
{
|
48
|
-
"
|
46
|
+
"type": "string",
|
47
|
+
"minLength": 1
|
49
48
|
}
|
50
49
|
]
|
51
50
|
},
|
51
|
+
"columns": {
|
52
|
+
"description": "Indicates whether column mappings should be used (defaults to true)",
|
53
|
+
"type": "boolean"
|
54
|
+
},
|
52
55
|
"exclude": {
|
53
56
|
"description": "Exclude modules that match the given value from source map generation",
|
54
57
|
"anyOf": [
|
@@ -57,87 +60,46 @@
|
|
57
60
|
}
|
58
61
|
]
|
59
62
|
},
|
60
|
-
"
|
61
|
-
"description": "
|
63
|
+
"fallbackModuleFilenameTemplate": {
|
64
|
+
"description": "Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap used only if 'moduleFilenameTemplate' would result in a conflict",
|
62
65
|
"oneOf": [
|
63
66
|
{
|
64
|
-
"description": "
|
65
|
-
"
|
67
|
+
"description": "Custom function generating the identifer",
|
68
|
+
"instanceof": "Function",
|
69
|
+
"tsType": "Function"
|
66
70
|
},
|
67
71
|
{
|
68
72
|
"type": "string",
|
69
|
-
"minLength": 1
|
70
|
-
"absolutePath": false
|
73
|
+
"minLength": 1
|
71
74
|
}
|
72
75
|
]
|
73
76
|
},
|
74
|
-
"
|
75
|
-
"description": "
|
76
|
-
"
|
77
|
-
{
|
78
|
-
"description": "Append no SourceMap comment to the bundle, but still generate SourceMaps",
|
79
|
-
"enum": [false, null]
|
80
|
-
},
|
81
|
-
{
|
82
|
-
"minLength": 1,
|
83
|
-
"type": "string"
|
84
|
-
}
|
85
|
-
]
|
77
|
+
"fileContext": {
|
78
|
+
"description": "Path prefix to which the [file] placeholder is relative to",
|
79
|
+
"type": "string"
|
86
80
|
},
|
87
|
-
"
|
88
|
-
"description": "
|
81
|
+
"filename": {
|
82
|
+
"description": "Defines the output filename of the SourceMap (will be inlined if no value is provided)",
|
89
83
|
"oneOf": [
|
90
84
|
{
|
91
|
-
"description": "
|
92
|
-
"
|
85
|
+
"description": "Disable separate SourceMap file and inline SourceMap as DataUrl",
|
86
|
+
"enum": [false, null]
|
93
87
|
},
|
94
88
|
{
|
95
|
-
"
|
96
|
-
"
|
89
|
+
"type": "string",
|
90
|
+
"absolutePath": false,
|
91
|
+
"minLength": 1
|
97
92
|
}
|
98
93
|
]
|
99
94
|
},
|
100
|
-
"
|
101
|
-
"description": "
|
102
|
-
"
|
103
|
-
{
|
104
|
-
"description": "Custom function generating the identifer",
|
105
|
-
"instanceof": "Function"
|
106
|
-
},
|
95
|
+
"include": {
|
96
|
+
"description": "Include source maps for module paths that match the given value",
|
97
|
+
"anyOf": [
|
107
98
|
{
|
108
|
-
"
|
109
|
-
"type": "string"
|
99
|
+
"$ref": "#/definitions/rules"
|
110
100
|
}
|
111
101
|
]
|
112
102
|
},
|
113
|
-
"namespace": {
|
114
|
-
"description": "Namespace prefix to allow multiple webpack roots in the devtools",
|
115
|
-
"type": "string"
|
116
|
-
},
|
117
|
-
"module": {
|
118
|
-
"description": "Indicates whether SourceMaps from loaders should be used (defaults to true)",
|
119
|
-
"type": "boolean"
|
120
|
-
},
|
121
|
-
"columns": {
|
122
|
-
"description": "Indicates whether column mappings should be used (defaults to true)",
|
123
|
-
"type": "boolean"
|
124
|
-
},
|
125
|
-
"noSources": {
|
126
|
-
"description": "Omit the 'sourceContents' array from the SourceMap",
|
127
|
-
"type": "boolean"
|
128
|
-
},
|
129
|
-
"sourceRoot": {
|
130
|
-
"description": "Provide a custom value for the 'sourceRoot' property in the SourceMap",
|
131
|
-
"type": "string"
|
132
|
-
},
|
133
|
-
"publicPath": {
|
134
|
-
"description": "Provide a custom public path for the SourceMapping comment",
|
135
|
-
"type": "string"
|
136
|
-
},
|
137
|
-
"fileContext": {
|
138
|
-
"description": "Path prefix to which the [file] placeholder is relative to",
|
139
|
-
"type": "string"
|
140
|
-
},
|
141
103
|
"lineToLine": {
|
142
104
|
"description": "(deprecated) try to map original files line to line to generated files",
|
143
105
|
"anyOf": [
|
@@ -149,8 +111,8 @@
|
|
149
111
|
"type": "object",
|
150
112
|
"additionalProperties": false,
|
151
113
|
"properties": {
|
152
|
-
"
|
153
|
-
"description": "
|
114
|
+
"exclude": {
|
115
|
+
"description": "Exclude modules that match the given value from source map generation",
|
154
116
|
"anyOf": [
|
155
117
|
{
|
156
118
|
"$ref": "#/definitions/rules"
|
@@ -165,8 +127,8 @@
|
|
165
127
|
}
|
166
128
|
]
|
167
129
|
},
|
168
|
-
"
|
169
|
-
"description": "
|
130
|
+
"test": {
|
131
|
+
"description": "Include source maps for modules based on their extension (defaults to .js and .css)",
|
170
132
|
"anyOf": [
|
171
133
|
{
|
172
134
|
"$ref": "#/definitions/rules"
|
@@ -176,6 +138,48 @@
|
|
176
138
|
}
|
177
139
|
}
|
178
140
|
]
|
141
|
+
},
|
142
|
+
"module": {
|
143
|
+
"description": "Indicates whether SourceMaps from loaders should be used (defaults to true)",
|
144
|
+
"type": "boolean"
|
145
|
+
},
|
146
|
+
"moduleFilenameTemplate": {
|
147
|
+
"description": "Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap",
|
148
|
+
"oneOf": [
|
149
|
+
{
|
150
|
+
"description": "Custom function generating the identifer",
|
151
|
+
"instanceof": "Function",
|
152
|
+
"tsType": "Function"
|
153
|
+
},
|
154
|
+
{
|
155
|
+
"type": "string",
|
156
|
+
"minLength": 1
|
157
|
+
}
|
158
|
+
]
|
159
|
+
},
|
160
|
+
"namespace": {
|
161
|
+
"description": "Namespace prefix to allow multiple webpack roots in the devtools",
|
162
|
+
"type": "string"
|
163
|
+
},
|
164
|
+
"noSources": {
|
165
|
+
"description": "Omit the 'sourceContents' array from the SourceMap",
|
166
|
+
"type": "boolean"
|
167
|
+
},
|
168
|
+
"publicPath": {
|
169
|
+
"description": "Provide a custom public path for the SourceMapping comment",
|
170
|
+
"type": "string"
|
171
|
+
},
|
172
|
+
"sourceRoot": {
|
173
|
+
"description": "Provide a custom value for the 'sourceRoot' property in the SourceMap",
|
174
|
+
"type": "string"
|
175
|
+
},
|
176
|
+
"test": {
|
177
|
+
"description": "Include source maps for modules based on their extension (defaults to .js and .css)",
|
178
|
+
"anyOf": [
|
179
|
+
{
|
180
|
+
"$ref": "#/definitions/rules"
|
181
|
+
}
|
182
|
+
]
|
179
183
|
}
|
180
184
|
}
|
181
185
|
}
|
@@ -1,16 +1,18 @@
|
|
1
|
-
{
|
2
|
-
"
|
3
|
-
"
|
4
|
-
"
|
5
|
-
|
6
|
-
"
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
}
|
1
|
+
{
|
2
|
+
"title": "WatchIgnorePluginOptions",
|
3
|
+
"description": "A list of RegExps or absolute paths to directories or files that should be ignored",
|
4
|
+
"type": "array",
|
5
|
+
"items": {
|
6
|
+
"description": "RegExp or absolute path to directories or files that should be ignored",
|
7
|
+
"oneOf": [
|
8
|
+
{
|
9
|
+
"type": "string"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"instanceof": "RegExp",
|
13
|
+
"tsType": "RegExp"
|
14
|
+
}
|
15
|
+
]
|
16
|
+
},
|
17
|
+
"minItems": 1
|
18
|
+
}
|
@@ -1,12 +1,13 @@
|
|
1
|
-
{
|
2
|
-
"
|
3
|
-
"
|
4
|
-
"
|
5
|
-
|
6
|
-
|
7
|
-
"
|
8
|
-
"
|
9
|
-
"
|
10
|
-
|
11
|
-
|
12
|
-
}
|
1
|
+
{
|
2
|
+
"title": "ProfilingPluginOptions",
|
3
|
+
"type": "object",
|
4
|
+
"additionalProperties": false,
|
5
|
+
"properties": {
|
6
|
+
"outputPath": {
|
7
|
+
"description": "Path to the output file e.g. `profiling/events.json`. Defaults to `events.json`.",
|
8
|
+
"type": "string",
|
9
|
+
"absolutePath": false,
|
10
|
+
"minLength": 4
|
11
|
+
}
|
12
|
+
}
|
13
|
+
}
|
@@ -1,22 +1,23 @@
|
|
1
|
-
{
|
2
|
-
"
|
3
|
-
"
|
4
|
-
"
|
5
|
-
|
6
|
-
|
7
|
-
"
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
"
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
"
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
"
|
20
|
-
|
21
|
-
|
22
|
-
}
|
1
|
+
{
|
2
|
+
"title": "AggressiveSplittingPluginOptions",
|
3
|
+
"type": "object",
|
4
|
+
"additionalProperties": false,
|
5
|
+
"properties": {
|
6
|
+
"chunkOverhead": {
|
7
|
+
"description": "Default: 0",
|
8
|
+
"type": "number"
|
9
|
+
},
|
10
|
+
"entryChunkMultiplicator": {
|
11
|
+
"description": "Default: 1",
|
12
|
+
"type": "number"
|
13
|
+
},
|
14
|
+
"maxSize": {
|
15
|
+
"description": "Byte, maxsize of per file. Default: 51200",
|
16
|
+
"type": "number"
|
17
|
+
},
|
18
|
+
"minSize": {
|
19
|
+
"description": "Byte, split point. Default: 30720",
|
20
|
+
"type": "number"
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
@@ -1,15 +1,16 @@
|
|
1
|
-
{
|
2
|
-
"
|
3
|
-
"
|
4
|
-
"
|
5
|
-
|
6
|
-
|
7
|
-
"
|
8
|
-
"
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
"
|
13
|
-
|
14
|
-
|
15
|
-
}
|
1
|
+
{
|
2
|
+
"title": "LimitChunkCountPluginOptions",
|
3
|
+
"type": "object",
|
4
|
+
"additionalProperties": false,
|
5
|
+
"properties": {
|
6
|
+
"maxChunks": {
|
7
|
+
"description": "Limit the maximum number of chunks using a value greater greater than or equal to 1",
|
8
|
+
"type": "number",
|
9
|
+
"minimum": 1
|
10
|
+
},
|
11
|
+
"minChunkSize": {
|
12
|
+
"description": "Set a minimum chunk size",
|
13
|
+
"type": "number"
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
@@ -1,11 +1,12 @@
|
|
1
1
|
{
|
2
|
-
"
|
2
|
+
"title": "MinChunkSizePluginOptions",
|
3
3
|
"type": "object",
|
4
|
-
"
|
4
|
+
"additionalProperties": false,
|
5
5
|
"properties": {
|
6
6
|
"minChunkSize": {
|
7
7
|
"description": "Minimum number of characters",
|
8
8
|
"type": "number"
|
9
9
|
}
|
10
|
-
}
|
10
|
+
},
|
11
|
+
"required": ["minChunkSize"]
|
11
12
|
}
|