webpack 5.65.0 → 5.66.0
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.
Potentially problematic release.
This version of webpack might be problematic. Click here for more details.
- package/lib/CacheFacade.js +2 -9
- package/lib/Chunk.js +2 -0
- package/lib/Compilation.js +79 -38
- package/lib/Dependency.js +10 -0
- package/lib/DependencyTemplate.js +9 -0
- package/lib/ExternalModule.js +92 -52
- package/lib/Generator.js +2 -0
- package/lib/Module.js +24 -1
- package/lib/ModuleFilenameHelpers.js +5 -1
- package/lib/NormalModule.js +3 -1
- package/lib/RuntimeGlobals.js +11 -1
- package/lib/RuntimePlugin.js +25 -0
- package/lib/RuntimeTemplate.js +21 -0
- package/lib/Template.js +2 -1
- package/lib/Watching.js +1 -1
- package/lib/WebpackOptionsApply.js +43 -2
- package/lib/asset/AssetGenerator.js +3 -1
- package/lib/asset/RawDataUrlModule.js +145 -0
- package/lib/config/defaults.js +59 -3
- package/lib/css/CssGenerator.js +106 -0
- package/lib/css/CssLoadingRuntimeModule.js +393 -0
- package/lib/css/CssModulesPlugin.js +444 -0
- package/lib/css/CssParser.js +618 -0
- package/lib/css/walkCssTokens.js +659 -0
- package/lib/dependencies/CssExportDependency.js +85 -0
- package/lib/dependencies/CssImportDependency.js +75 -0
- package/lib/dependencies/CssLocalIdentifierDependency.js +119 -0
- package/lib/dependencies/CssSelfLocalIdentifierDependency.js +101 -0
- package/lib/dependencies/CssUrlDependency.js +132 -0
- package/lib/dependencies/URLDependency.js +3 -8
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +1 -1
- package/lib/hmr/lazyCompilationBackend.js +3 -1
- package/lib/javascript/JavascriptGenerator.js +1 -0
- package/lib/javascript/StartupHelpers.js +3 -3
- package/lib/library/AssignLibraryPlugin.js +26 -3
- package/lib/library/EnableLibraryPlugin.js +11 -0
- package/lib/node/ReadFileChunkLoadingRuntimeModule.js +1 -1
- package/lib/node/RequireChunkLoadingRuntimeModule.js +1 -1
- package/lib/optimize/ConcatenatedModule.js +10 -4
- package/lib/util/hash/xxhash64.js +2 -2
- package/lib/util/internalSerializables.js +11 -0
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +2 -2
- package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +1 -1
- package/package.json +2 -2
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +55 -1
- package/schemas/plugins/container/ContainerPlugin.check.js +1 -1
- package/schemas/plugins/container/ContainerPlugin.json +2 -1
- package/schemas/plugins/container/ContainerReferencePlugin.check.js +1 -1
- package/schemas/plugins/container/ContainerReferencePlugin.json +1 -0
- package/schemas/plugins/container/ExternalsType.check.js +1 -1
- package/schemas/plugins/container/ModuleFederationPlugin.check.js +1 -1
- package/schemas/plugins/container/ModuleFederationPlugin.json +3 -1
- package/schemas/plugins/css/CssGeneratorOptions.check.d.ts +7 -0
- package/schemas/plugins/css/CssGeneratorOptions.check.js +6 -0
- package/schemas/plugins/css/CssGeneratorOptions.json +3 -0
- package/schemas/plugins/css/CssParserOptions.check.d.ts +7 -0
- package/schemas/plugins/css/CssParserOptions.check.js +6 -0
- package/schemas/plugins/css/CssParserOptions.json +3 -0
- package/types.d.ts +86 -2
@@ -39,6 +39,7 @@ const {
|
|
39
39
|
/** @typedef {import("webpack-sources").Source} Source */
|
40
40
|
/** @typedef {import("../../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */
|
41
41
|
/** @typedef {import("../ChunkGraph")} ChunkGraph */
|
42
|
+
/** @typedef {import("../CodeGenerationResults")} CodeGenerationResults */
|
42
43
|
/** @typedef {import("../Compilation")} Compilation */
|
43
44
|
/** @typedef {import("../Dependency")} Dependency */
|
44
45
|
/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */
|
@@ -1077,7 +1078,8 @@ class ConcatenatedModule extends Module {
|
|
1077
1078
|
runtimeTemplate,
|
1078
1079
|
moduleGraph,
|
1079
1080
|
chunkGraph,
|
1080
|
-
runtime: generationRuntime
|
1081
|
+
runtime: generationRuntime,
|
1082
|
+
codeGenerationResults
|
1081
1083
|
}) {
|
1082
1084
|
/** @type {Set<string>} */
|
1083
1085
|
const runtimeRequirements = new Set();
|
@@ -1104,7 +1106,8 @@ class ConcatenatedModule extends Module {
|
|
1104
1106
|
runtimeTemplate,
|
1105
1107
|
moduleGraph,
|
1106
1108
|
chunkGraph,
|
1107
|
-
runtime
|
1109
|
+
runtime,
|
1110
|
+
codeGenerationResults
|
1108
1111
|
);
|
1109
1112
|
}
|
1110
1113
|
|
@@ -1634,6 +1637,7 @@ ${defineGetters}`
|
|
1634
1637
|
* @param {ModuleGraph} moduleGraph moduleGraph
|
1635
1638
|
* @param {ChunkGraph} chunkGraph chunkGraph
|
1636
1639
|
* @param {RuntimeSpec} runtime runtime
|
1640
|
+
* @param {CodeGenerationResults} codeGenerationResults codeGenerationResults
|
1637
1641
|
*/
|
1638
1642
|
_analyseModule(
|
1639
1643
|
modulesMap,
|
@@ -1642,7 +1646,8 @@ ${defineGetters}`
|
|
1642
1646
|
runtimeTemplate,
|
1643
1647
|
moduleGraph,
|
1644
1648
|
chunkGraph,
|
1645
|
-
runtime
|
1649
|
+
runtime,
|
1650
|
+
codeGenerationResults
|
1646
1651
|
) {
|
1647
1652
|
if (info.type === "concatenated") {
|
1648
1653
|
const m = info.module;
|
@@ -1657,7 +1662,8 @@ ${defineGetters}`
|
|
1657
1662
|
moduleGraph,
|
1658
1663
|
chunkGraph,
|
1659
1664
|
runtime,
|
1660
|
-
concatenationScope
|
1665
|
+
concatenationScope,
|
1666
|
+
codeGenerationResults
|
1661
1667
|
});
|
1662
1668
|
const source = codeGenResult.sources.get("javascript");
|
1663
1669
|
const data = codeGenResult.data;
|
@@ -10,8 +10,8 @@ const create = require("./wasm-hash");
|
|
10
10
|
//#region wasm code: xxhash64 (../../../assembly/hash/xxhash64.asm.ts) --initialMemory 1
|
11
11
|
const xxhash64 = new WebAssembly.Module(
|
12
12
|
Buffer.from(
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eVr6+Ytt6bnn9+hUIXiULP1tO+0ser2UJ+Qvnz3fGZ9pmrFnwhAiABQQRqIQELA0AgACABRwRAIAIgATEAAELFz9my8eW66id+hUILiUKHla+vmLbem55/fiECIAFBAWohAQwBCwtBACACIAJCIYiFQs/W077Sx6vZQn4iAkIdiCAChUL5893xmfaZqxZ+IgJCIIggAoUiAkIgiCIDQv//A4NCIIYgA0KAgPz/D4NCEIiEIgNC/4GAgPAfg0IQhiADQoD+g4CA4D+DQgiIhCIDQo+AvIDwgcAHg0IIhiADQvCBwIeAnoD4AINCBIiEIgNChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IANCsODAgYOGjJgwhHw3AwBBCCACQv////8PgyICQv//A4NCIIYgAkKAgPz/D4NCEIiEIgJC/4GAgPAfg0IQhiACQoD+g4CA4D+DQgiIhCICQo+AvIDwgcAHg0IIhiACQvCBwIeAnoD4AINCBIiEIgJChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IAJCsODAgYOGjJgwhHw3AwAL",
|
15
15
|
"base64"
|
16
16
|
)
|
17
17
|
);
|
@@ -67,6 +67,16 @@ module.exports = {
|
|
67
67
|
require("../dependencies/ContextElementDependency"),
|
68
68
|
"dependencies/CriticalDependencyWarning": () =>
|
69
69
|
require("../dependencies/CriticalDependencyWarning"),
|
70
|
+
"dependencies/CssImportDependency": () =>
|
71
|
+
require("../dependencies/CssImportDependency"),
|
72
|
+
"dependencies/CssLocalIdentifierDependency": () =>
|
73
|
+
require("../dependencies/CssLocalIdentifierDependency"),
|
74
|
+
"dependencies/CssSelfLocalIdentifierDependency": () =>
|
75
|
+
require("../dependencies/CssSelfLocalIdentifierDependency"),
|
76
|
+
"dependencies/CssExportDependency": () =>
|
77
|
+
require("../dependencies/CssExportDependency"),
|
78
|
+
"dependencies/CssUrlDependency": () =>
|
79
|
+
require("../dependencies/CssUrlDependency"),
|
70
80
|
"dependencies/DelegatedSourceDependency": () =>
|
71
81
|
require("../dependencies/DelegatedSourceDependency"),
|
72
82
|
"dependencies/DllEntryDependency": () =>
|
@@ -175,6 +185,7 @@ module.exports = {
|
|
175
185
|
ModuleParseError: () => require("../ModuleParseError"),
|
176
186
|
ModuleWarning: () => require("../ModuleWarning"),
|
177
187
|
NormalModule: () => require("../NormalModule"),
|
188
|
+
RawDataUrlModule: () => require("../asset/RawDataUrlModule"),
|
178
189
|
RawModule: () => require("../RawModule"),
|
179
190
|
"sharing/ConsumeSharedModule": () =>
|
180
191
|
require("../sharing/ConsumeSharedModule"),
|
@@ -96,7 +96,7 @@ class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
|
|
96
96
|
)}]`;
|
97
97
|
const conditionMap = chunkGraph.getChunkConditionMap(chunk, chunkHasJs);
|
98
98
|
const hasJsMatcher = compileBooleanMatcher(conditionMap);
|
99
|
-
const initialChunkIds = getInitialChunkIds(chunk, chunkGraph);
|
99
|
+
const initialChunkIds = getInitialChunkIds(chunk, chunkGraph, chunkHasJs);
|
100
100
|
|
101
101
|
const stateExpression = withHmr
|
102
102
|
? `${RuntimeGlobals.hmrRuntimeStatePrefix}_jsonp`
|
@@ -419,7 +419,7 @@ class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
|
|
419
419
|
`if(${RuntimeGlobals.hasOwnProperty}(installedChunks, chunkId) && installedChunks[chunkId]) {`,
|
420
420
|
Template.indent("installedChunks[chunkId][0]();"),
|
421
421
|
"}",
|
422
|
-
"installedChunks[
|
422
|
+
"installedChunks[chunkId] = 0;"
|
423
423
|
]),
|
424
424
|
"}",
|
425
425
|
withOnChunkLoad
|
@@ -53,7 +53,7 @@ class ImportScriptsChunkLoadingRuntimeModule extends RuntimeModule {
|
|
53
53
|
const hasJsMatcher = compileBooleanMatcher(
|
54
54
|
chunkGraph.getChunkConditionMap(chunk, chunkHasJs)
|
55
55
|
);
|
56
|
-
const initialChunkIds = getInitialChunkIds(chunk, chunkGraph);
|
56
|
+
const initialChunkIds = getInitialChunkIds(chunk, chunkGraph, chunkHasJs);
|
57
57
|
|
58
58
|
const outputName = this.compilation.getPath(
|
59
59
|
getChunkFilenameTemplate(chunk, this.compilation.outputOptions),
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "webpack",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.66.0",
|
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",
|
@@ -19,7 +19,7 @@
|
|
19
19
|
"eslint-scope": "5.1.1",
|
20
20
|
"events": "^3.2.0",
|
21
21
|
"glob-to-regexp": "^0.4.1",
|
22
|
-
"graceful-fs": "^4.2.
|
22
|
+
"graceful-fs": "^4.2.9",
|
23
23
|
"json-parse-better-errors": "^1.0.2",
|
24
24
|
"loader-runner": "^4.2.0",
|
25
25
|
"mime-types": "^2.1.27",
|