webpack 4.14.0 → 4.16.1
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/LICENSE +20 -20
- package/README.md +5 -2
- package/bin/webpack.js +7 -2
- package/buildin/amd-define.js +3 -3
- package/buildin/amd-options.js +2 -2
- package/buildin/system.js +7 -7
- package/hot/dev-server.js +2 -2
- package/hot/emitter.js +2 -2
- package/hot/only-dev-server.js +2 -2
- package/hot/poll.js +5 -2
- package/hot/signal.js +2 -2
- package/lib/AsyncDependenciesBlock.js +44 -0
- package/lib/AutomaticPrefetchPlugin.js +2 -2
- package/lib/Chunk.js +56 -6
- package/lib/ChunkGroup.js +2 -2
- package/lib/ChunkTemplate.js +14 -2
- package/lib/CommentCompilationWarning.js +3 -3
- package/lib/CompatibilityPlugin.js +1 -1
- package/lib/Compilation.js +442 -37
- package/lib/Compiler.js +57 -4
- package/lib/ContextModule.js +23 -16
- package/lib/DefinePlugin.js +49 -0
- package/lib/DelegatedModule.js +9 -1
- package/lib/DelegatedModuleFactoryPlugin.js +7 -1
- package/lib/DependenciesBlock.js +36 -3
- package/lib/DependenciesBlockVariable.js +22 -0
- package/lib/Dependency.js +33 -6
- package/lib/DllEntryPlugin.js +4 -1
- package/lib/DynamicEntryPlugin.js +21 -1
- package/lib/EntryOptionPlugin.js +12 -0
- package/lib/Entrypoint.js +1 -1
- package/lib/EnvironmentPlugin.js +8 -1
- package/lib/ExtendedAPIPlugin.js +8 -4
- package/lib/ExternalModuleFactoryPlugin.js +1 -1
- package/lib/Generator.js +1 -1
- package/lib/GraphHelpers.js +2 -1
- package/lib/HotModuleReplacement.runtime.js +8 -5
- package/lib/HotModuleReplacementPlugin.js +115 -117
- package/lib/IgnorePlugin.js +1 -1
- package/lib/MainTemplate.js +19 -4
- package/lib/MemoryOutputFileSystem.js +5 -5
- package/lib/Module.js +9 -3
- package/lib/ModuleReason.js +8 -0
- package/lib/MultiEntryPlugin.js +25 -3
- package/lib/NormalModule.js +5 -23
- package/lib/NullFactory.js +12 -12
- package/lib/OptionsApply.js +10 -10
- package/lib/RuleSet.js +3 -3
- package/lib/SingleEntryPlugin.js +20 -1
- package/lib/Stats.js +12 -5
- package/lib/Template.js +4 -1
- package/lib/UmdMainTemplatePlugin.js +12 -12
- package/lib/UseStrictPlugin.js +1 -1
- package/lib/WebpackError.js +4 -0
- package/lib/WebpackOptionsApply.js +92 -10
- package/lib/WebpackOptionsDefaulter.js +23 -6
- package/lib/WebpackOptionsValidationError.js +0 -1
- package/lib/compareLocations.js +13 -17
- package/lib/debug/ProfilingPlugin.js +5 -7
- package/lib/dependencies/AMDDefineDependencyParserPlugin.js +4 -6
- package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +0 -2
- package/lib/dependencies/AMDRequireItemDependency.js +22 -22
- package/lib/dependencies/CommonJsRequireDependency.js +22 -22
- package/lib/dependencies/CriticalDependencyWarning.js +20 -20
- package/lib/dependencies/DelegatedSourceDependency.js +18 -18
- package/lib/dependencies/DllEntryDependency.js +20 -20
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +2 -1
- package/lib/dependencies/LoaderDependency.js +3 -0
- package/lib/dependencies/LoaderPlugin.js +21 -2
- package/lib/dependencies/LocalModule.js +23 -23
- package/lib/dependencies/ModuleDependency.js +3 -0
- package/lib/dependencies/ModuleHotAcceptDependency.js +23 -23
- package/lib/dependencies/ModuleHotDeclineDependency.js +23 -23
- package/lib/dependencies/MultiEntryDependency.js +5 -0
- package/lib/dependencies/PrefetchDependency.js +18 -18
- package/lib/dependencies/RequireEnsureItemDependency.js +21 -21
- package/lib/dependencies/RequireResolveDependency.js +22 -22
- package/lib/dependencies/SingleEntryDependency.js +3 -0
- package/lib/dependencies/SystemPlugin.js +1 -1
- package/lib/formatLocation.js +55 -41
- package/lib/node/NodeMainTemplateAsync.runtime.js +1 -1
- package/lib/node/NodeMainTemplatePlugin.js +2 -2
- package/lib/node/NodeOutputFileSystem.js +22 -22
- package/lib/node/NodeSourcePlugin.js +1 -1
- package/lib/optimize/ConcatenatedModule.js +1 -0
- package/lib/optimize/NaturalChunkOrderPlugin.js +41 -0
- package/lib/optimize/OccurrenceChunkOrderPlugin.js +61 -0
- package/lib/optimize/OccurrenceModuleOrderPlugin.js +103 -0
- package/lib/optimize/OccurrenceOrderPlugin.js +4 -2
- package/lib/optimize/SplitChunksPlugin.js +168 -18
- package/lib/util/Semaphore.js +12 -0
- package/lib/util/SetHelpers.js +4 -4
- package/lib/util/SortableSet.js +1 -1
- package/lib/util/cachedMerge.js +1 -1
- package/lib/util/createHash.js +15 -0
- package/lib/util/deterministicGrouping.js +251 -0
- package/lib/util/identifier.js +27 -0
- package/lib/wasm/WasmFinalizeExportsPlugin.js +1 -1
- package/lib/wasm/WasmMainTemplatePlugin.js +10 -4
- package/lib/wasm/WebAssemblyGenerator.js +12 -12
- package/lib/wasm/WebAssemblyInInitialChunkError.js +88 -0
- package/lib/wasm/WebAssemblyModulesPlugin.js +28 -0
- package/lib/web/JsonpMainTemplatePlugin.js +1 -1
- package/lib/web/WebEnvironmentPlugin.js +18 -18
- package/lib/webpack.js +4 -0
- package/lib/webpack.web.js +2 -2
- package/lib/webworker/WebWorkerMainTemplatePlugin.js +1 -1
- package/package.json +27 -17
- package/schemas/WebpackOptions.json +71 -9
- package/schemas/plugins/optimize/OccurrenceOrderChunkIdsPlugin.json +10 -0
- package/schemas/plugins/optimize/OccurrenceOrderModuleIdsPlugin.json +10 -0
package/package.json
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
{
|
2
2
|
"name": "webpack",
|
3
|
-
"version": "4.
|
3
|
+
"version": "4.16.1",
|
4
4
|
"author": "Tobias Koppers @sokra",
|
5
5
|
"description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.",
|
6
6
|
"license": "MIT",
|
7
7
|
"dependencies": {
|
8
|
-
"@webassemblyjs/ast": "1.5.
|
9
|
-
"@webassemblyjs/helper-module-context": "1.5.
|
10
|
-
"@webassemblyjs/wasm-edit": "1.5.
|
11
|
-
"@webassemblyjs/wasm-opt": "1.5.
|
12
|
-
"@webassemblyjs/wasm-parser": "1.5.
|
8
|
+
"@webassemblyjs/ast": "1.5.13",
|
9
|
+
"@webassemblyjs/helper-module-context": "1.5.13",
|
10
|
+
"@webassemblyjs/wasm-edit": "1.5.13",
|
11
|
+
"@webassemblyjs/wasm-opt": "1.5.13",
|
12
|
+
"@webassemblyjs/wasm-parser": "1.5.13",
|
13
13
|
"acorn": "^5.6.2",
|
14
14
|
"acorn-dynamic-import": "^3.0.0",
|
15
15
|
"ajv": "^6.1.0",
|
16
16
|
"ajv-keywords": "^3.1.0",
|
17
17
|
"chrome-trace-event": "^1.0.0",
|
18
18
|
"enhanced-resolve": "^4.1.0",
|
19
|
-
"eslint-scope": "^
|
19
|
+
"eslint-scope": "^4.0.0",
|
20
20
|
"json-parse-better-errors": "^1.0.2",
|
21
21
|
"loader-runner": "^2.3.0",
|
22
22
|
"loader-utils": "^1.1.0",
|
@@ -34,6 +34,7 @@
|
|
34
34
|
"devDependencies": {
|
35
35
|
"@types/node": "^9.6.4",
|
36
36
|
"@types/tapable": "^1.0.1",
|
37
|
+
"@types/webpack-sources": "^0.1.4",
|
37
38
|
"benchmark": "^2.1.1",
|
38
39
|
"bundle-loader": "~0.5.0",
|
39
40
|
"codacy-coverage": "^2.0.1",
|
@@ -42,11 +43,11 @@
|
|
42
43
|
"coveralls": "^2.11.2",
|
43
44
|
"css-loader": "^0.28.3",
|
44
45
|
"es6-promise-polyfill": "^1.1.1",
|
45
|
-
"eslint": "^
|
46
|
+
"eslint": "^5.1.0",
|
46
47
|
"eslint-config-prettier": "^2.9.0",
|
47
48
|
"eslint-plugin-jest": "^21.17.0",
|
48
49
|
"eslint-plugin-node": "^6.0.1",
|
49
|
-
"eslint-plugin-prettier": "^2.6.
|
50
|
+
"eslint-plugin-prettier": "^2.6.2",
|
50
51
|
"express": "~4.13.1",
|
51
52
|
"file-loader": "^1.1.6",
|
52
53
|
"glob": "^7.1.2",
|
@@ -55,14 +56,14 @@
|
|
55
56
|
"istanbul": "^0.4.5",
|
56
57
|
"jade": "^1.11.0",
|
57
58
|
"jade-loader": "~0.8.0",
|
58
|
-
"jest": "^23.0
|
59
|
+
"jest": "^23.3.0",
|
59
60
|
"jest-silent-reporter": "^0.0.5",
|
60
61
|
"json-loader": "^0.5.7",
|
61
62
|
"less": "^2.5.1",
|
62
63
|
"less-loader": "^4.0.3",
|
63
|
-
"lint-staged": "^7.
|
64
|
+
"lint-staged": "^7.2.0",
|
64
65
|
"lodash": "^4.17.4",
|
65
|
-
"prettier": "^1.13.
|
66
|
+
"prettier": "^1.13.7",
|
66
67
|
"pug": "^2.0.3",
|
67
68
|
"pug-loader": "^2.4.0",
|
68
69
|
"raw-loader": "~0.5.0",
|
@@ -72,7 +73,7 @@
|
|
72
73
|
"script-loader": "~0.7.0",
|
73
74
|
"simple-git": "^1.65.0",
|
74
75
|
"style-loader": "^0.19.1",
|
75
|
-
"typescript": "^
|
76
|
+
"typescript": "^3.0.0-rc",
|
76
77
|
"url-loader": "^0.6.2",
|
77
78
|
"val-loader": "^1.0.2",
|
78
79
|
"vm-browserify": "~0.0.0",
|
@@ -81,6 +82,14 @@
|
|
81
82
|
"worker-loader": "^1.1.1",
|
82
83
|
"xxhashjs": "^0.2.1"
|
83
84
|
},
|
85
|
+
"resolutions": {
|
86
|
+
"**/jest-message-util/micromatch": "^2.3.11",
|
87
|
+
"**/jest-cli/micromatch": "^2.3.11",
|
88
|
+
"**/jest-runtime/micromatch": "^2.3.11",
|
89
|
+
"**/jest-haste-map/micromatch": "^2.3.11",
|
90
|
+
"**/jest-haste-map/sane/micromatch": "^2.3.11",
|
91
|
+
"**/jest-config/babel-jest/babel-plugin-istanbul/test-exclude/micromatch": "^2.3.11"
|
92
|
+
},
|
84
93
|
"engines": {
|
85
94
|
"node": ">=6.11.5"
|
86
95
|
},
|
@@ -108,11 +117,11 @@
|
|
108
117
|
"test:integration": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.test.js\"",
|
109
118
|
"test:basic": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/{TestCasesNormal,StatsTestCases,ConfigTestCases}.test.js\"",
|
110
119
|
"test:unit": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.unittest.js\"",
|
111
|
-
"travis:integration": "yarn cover:init && yarn cover:integration \"test/(
|
120
|
+
"travis:integration": "yarn cover:init && yarn cover:integration \"test/(?!TestCases)\" --ci $JEST && mv coverage/coverage-final.json coverage/coverage-final-1.json && yarn cover:integration \"test/TestCasesD\" --ci $JEST && mv coverage/coverage-final.json coverage/coverage-final-2.json && yarn cover:integration \"test/TestCases(?!D)\" --ci $JEST && mv coverage/coverage-final.json coverage/coverage-final-3.json",
|
112
121
|
"travis:basic": "yarn test:basic --ci $JEST",
|
113
122
|
"travis:lint-unit": "yarn lint && yarn cover:init && yarn cover:unit --ci $JEST",
|
114
123
|
"travis:benchmark": "yarn benchmark --ci",
|
115
|
-
"appveyor:integration": "yarn cover:init && yarn cover:integration \"test/(
|
124
|
+
"appveyor:integration": "yarn cover:init && yarn cover:integration \"test/(?!TestCases)\" --ci %JEST% && move coverage\\coverage-final.json coverage\\coverage-final-1.json&& yarn cover:integration \"test/TestCasesD\" --ci %JEST% && move coverage\\coverage-final.json coverage\\coverage-final-2.json && yarn cover:integration \"test/TestCases(?!D)\" --ci %JEST% && move coverage\\coverage-final.json coverage\\coverage-final-3.json",
|
116
125
|
"appveyor:unit": "yarn cover:init && yarn cover:unit --ci %JEST%",
|
117
126
|
"appveyor:benchmark": "yarn benchmark --ci",
|
118
127
|
"build:examples": "cd examples && node buildAll.js",
|
@@ -122,7 +131,7 @@
|
|
122
131
|
"code-lint": "eslint --cache setup lib bin hot buildin benchmark \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\"",
|
123
132
|
"type-lint": "tsc --pretty",
|
124
133
|
"fix": "yarn code-lint --fix",
|
125
|
-
"pretty": "prettier --write \"setup/**/*.js\" \"lib/**/*.js\" \"bin/*.js\" \"hot/*.js\" \"buildin/*.js\" \"benchmark/**/*.js\" \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\" \"declarations.d.ts\"",
|
134
|
+
"pretty": "prettier --write \"setup/**/*.js\" \"lib/**/*.js\" \"bin/*.js\" \"hot/*.js\" \"buildin/*.js\" \"benchmark/**/*.js\" \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\" \"declarations.d.ts\" \"tsconfig.json\"",
|
126
135
|
"schema-lint": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.lint.js\" --no-verbose",
|
127
136
|
"benchmark": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.benchmark.js\" --runInBand",
|
128
137
|
"cover": "yarn cover:init && yarn cover:all && yarn cover:report",
|
@@ -178,7 +187,8 @@
|
|
178
187
|
"coveragePathIgnorePatterns": [
|
179
188
|
"\\.runtime\\.js$",
|
180
189
|
"<rootDir>/test/",
|
181
|
-
"<rootDir>/schemas/"
|
190
|
+
"<rootDir>/schemas/",
|
191
|
+
"<rootDir>/node_modules/"
|
182
192
|
],
|
183
193
|
"testEnvironment": "node",
|
184
194
|
"coverageReporters": [
|
@@ -410,11 +410,7 @@
|
|
410
410
|
},
|
411
411
|
"hashDigest": {
|
412
412
|
"description": "Digest type used for the hash",
|
413
|
-
"
|
414
|
-
"latin1",
|
415
|
-
"hex",
|
416
|
-
"base64"
|
417
|
-
]
|
413
|
+
"type": "string"
|
418
414
|
},
|
419
415
|
"hashDigestLength": {
|
420
416
|
"description": "Number of chars which are used for the hash",
|
@@ -1351,7 +1347,12 @@
|
|
1351
1347
|
]
|
1352
1348
|
},
|
1353
1349
|
"minSize": {
|
1354
|
-
"description": "Minimal size for the created
|
1350
|
+
"description": "Minimal size for the created chunks",
|
1351
|
+
"type": "number",
|
1352
|
+
"minimum": 0
|
1353
|
+
},
|
1354
|
+
"maxSize": {
|
1355
|
+
"description": "Maximal size hint for the created chunks",
|
1355
1356
|
"type": "number",
|
1356
1357
|
"minimum": 0
|
1357
1358
|
},
|
@@ -1394,6 +1395,32 @@
|
|
1394
1395
|
"type": "string",
|
1395
1396
|
"minLength": 1
|
1396
1397
|
},
|
1398
|
+
"hidePathInfo": {
|
1399
|
+
"description": "Prevents exposing path info when creating names for parts splitted by maxSize",
|
1400
|
+
"type": "boolean"
|
1401
|
+
},
|
1402
|
+
"fallbackCacheGroup": {
|
1403
|
+
"description": "Options for modules not selected by any other cache group",
|
1404
|
+
"type": "object",
|
1405
|
+
"additionalProperties": false,
|
1406
|
+
"properties": {
|
1407
|
+
"minSize": {
|
1408
|
+
"description": "Minimal size for the created chunk",
|
1409
|
+
"type": "number",
|
1410
|
+
"minimum": 0
|
1411
|
+
},
|
1412
|
+
"maxSize": {
|
1413
|
+
"description": "Maximal size hint for the created chunks",
|
1414
|
+
"type": "number",
|
1415
|
+
"minimum": 0
|
1416
|
+
},
|
1417
|
+
"automaticNameDelimiter": {
|
1418
|
+
"description": "Sets the name delimiter for created chunks",
|
1419
|
+
"type": "string",
|
1420
|
+
"minLength": 1
|
1421
|
+
}
|
1422
|
+
}
|
1423
|
+
},
|
1397
1424
|
"cacheGroups": {
|
1398
1425
|
"description": "Assign modules to a cache group (modules from different cache groups are tried to keep in separate chunks)",
|
1399
1426
|
"type": "object",
|
@@ -1460,6 +1487,11 @@
|
|
1460
1487
|
"type": "number",
|
1461
1488
|
"minimum": 0
|
1462
1489
|
},
|
1490
|
+
"maxSize": {
|
1491
|
+
"description": "Maximal size hint for the created chunks",
|
1492
|
+
"type": "number",
|
1493
|
+
"minimum": 0
|
1494
|
+
},
|
1463
1495
|
"minChunks": {
|
1464
1496
|
"description": "Minimum number of times a module has to be duplicated until it's considered for splitting",
|
1465
1497
|
"type": "number",
|
@@ -1493,6 +1525,15 @@
|
|
1493
1525
|
}
|
1494
1526
|
]
|
1495
1527
|
},
|
1528
|
+
"automaticNameDelimiter": {
|
1529
|
+
"description": "Sets the name delimiter for created chunks",
|
1530
|
+
"type": "string",
|
1531
|
+
"minLength": 1
|
1532
|
+
},
|
1533
|
+
"automaticNamePrefix": {
|
1534
|
+
"description": "Sets the name prefix for created chunks",
|
1535
|
+
"type": "string"
|
1536
|
+
},
|
1496
1537
|
"filename": {
|
1497
1538
|
"description": "Sets the template for the filename for created chunks (Only works for initial chunks)",
|
1498
1539
|
"type": "string",
|
@@ -1550,16 +1591,37 @@
|
|
1550
1591
|
"description": "Reduce size of WASM by changing imports to shorter strings.",
|
1551
1592
|
"type": "boolean"
|
1552
1593
|
},
|
1594
|
+
"moduleIds": {
|
1595
|
+
"description": "Define the algorithm to choose module ids (natural: numeric ids in order of usage, named: readable ids for better debugging, hashed: short hashes as ids for better long term caching, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin)",
|
1596
|
+
"enum": [
|
1597
|
+
"natural",
|
1598
|
+
"named",
|
1599
|
+
"hashed",
|
1600
|
+
"size",
|
1601
|
+
"total-size",
|
1602
|
+
false
|
1603
|
+
]
|
1604
|
+
},
|
1605
|
+
"chunkIds": {
|
1606
|
+
"description": "Define the algorithm to choose chunk ids (named: readable ids for better debugging, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin)",
|
1607
|
+
"enum": [
|
1608
|
+
"natural",
|
1609
|
+
"named",
|
1610
|
+
"size",
|
1611
|
+
"total-size",
|
1612
|
+
false
|
1613
|
+
]
|
1614
|
+
},
|
1553
1615
|
"namedModules": {
|
1554
|
-
"description": "Use readable module identifiers for better debugging",
|
1616
|
+
"description": "Use readable module identifiers for better debugging (deprecated, used moduleIds: named instead)",
|
1555
1617
|
"type": "boolean"
|
1556
1618
|
},
|
1557
1619
|
"hashedModuleIds": {
|
1558
|
-
"description": "Use hashed module id instead module identifiers for better long term caching",
|
1620
|
+
"description": "Use hashed module id instead module identifiers for better long term caching (deprecated, used moduleIds: hashed instead)",
|
1559
1621
|
"type": "boolean"
|
1560
1622
|
},
|
1561
1623
|
"namedChunks": {
|
1562
|
-
"description": "Use readable chunk identifiers for better debugging",
|
1624
|
+
"description": "Use readable chunk identifiers for better debugging (deprecated, used chunkIds: named instead)",
|
1563
1625
|
"type": "boolean"
|
1564
1626
|
},
|
1565
1627
|
"portableRecords": {
|