webpack 4.16.0 → 4.16.4

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.
Files changed (71) hide show
  1. package/README.md +5 -2
  2. package/SECURITY.md +9 -9
  3. package/buildin/global.js +20 -20
  4. package/buildin/module.js +22 -22
  5. package/hot/log-apply-result.js +44 -44
  6. package/hot/log.js +2 -0
  7. package/lib/BasicEvaluatedExpression.js +211 -211
  8. package/lib/Chunk.js +32 -10
  9. package/lib/ChunkGroup.js +3 -3
  10. package/lib/Compilation.js +47 -11
  11. package/lib/ContextExclusionPlugin.js +11 -0
  12. package/lib/ContextModule.js +116 -30
  13. package/lib/ContextModuleFactory.js +6 -0
  14. package/lib/DefinePlugin.js +49 -0
  15. package/lib/DelegatedModule.js +5 -0
  16. package/lib/DependenciesBlock.js +1 -1
  17. package/lib/DllModule.js +6 -0
  18. package/lib/DllReferencePlugin.js +51 -3
  19. package/lib/ExternalModule.js +6 -0
  20. package/lib/Generator.js +11 -3
  21. package/lib/HotModuleReplacementPlugin.js +1 -5
  22. package/lib/MemoryOutputFileSystem.js +5 -5
  23. package/lib/Module.js +52 -12
  24. package/lib/MultiModule.js +6 -0
  25. package/lib/NodeStuffPlugin.js +18 -0
  26. package/lib/NormalModule.js +6 -0
  27. package/lib/NullFactory.js +12 -12
  28. package/lib/OptionsApply.js +10 -10
  29. package/lib/Parser.js +12 -3
  30. package/lib/RuntimeTemplate.js +12 -0
  31. package/lib/Stats.js +19 -2
  32. package/lib/Template.js +44 -43
  33. package/lib/WatchIgnorePlugin.js +18 -18
  34. package/lib/debug/ProfilingPlugin.js +1 -1
  35. package/lib/dependencies/AMDRequireItemDependency.js +22 -22
  36. package/lib/dependencies/CommonJsRequireDependency.js +22 -22
  37. package/lib/dependencies/CommonJsRequireDependencyParserPlugin.js +6 -0
  38. package/lib/dependencies/CriticalDependencyWarning.js +20 -20
  39. package/lib/dependencies/DelegatedSourceDependency.js +18 -18
  40. package/lib/dependencies/DllEntryDependency.js +20 -20
  41. package/lib/dependencies/LocalModule.js +23 -23
  42. package/lib/dependencies/ModuleHotAcceptDependency.js +23 -23
  43. package/lib/dependencies/ModuleHotDeclineDependency.js +23 -23
  44. package/lib/dependencies/PrefetchDependency.js +18 -18
  45. package/lib/dependencies/RequireEnsureItemDependency.js +21 -21
  46. package/lib/dependencies/RequireResolveDependency.js +22 -22
  47. package/lib/node/NodeOutputFileSystem.js +22 -22
  48. package/lib/node/NodeTargetPlugin.js +1 -0
  49. package/lib/optimize/ConcatenatedModule.js +5 -0
  50. package/lib/optimize/OccurrenceChunkOrderPlugin.js +1 -1
  51. package/lib/optimize/OccurrenceModuleOrderPlugin.js +1 -1
  52. package/lib/optimize/OccurrenceOrderPlugin.js +2 -2
  53. package/lib/util/SortableSet.js +1 -0
  54. package/lib/util/StackedSetMap.js +12 -3
  55. package/lib/wasm/WebAssemblyGenerator.js +22 -5
  56. package/lib/wasm/WebAssemblyJavascriptGenerator.js +16 -2
  57. package/lib/webpack.js +1 -0
  58. package/package.json +12 -20
  59. package/schemas/WebpackOptions.json +2 -6
  60. package/schemas/ajv.absolutePath.js +55 -55
  61. package/schemas/plugins/BannerPlugin.json +96 -96
  62. package/schemas/plugins/DllPlugin.json +32 -32
  63. package/schemas/plugins/DllReferencePlugin.json +99 -99
  64. package/schemas/plugins/HashedModuleIdsPlugin.json +24 -24
  65. package/schemas/plugins/LoaderOptionsPlugin.json +26 -26
  66. package/schemas/plugins/SourceMapDevToolPlugin.json +187 -187
  67. package/schemas/plugins/WatchIgnorePlugin.json +16 -16
  68. package/schemas/plugins/debug/ProfilingPlugin.json +12 -12
  69. package/schemas/plugins/optimize/AggressiveSplittingPlugin.json +22 -22
  70. package/schemas/plugins/optimize/LimitChunkCountPlugin.json +15 -15
  71. package/schemas/plugins/optimize/MinChunkSizePlugin.json +13 -13
@@ -1,187 +1,187 @@
1
- {
2
- "type": "object",
3
- "additionalProperties": false,
4
- "definitions": {
5
- "rule": {
6
- "oneOf": [
7
- {
8
- "instanceof": "RegExp"
9
- },
10
- {
11
- "minLength": 1,
12
- "type": "string"
13
- }
14
- ]
15
- },
16
- "rules": {
17
- "oneOf": [
18
- {
19
- "items": {
20
- "description": "A rule condition",
21
- "anyOf": [
22
- {
23
- "$ref": "#/definitions/rule"
24
- }
25
- ]
26
- },
27
- "type": "array"
28
- },
29
- {
30
- "$ref": "#/definitions/rule"
31
- }
32
- ]
33
- }
34
- },
35
- "properties": {
36
- "test": {
37
- "description": "Include source maps for modules based on their extension (defaults to .js and .css)",
38
- "anyOf": [
39
- {
40
- "$ref": "#/definitions/rules"
41
- }
42
- ]
43
- },
44
- "include": {
45
- "description": "Include source maps for module paths that match the given value",
46
- "anyOf": [
47
- {
48
- "$ref": "#/definitions/rules"
49
- }
50
- ]
51
- },
52
- "exclude": {
53
- "description": "Exclude modules that match the given value from source map generation",
54
- "anyOf": [
55
- {
56
- "$ref": "#/definitions/rules"
57
- }
58
- ]
59
- },
60
- "filename": {
61
- "description": "Defines the output filename of the SourceMap (will be inlined if no value is provided)",
62
- "oneOf": [
63
- {
64
- "description": "Disable separate SourceMap file and inline SourceMap as DataUrl",
65
- "enum": [
66
- false,
67
- null
68
- ]
69
- },
70
- {
71
- "type": "string",
72
- "minLength": 1,
73
- "absolutePath": false
74
- }
75
- ]
76
- },
77
- "append": {
78
- "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",
79
- "oneOf": [
80
- {
81
- "description": "Append no SourceMap comment to the bundle, but still generate SourceMaps",
82
- "enum": [
83
- false,
84
- null
85
- ]
86
- },
87
- {
88
- "minLength": 1,
89
- "type": "string"
90
- }
91
- ]
92
- },
93
- "moduleFilenameTemplate": {
94
- "description": "Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap",
95
- "oneOf": [
96
- {
97
- "description": "Custom function generating the identifer",
98
- "instanceof": "Function"
99
- },
100
- {
101
- "minLength": 1,
102
- "type": "string"
103
- }
104
- ]
105
- },
106
- "fallbackModuleFilenameTemplate": {
107
- "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",
108
- "oneOf": [
109
- {
110
- "description": "Custom function generating the identifer",
111
- "instanceof": "Function"
112
- },
113
- {
114
- "minLength": 1,
115
- "type": "string"
116
- }
117
- ]
118
- },
119
- "namespace": {
120
- "description": "Namespace prefix to allow multiple webpack roots in the devtools",
121
- "type": "string"
122
- },
123
- "module": {
124
- "description": "Indicates whether SourceMaps from loaders should be used (defaults to true)",
125
- "type": "boolean"
126
- },
127
- "columns": {
128
- "description": "Indicates whether column mappings should be used (defaults to true)",
129
- "type": "boolean"
130
- },
131
- "noSources": {
132
- "description": "Omit the 'sourceContents' array from the SourceMap",
133
- "type": "boolean"
134
- },
135
- "sourceRoot": {
136
- "description": "Provide a custom value for the 'sourceRoot' property in the SourceMap",
137
- "type": "string"
138
- },
139
- "publicPath": {
140
- "description": "Provide a custom public path for the SourceMapping comment",
141
- "type": "string"
142
- },
143
- "fileContext": {
144
- "description": "Path prefix to which the [file] placeholder is relative to",
145
- "type": "string"
146
- },
147
- "lineToLine": {
148
- "description": "(deprecated) try to map original files line to line to generated files",
149
- "anyOf": [
150
- {
151
- "type": "boolean"
152
- },
153
- {
154
- "description": "Simplify and speed up source mapping by using line to line source mappings for matched modules",
155
- "type": "object",
156
- "additionalProperties": false,
157
- "properties": {
158
- "test": {
159
- "description": "Include source maps for modules based on their extension (defaults to .js and .css)",
160
- "anyOf": [
161
- {
162
- "$ref": "#/definitions/rules"
163
- }
164
- ]
165
- },
166
- "include": {
167
- "description": "Include source maps for module paths that match the given value",
168
- "anyOf": [
169
- {
170
- "$ref": "#/definitions/rules"
171
- }
172
- ]
173
- },
174
- "exclude": {
175
- "description": "Exclude modules that match the given value from source map generation",
176
- "anyOf": [
177
- {
178
- "$ref": "#/definitions/rules"
179
- }
180
- ]
181
- }
182
- }
183
- }
184
- ]
185
- }
186
- }
187
- }
1
+ {
2
+ "type": "object",
3
+ "additionalProperties": false,
4
+ "definitions": {
5
+ "rule": {
6
+ "oneOf": [
7
+ {
8
+ "instanceof": "RegExp"
9
+ },
10
+ {
11
+ "minLength": 1,
12
+ "type": "string"
13
+ }
14
+ ]
15
+ },
16
+ "rules": {
17
+ "oneOf": [
18
+ {
19
+ "items": {
20
+ "description": "A rule condition",
21
+ "anyOf": [
22
+ {
23
+ "$ref": "#/definitions/rule"
24
+ }
25
+ ]
26
+ },
27
+ "type": "array"
28
+ },
29
+ {
30
+ "$ref": "#/definitions/rule"
31
+ }
32
+ ]
33
+ }
34
+ },
35
+ "properties": {
36
+ "test": {
37
+ "description": "Include source maps for modules based on their extension (defaults to .js and .css)",
38
+ "anyOf": [
39
+ {
40
+ "$ref": "#/definitions/rules"
41
+ }
42
+ ]
43
+ },
44
+ "include": {
45
+ "description": "Include source maps for module paths that match the given value",
46
+ "anyOf": [
47
+ {
48
+ "$ref": "#/definitions/rules"
49
+ }
50
+ ]
51
+ },
52
+ "exclude": {
53
+ "description": "Exclude modules that match the given value from source map generation",
54
+ "anyOf": [
55
+ {
56
+ "$ref": "#/definitions/rules"
57
+ }
58
+ ]
59
+ },
60
+ "filename": {
61
+ "description": "Defines the output filename of the SourceMap (will be inlined if no value is provided)",
62
+ "oneOf": [
63
+ {
64
+ "description": "Disable separate SourceMap file and inline SourceMap as DataUrl",
65
+ "enum": [
66
+ false,
67
+ null
68
+ ]
69
+ },
70
+ {
71
+ "type": "string",
72
+ "minLength": 1,
73
+ "absolutePath": false
74
+ }
75
+ ]
76
+ },
77
+ "append": {
78
+ "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",
79
+ "oneOf": [
80
+ {
81
+ "description": "Append no SourceMap comment to the bundle, but still generate SourceMaps",
82
+ "enum": [
83
+ false,
84
+ null
85
+ ]
86
+ },
87
+ {
88
+ "minLength": 1,
89
+ "type": "string"
90
+ }
91
+ ]
92
+ },
93
+ "moduleFilenameTemplate": {
94
+ "description": "Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap",
95
+ "oneOf": [
96
+ {
97
+ "description": "Custom function generating the identifer",
98
+ "instanceof": "Function"
99
+ },
100
+ {
101
+ "minLength": 1,
102
+ "type": "string"
103
+ }
104
+ ]
105
+ },
106
+ "fallbackModuleFilenameTemplate": {
107
+ "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",
108
+ "oneOf": [
109
+ {
110
+ "description": "Custom function generating the identifer",
111
+ "instanceof": "Function"
112
+ },
113
+ {
114
+ "minLength": 1,
115
+ "type": "string"
116
+ }
117
+ ]
118
+ },
119
+ "namespace": {
120
+ "description": "Namespace prefix to allow multiple webpack roots in the devtools",
121
+ "type": "string"
122
+ },
123
+ "module": {
124
+ "description": "Indicates whether SourceMaps from loaders should be used (defaults to true)",
125
+ "type": "boolean"
126
+ },
127
+ "columns": {
128
+ "description": "Indicates whether column mappings should be used (defaults to true)",
129
+ "type": "boolean"
130
+ },
131
+ "noSources": {
132
+ "description": "Omit the 'sourceContents' array from the SourceMap",
133
+ "type": "boolean"
134
+ },
135
+ "sourceRoot": {
136
+ "description": "Provide a custom value for the 'sourceRoot' property in the SourceMap",
137
+ "type": "string"
138
+ },
139
+ "publicPath": {
140
+ "description": "Provide a custom public path for the SourceMapping comment",
141
+ "type": "string"
142
+ },
143
+ "fileContext": {
144
+ "description": "Path prefix to which the [file] placeholder is relative to",
145
+ "type": "string"
146
+ },
147
+ "lineToLine": {
148
+ "description": "(deprecated) try to map original files line to line to generated files",
149
+ "anyOf": [
150
+ {
151
+ "type": "boolean"
152
+ },
153
+ {
154
+ "description": "Simplify and speed up source mapping by using line to line source mappings for matched modules",
155
+ "type": "object",
156
+ "additionalProperties": false,
157
+ "properties": {
158
+ "test": {
159
+ "description": "Include source maps for modules based on their extension (defaults to .js and .css)",
160
+ "anyOf": [
161
+ {
162
+ "$ref": "#/definitions/rules"
163
+ }
164
+ ]
165
+ },
166
+ "include": {
167
+ "description": "Include source maps for module paths that match the given value",
168
+ "anyOf": [
169
+ {
170
+ "$ref": "#/definitions/rules"
171
+ }
172
+ ]
173
+ },
174
+ "exclude": {
175
+ "description": "Exclude modules that match the given value from source map generation",
176
+ "anyOf": [
177
+ {
178
+ "$ref": "#/definitions/rules"
179
+ }
180
+ ]
181
+ }
182
+ }
183
+ }
184
+ ]
185
+ }
186
+ }
187
+ }
@@ -1,16 +1,16 @@
1
- {
2
- "description": "A list of RegExps or absolute paths to directories or files that should be ignored",
3
- "type": "array",
4
- "items": {
5
- "description": "RegExp or absolute path to directories or files that should be ignored",
6
- "oneOf": [
7
- {
8
- "type": "string"
9
- },
10
- {
11
- "instanceof": "RegExp"
12
- }
13
- ]
14
- },
15
- "minItems": 1
16
- }
1
+ {
2
+ "description": "A list of RegExps or absolute paths to directories or files that should be ignored",
3
+ "type": "array",
4
+ "items": {
5
+ "description": "RegExp or absolute path to directories or files that should be ignored",
6
+ "oneOf": [
7
+ {
8
+ "type": "string"
9
+ },
10
+ {
11
+ "instanceof": "RegExp"
12
+ }
13
+ ]
14
+ },
15
+ "minItems": 1
16
+ }
@@ -1,12 +1,12 @@
1
- {
2
- "type": "object",
3
- "additionalProperties": false,
4
- "properties": {
5
- "outputPath": {
6
- "description": "Path to the output file e.g. `profiling/events.json`. Defaults to `events.json`.",
7
- "type": "string",
8
- "absolutePath": false,
9
- "minLength": 4
10
- }
11
- }
12
- }
1
+ {
2
+ "type": "object",
3
+ "additionalProperties": false,
4
+ "properties": {
5
+ "outputPath": {
6
+ "description": "Path to the output file e.g. `profiling/events.json`. Defaults to `events.json`.",
7
+ "type": "string",
8
+ "absolutePath": false,
9
+ "minLength": 4
10
+ }
11
+ }
12
+ }
@@ -1,22 +1,22 @@
1
- {
2
- "type": "object",
3
- "additionalProperties": false,
4
- "properties": {
5
- "minSize": {
6
- "description": "Byte, split point. Default: 30720",
7
- "type": "number"
8
- },
9
- "maxSize": {
10
- "description": "Byte, maxsize of per file. Default: 51200",
11
- "type": "number"
12
- },
13
- "chunkOverhead": {
14
- "description": "Default: 0",
15
- "type": "number"
16
- },
17
- "entryChunkMultiplicator": {
18
- "description": "Default: 1",
19
- "type": "number"
20
- }
21
- }
22
- }
1
+ {
2
+ "type": "object",
3
+ "additionalProperties": false,
4
+ "properties": {
5
+ "minSize": {
6
+ "description": "Byte, split point. Default: 30720",
7
+ "type": "number"
8
+ },
9
+ "maxSize": {
10
+ "description": "Byte, maxsize of per file. Default: 51200",
11
+ "type": "number"
12
+ },
13
+ "chunkOverhead": {
14
+ "description": "Default: 0",
15
+ "type": "number"
16
+ },
17
+ "entryChunkMultiplicator": {
18
+ "description": "Default: 1",
19
+ "type": "number"
20
+ }
21
+ }
22
+ }
@@ -1,15 +1,15 @@
1
- {
2
- "type": "object",
3
- "additionalProperties": false,
4
- "properties": {
5
- "maxChunks": {
6
- "description": "Limit the maximum number of chunks using a value greater greater than or equal to 1",
7
- "type": "number",
8
- "minimum": 1
9
- },
10
- "minChunkSize": {
11
- "description": "Set a minimum chunk size",
12
- "type": "number"
13
- }
14
- }
15
- }
1
+ {
2
+ "type": "object",
3
+ "additionalProperties": false,
4
+ "properties": {
5
+ "maxChunks": {
6
+ "description": "Limit the maximum number of chunks using a value greater greater than or equal to 1",
7
+ "type": "number",
8
+ "minimum": 1
9
+ },
10
+ "minChunkSize": {
11
+ "description": "Set a minimum chunk size",
12
+ "type": "number"
13
+ }
14
+ }
15
+ }
@@ -1,13 +1,13 @@
1
- {
2
- "additionalProperties": false,
3
- "type": "object",
4
- "required": [
5
- "minChunkSize"
6
- ],
7
- "properties": {
8
- "minChunkSize": {
9
- "description": "Minimum number of characters",
10
- "type": "number"
11
- }
12
- }
13
- }
1
+ {
2
+ "additionalProperties": false,
3
+ "type": "object",
4
+ "required": [
5
+ "minChunkSize"
6
+ ],
7
+ "properties": {
8
+ "minChunkSize": {
9
+ "description": "Minimum number of characters",
10
+ "type": "number"
11
+ }
12
+ }
13
+ }