webpack 5.98.0 → 5.99.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.
- package/README.md +7 -3
- package/lib/AsyncDependenciesBlock.js +3 -1
- package/lib/BannerPlugin.js +1 -1
- package/lib/Cache.js +9 -7
- package/lib/CacheFacade.js +5 -5
- package/lib/Chunk.js +2 -2
- package/lib/ChunkGraph.js +21 -16
- package/lib/ChunkTemplate.js +6 -6
- package/lib/CleanPlugin.js +10 -10
- package/lib/CodeGenerationResults.js +4 -3
- package/lib/CompatibilityPlugin.js +4 -1
- package/lib/Compilation.js +326 -152
- package/lib/Compiler.js +13 -18
- package/lib/ConditionalInitFragment.js +1 -1
- package/lib/ConstPlugin.js +5 -3
- package/lib/ContextModule.js +4 -2
- package/lib/ContextModuleFactory.js +3 -3
- package/lib/ContextReplacementPlugin.js +43 -16
- package/lib/DefinePlugin.js +25 -24
- package/lib/DelegatedModule.js +4 -2
- package/lib/DelegatedModuleFactoryPlugin.js +2 -1
- package/lib/Dependency.js +19 -13
- package/lib/DependencyTemplates.js +4 -3
- package/lib/DllModule.js +4 -2
- package/lib/DllModuleFactory.js +2 -2
- package/lib/DllReferencePlugin.js +2 -1
- package/lib/DynamicEntryPlugin.js +1 -1
- package/lib/EnvironmentPlugin.js +4 -2
- package/lib/ExportsInfo.js +72 -40
- package/lib/ExternalModule.js +14 -5
- package/lib/ExternalModuleFactoryPlugin.js +24 -12
- package/lib/FileSystemInfo.js +129 -94
- package/lib/FlagDependencyExportsPlugin.js +6 -4
- package/lib/FlagDependencyUsagePlugin.js +1 -1
- package/lib/Generator.js +29 -1
- package/lib/HookWebpackError.js +2 -2
- package/lib/HotModuleReplacementPlugin.js +3 -9
- package/lib/IgnoreErrorModuleFactory.js +2 -2
- package/lib/IgnorePlugin.js +0 -5
- package/lib/InitFragment.js +1 -1
- package/lib/LoaderOptionsPlugin.js +8 -5
- package/lib/MainTemplate.js +7 -7
- package/lib/Module.js +40 -17
- package/lib/ModuleBuildError.js +3 -1
- package/lib/ModuleDependencyError.js +4 -3
- package/lib/ModuleDependencyWarning.js +4 -3
- package/lib/ModuleFactory.js +9 -3
- package/lib/ModuleFilenameHelpers.js +13 -13
- package/lib/ModuleGraph.js +20 -14
- package/lib/ModuleGraphConnection.js +7 -13
- package/lib/ModuleNotFoundError.js +1 -1
- package/lib/ModuleParseError.js +2 -1
- package/lib/ModuleSourceTypesConstants.js +11 -0
- package/lib/ModuleTemplate.js +5 -5
- package/lib/ModuleTypeConstants.js +15 -0
- package/lib/MultiCompiler.js +4 -4
- package/lib/MultiStats.js +1 -1
- package/lib/NormalModule.js +101 -54
- package/lib/NormalModuleFactory.js +38 -33
- package/lib/NormalModuleReplacementPlugin.js +3 -2
- package/lib/NullFactory.js +2 -2
- package/lib/Parser.js +4 -3
- package/lib/ProgressPlugin.js +1 -2
- package/lib/RawModule.js +4 -2
- package/lib/RecordIdsPlugin.js +6 -2
- package/lib/RequestShortener.js +3 -1
- package/lib/ResolverFactory.js +12 -9
- package/lib/RuntimeModule.js +4 -2
- package/lib/RuntimeTemplate.js +2 -1
- package/lib/SelfModuleFactory.js +2 -2
- package/lib/SourceMapDevToolPlugin.js +0 -8
- package/lib/Template.js +6 -5
- package/lib/TemplatedPathPlugin.js +15 -12
- package/lib/WebpackOptionsApply.js +1 -1
- package/lib/asset/AssetGenerator.js +237 -170
- package/lib/asset/AssetModulesPlugin.js +50 -8
- package/lib/asset/AssetSourceGenerator.js +18 -0
- package/lib/asset/RawDataUrlModule.js +4 -2
- package/lib/buildChunkGraph.js +14 -4
- package/lib/cache/MemoryWithGcCachePlugin.js +6 -2
- package/lib/cache/PackFileCacheStrategy.js +137 -121
- package/lib/cache/ResolverCachePlugin.js +15 -7
- package/lib/cache/getLazyHashedEtag.js +4 -3
- package/lib/cli.js +23 -15
- package/lib/config/defaults.js +93 -26
- package/lib/config/normalization.js +14 -13
- package/lib/config/target.js +8 -8
- package/lib/container/ContainerEntryModule.js +4 -2
- package/lib/container/ContainerEntryModuleFactory.js +2 -2
- package/lib/container/FallbackModule.js +4 -2
- package/lib/container/FallbackModuleFactory.js +2 -2
- package/lib/container/RemoteModule.js +4 -2
- package/lib/container/options.js +5 -5
- package/lib/css/CssGenerator.js +71 -9
- package/lib/css/CssModulesPlugin.js +30 -5
- package/lib/css/CssParser.js +37 -17
- package/lib/css/walkCssTokens.js +17 -17
- package/lib/debug/ProfilingPlugin.js +98 -38
- package/lib/dependencies/AMDDefineDependencyParserPlugin.js +10 -4
- package/lib/dependencies/AMDPlugin.js +5 -2
- package/lib/dependencies/AMDRequireArrayDependency.js +4 -3
- package/lib/dependencies/AMDRequireContextDependency.js +2 -1
- package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +15 -7
- package/lib/dependencies/AMDRuntimeModules.js +3 -1
- package/lib/dependencies/CommonJsExportRequireDependency.js +4 -5
- package/lib/dependencies/CommonJsExportsParserPlugin.js +3 -3
- package/lib/dependencies/CommonJsImportsParserPlugin.js +8 -7
- package/lib/dependencies/CommonJsRequireContextDependency.js +2 -1
- package/lib/dependencies/ContextDependencyHelpers.js +13 -6
- package/lib/dependencies/CssIcssExportDependency.js +15 -12
- package/lib/dependencies/CssIcssImportDependency.js +4 -1
- package/lib/dependencies/CssLocalIdentifierDependency.js +17 -14
- package/lib/dependencies/ExportsInfoDependency.js +6 -1
- package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +5 -5
- package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +22 -15
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +23 -8
- package/lib/dependencies/HarmonyExportSpecifierDependency.js +2 -2
- package/lib/dependencies/HarmonyImportDependency.js +8 -6
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +19 -14
- package/lib/dependencies/HarmonyImportSpecifierDependency.js +5 -5
- package/lib/dependencies/ImportContextDependency.js +2 -1
- package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +8 -4
- package/lib/dependencies/JsonExportsDependency.js +24 -8
- package/lib/dependencies/LoaderPlugin.js +4 -14
- package/lib/dependencies/RequireContextDependency.js +2 -1
- package/lib/dependencies/RequireContextDependencyParserPlugin.js +6 -3
- package/lib/dependencies/RequireEnsureDependenciesBlock.js +3 -2
- package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +11 -5
- package/lib/dependencies/RequireResolveContextDependency.js +1 -1
- package/lib/dependencies/WebAssemblyExportImportedDependency.js +1 -1
- package/lib/dependencies/WorkerDependency.js +6 -3
- package/lib/dependencies/WorkerPlugin.js +100 -41
- package/lib/esm/ModuleChunkFormatPlugin.js +5 -0
- package/lib/hmr/HotModuleReplacement.runtime.js +1 -0
- package/lib/hmr/JavascriptHotModuleReplacement.runtime.js +1 -0
- package/lib/hmr/LazyCompilationPlugin.js +32 -24
- package/lib/hmr/lazyCompilationBackend.js +1 -1
- package/lib/ids/DeterministicModuleIdsPlugin.js +1 -1
- package/lib/ids/HashedModuleIdsPlugin.js +2 -1
- package/lib/ids/IdHelpers.js +15 -14
- package/lib/ids/SyncModuleIdsPlugin.js +9 -5
- package/lib/index.js +5 -5
- package/lib/javascript/BasicEvaluatedExpression.js +6 -6
- package/lib/javascript/JavascriptGenerator.js +11 -1
- package/lib/javascript/JavascriptModulesPlugin.js +51 -31
- package/lib/javascript/JavascriptParser.js +272 -188
- package/lib/javascript/JavascriptParserHelpers.js +10 -9
- package/lib/javascript/StartupHelpers.js +4 -1
- package/lib/json/JsonData.js +4 -4
- package/lib/json/JsonGenerator.js +54 -22
- package/lib/json/JsonModulesPlugin.js +16 -2
- package/lib/json/JsonParser.js +8 -4
- package/lib/library/AbstractLibraryPlugin.js +7 -3
- package/lib/library/AssignLibraryPlugin.js +29 -1
- package/lib/library/EnableLibraryPlugin.js +7 -10
- package/lib/library/ExportPropertyLibraryPlugin.js +4 -1
- package/lib/library/ModuleLibraryPlugin.js +121 -15
- package/lib/logging/Logger.js +2 -2
- package/lib/logging/createConsoleLogger.js +4 -4
- package/lib/node/NodeEnvironmentPlugin.js +6 -2
- package/lib/node/ReadFileCompileAsyncWasmPlugin.js +1 -2
- package/lib/node/ReadFileCompileWasmPlugin.js +1 -2
- package/lib/node/nodeConsole.js +3 -1
- package/lib/optimize/AggressiveSplittingPlugin.js +1 -1
- package/lib/optimize/ConcatenatedModule.js +19 -12
- package/lib/optimize/InnerGraph.js +3 -2
- package/lib/optimize/InnerGraphPlugin.js +13 -7
- package/lib/optimize/LimitChunkCountPlugin.js +20 -0
- package/lib/optimize/ModuleConcatenationPlugin.js +10 -7
- package/lib/optimize/RealContentHashPlugin.js +8 -4
- package/lib/optimize/SideEffectsFlagPlugin.js +4 -2
- package/lib/optimize/SplitChunksPlugin.js +87 -65
- package/lib/rules/BasicEffectRulePlugin.js +9 -1
- package/lib/rules/BasicMatcherRulePlugin.js +15 -4
- package/lib/rules/ObjectMatcherRulePlugin.js +12 -3
- package/lib/rules/RuleSetCompiler.js +25 -14
- package/lib/rules/UseEffectRulePlugin.js +47 -17
- package/lib/runtime/GetChunkFilenameRuntimeModule.js +6 -6
- package/lib/schemes/HttpUriPlugin.js +38 -17
- package/lib/serialization/BinaryMiddleware.js +52 -19
- package/lib/serialization/FileMiddleware.js +78 -48
- package/lib/serialization/ObjectMiddleware.js +78 -29
- package/lib/serialization/PlainObjectSerializer.js +1 -1
- package/lib/serialization/Serializer.js +15 -10
- package/lib/serialization/SerializerMiddleware.js +80 -41
- package/lib/serialization/SingleItemMiddleware.js +10 -7
- package/lib/serialization/types.js +1 -1
- package/lib/sharing/ConsumeSharedModule.js +4 -2
- package/lib/sharing/ProvideSharedModule.js +4 -2
- package/lib/sharing/ProvideSharedModuleFactory.js +5 -3
- package/lib/sharing/utils.js +2 -2
- package/lib/stats/DefaultStatsFactoryPlugin.js +80 -78
- package/lib/stats/DefaultStatsPresetPlugin.js +43 -23
- package/lib/stats/DefaultStatsPrinterPlugin.js +85 -43
- package/lib/stats/StatsFactory.js +11 -11
- package/lib/stats/StatsPrinter.js +7 -7
- package/lib/util/ArrayHelpers.js +2 -4
- package/lib/util/ArrayQueue.js +1 -1
- package/lib/util/AsyncQueue.js +4 -4
- package/lib/util/IterableHelpers.js +1 -1
- package/lib/util/LazyBucketSortedSet.js +41 -23
- package/lib/util/LazySet.js +3 -2
- package/lib/util/MapHelpers.js +1 -1
- package/lib/util/ParallelismFactorCalculator.js +1 -1
- package/lib/util/Semaphore.js +3 -3
- package/lib/util/SetHelpers.js +1 -1
- package/lib/util/SortableSet.js +9 -7
- package/lib/util/TupleQueue.js +9 -8
- package/lib/util/TupleSet.js +2 -2
- package/lib/util/WeakTupleMap.js +12 -11
- package/lib/util/binarySearchBounds.js +2 -1
- package/lib/util/cleverMerge.js +84 -54
- package/lib/util/comparators.js +22 -21
- package/lib/util/compileBooleanMatcher.js +3 -3
- package/lib/util/concatenate.js +6 -4
- package/lib/util/create-schema-validation.js +4 -4
- package/lib/util/createHash.js +2 -2
- package/lib/util/deprecation.js +35 -33
- package/lib/util/deterministicGrouping.js +6 -6
- package/lib/util/findGraphRoots.js +1 -1
- package/lib/util/fs.js +39 -39
- package/lib/util/hash/wasm-hash.js +2 -2
- package/lib/util/identifier.js +15 -18
- package/lib/util/makeSerializable.js +1 -1
- package/lib/util/memoize.js +4 -1
- package/lib/util/objectToMap.js +3 -2
- package/lib/util/processAsyncTree.js +2 -2
- package/lib/util/propertyName.js +0 -1
- package/lib/util/registerExternalSerializer.js +15 -18
- package/lib/util/removeBOM.js +25 -0
- package/lib/util/runtime.js +34 -27
- package/lib/util/serialization.js +5 -16
- package/lib/util/smartGrouping.js +3 -3
- package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +3 -3
- package/lib/wasm-async/AsyncWebAssemblyGenerator.js +11 -0
- package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +10 -0
- package/lib/wasm-async/UniversalCompileAsyncWasmPlugin.js +4 -0
- package/lib/wasm-sync/WebAssemblyGenerator.js +28 -12
- package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +10 -0
- package/lib/wasm-sync/WebAssemblyParser.js +9 -4
- package/lib/webworker/ImportScriptsChunkLoadingPlugin.js +3 -0
- package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +30 -25
- package/package.json +19 -17
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +48 -13
- package/schemas/plugins/JsonModulesPluginGenerator.check.d.ts +7 -0
- package/schemas/plugins/JsonModulesPluginGenerator.check.js +6 -0
- package/schemas/plugins/JsonModulesPluginGenerator.json +11 -0
- package/schemas/plugins/SourceMapDevToolPlugin.json +2 -2
- package/types.d.ts +918 -615
- package/lib/library/ModernModuleLibraryPlugin.js +0 -144
@@ -6,22 +6,23 @@
|
|
6
6
|
|
7
7
|
const { Tracer } = require("chrome-trace-event");
|
8
8
|
const {
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
WEBASSEMBLY_MODULE_TYPE_ASYNC,
|
13
|
-
WEBASSEMBLY_MODULE_TYPE_SYNC,
|
9
|
+
JAVASCRIPT_MODULES,
|
10
|
+
CSS_MODULES,
|
11
|
+
WEBASSEMBLY_MODULES,
|
14
12
|
JSON_MODULE_TYPE
|
15
13
|
} = require("../ModuleTypeConstants");
|
16
14
|
const createSchemaValidation = require("../util/create-schema-validation");
|
17
15
|
const { dirname, mkdirpSync } = require("../util/fs");
|
18
16
|
|
17
|
+
/** @typedef {import("tapable").FullTap} FullTap */
|
19
18
|
/** @typedef {import("../../declarations/plugins/debug/ProfilingPlugin").ProfilingPluginOptions} ProfilingPluginOptions */
|
20
19
|
/** @typedef {import("../Compilation")} Compilation */
|
21
20
|
/** @typedef {import("../Compiler")} Compiler */
|
22
21
|
/** @typedef {import("../ContextModuleFactory")} ContextModuleFactory */
|
23
22
|
/** @typedef {import("../ModuleFactory")} ModuleFactory */
|
24
23
|
/** @typedef {import("../NormalModuleFactory")} NormalModuleFactory */
|
24
|
+
/** @typedef {import("../Parser")} Parser */
|
25
|
+
/** @typedef {import("../ResolverFactory")} ResolverFactory */
|
25
26
|
/** @typedef {import("../util/fs").IntermediateFileSystem} IntermediateFileSystem */
|
26
27
|
|
27
28
|
/** @typedef {TODO} Inspector */
|
@@ -42,6 +43,7 @@ try {
|
|
42
43
|
// eslint-disable-next-line n/no-unsupported-features/node-builtins
|
43
44
|
inspector = require("inspector");
|
44
45
|
} catch (_err) {
|
46
|
+
// eslint-disable-next-line no-console
|
45
47
|
console.log("Unable to CPU profile in < node 8.0");
|
46
48
|
}
|
47
49
|
|
@@ -86,19 +88,27 @@ class Profiler {
|
|
86
88
|
|
87
89
|
/**
|
88
90
|
* @param {string} method method name
|
89
|
-
* @param {
|
91
|
+
* @param {Record<string, EXPECTED_ANY>} [params] params
|
90
92
|
* @returns {Promise<TODO>} Promise for the result
|
91
93
|
*/
|
92
94
|
sendCommand(method, params) {
|
93
95
|
if (this.hasSession()) {
|
94
96
|
return new Promise((res, rej) => {
|
95
|
-
this.session.post(
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
97
|
+
this.session.post(
|
98
|
+
method,
|
99
|
+
params,
|
100
|
+
/**
|
101
|
+
* @param {Error | null} err error
|
102
|
+
* @param {object} params params
|
103
|
+
*/
|
104
|
+
(err, params) => {
|
105
|
+
if (err !== null) {
|
106
|
+
rej(err);
|
107
|
+
} else {
|
108
|
+
res(params);
|
109
|
+
}
|
100
110
|
}
|
101
|
-
|
111
|
+
);
|
102
112
|
});
|
103
113
|
}
|
104
114
|
return Promise.resolve();
|
@@ -140,7 +150,7 @@ class Profiler {
|
|
140
150
|
* @property {Tracer} trace instance of Tracer
|
141
151
|
* @property {number} counter Counter
|
142
152
|
* @property {Profiler} profiler instance of Profiler
|
143
|
-
* @property {
|
153
|
+
* @property {(callback: (err?: null | Error) => void) => void} end the end function
|
144
154
|
*/
|
145
155
|
|
146
156
|
/**
|
@@ -242,7 +252,11 @@ class ProfilingPlugin {
|
|
242
252
|
}
|
243
253
|
|
244
254
|
for (const hookName of Object.keys(compiler.resolverFactory.hooks)) {
|
245
|
-
const hook =
|
255
|
+
const hook =
|
256
|
+
compiler.resolverFactory.hooks[
|
257
|
+
/** @type {keyof ResolverFactory["hooks"]} */
|
258
|
+
(hookName)
|
259
|
+
];
|
246
260
|
if (hook) {
|
247
261
|
hook.intercept(makeInterceptorFor("Resolver", tracer)(hookName));
|
248
262
|
}
|
@@ -263,7 +277,9 @@ class ProfilingPlugin {
|
|
263
277
|
"Context Module Factory"
|
264
278
|
);
|
265
279
|
interceptAllParserHooks(normalModuleFactory, tracer);
|
280
|
+
interceptAllGeneratorHooks(normalModuleFactory, tracer);
|
266
281
|
interceptAllJavascriptModulesPluginHooks(compilation, tracer);
|
282
|
+
interceptAllCssModulesPluginHooks(compilation, tracer);
|
267
283
|
}
|
268
284
|
);
|
269
285
|
|
@@ -335,7 +351,7 @@ class ProfilingPlugin {
|
|
335
351
|
}
|
336
352
|
|
337
353
|
/**
|
338
|
-
* @param {
|
354
|
+
* @param {EXPECTED_ANY & { hooks: TODO }} instance instance
|
339
355
|
* @param {Trace} tracer tracer
|
340
356
|
* @param {string} logLabel log label
|
341
357
|
*/
|
@@ -356,12 +372,10 @@ const interceptAllHooksFor = (instance, tracer, logLabel) => {
|
|
356
372
|
*/
|
357
373
|
const interceptAllParserHooks = (moduleFactory, tracer) => {
|
358
374
|
const moduleTypes = [
|
359
|
-
|
360
|
-
JAVASCRIPT_MODULE_TYPE_DYNAMIC,
|
361
|
-
JAVASCRIPT_MODULE_TYPE_ESM,
|
375
|
+
...JAVASCRIPT_MODULES,
|
362
376
|
JSON_MODULE_TYPE,
|
363
|
-
|
364
|
-
|
377
|
+
...WEBASSEMBLY_MODULES,
|
378
|
+
...CSS_MODULES
|
365
379
|
];
|
366
380
|
|
367
381
|
for (const moduleType of moduleTypes) {
|
@@ -373,6 +387,27 @@ const interceptAllParserHooks = (moduleFactory, tracer) => {
|
|
373
387
|
}
|
374
388
|
};
|
375
389
|
|
390
|
+
/**
|
391
|
+
* @param {NormalModuleFactory} moduleFactory normal module factory
|
392
|
+
* @param {Trace} tracer tracer
|
393
|
+
*/
|
394
|
+
const interceptAllGeneratorHooks = (moduleFactory, tracer) => {
|
395
|
+
const moduleTypes = [
|
396
|
+
...JAVASCRIPT_MODULES,
|
397
|
+
JSON_MODULE_TYPE,
|
398
|
+
...WEBASSEMBLY_MODULES,
|
399
|
+
...CSS_MODULES
|
400
|
+
];
|
401
|
+
|
402
|
+
for (const moduleType of moduleTypes) {
|
403
|
+
moduleFactory.hooks.generator
|
404
|
+
.for(moduleType)
|
405
|
+
.tap(PLUGIN_NAME, (parser, parserOpts) => {
|
406
|
+
interceptAllHooksFor(parser, tracer, "Generator");
|
407
|
+
});
|
408
|
+
}
|
409
|
+
};
|
410
|
+
|
376
411
|
/**
|
377
412
|
* @param {Compilation} compilation compilation
|
378
413
|
* @param {Trace} tracer tracer
|
@@ -390,36 +425,53 @@ const interceptAllJavascriptModulesPluginHooks = (compilation, tracer) => {
|
|
390
425
|
);
|
391
426
|
};
|
392
427
|
|
428
|
+
/**
|
429
|
+
* @param {Compilation} compilation compilation
|
430
|
+
* @param {Trace} tracer tracer
|
431
|
+
*/
|
432
|
+
const interceptAllCssModulesPluginHooks = (compilation, tracer) => {
|
433
|
+
interceptAllHooksFor(
|
434
|
+
{
|
435
|
+
hooks: require("../css/CssModulesPlugin").getCompilationHooks(compilation)
|
436
|
+
},
|
437
|
+
tracer,
|
438
|
+
"CssModulesPlugin"
|
439
|
+
);
|
440
|
+
};
|
441
|
+
|
442
|
+
/** @typedef {(...args: EXPECTED_ANY[]) => EXPECTED_ANY | Promise<(...args: EXPECTED_ANY[]) => EXPECTED_ANY>} PluginFunction */
|
443
|
+
|
393
444
|
/**
|
394
445
|
* @param {string} instance instance
|
395
446
|
* @param {Trace} tracer tracer
|
396
|
-
* @returns {TODO} interceptor
|
447
|
+
* @returns {(hookName: string) => TODO} interceptor
|
397
448
|
*/
|
398
449
|
const makeInterceptorFor = (instance, tracer) => hookName => ({
|
450
|
+
/**
|
451
|
+
* @param {FullTap} tapInfo tap info
|
452
|
+
* @returns {FullTap} modified full tap
|
453
|
+
*/
|
399
454
|
register: tapInfo => {
|
400
|
-
const { name, type, fn } = tapInfo;
|
455
|
+
const { name, type, fn: internalFn } = tapInfo;
|
401
456
|
const newFn =
|
402
457
|
// Don't tap our own hooks to ensure stream can close cleanly
|
403
458
|
name === PLUGIN_NAME
|
404
|
-
?
|
459
|
+
? internalFn
|
405
460
|
: makeNewProfiledTapFn(hookName, tracer, {
|
406
461
|
name,
|
407
462
|
type,
|
408
|
-
fn
|
463
|
+
fn: /** @type {PluginFunction} */ (internalFn)
|
409
464
|
});
|
410
465
|
return { ...tapInfo, fn: newFn };
|
411
466
|
}
|
412
467
|
});
|
413
468
|
|
414
|
-
// TODO improve typing
|
415
|
-
/** @typedef {(...args: TODO[]) => void | Promise<TODO>} PluginFunction */
|
416
|
-
|
417
469
|
/**
|
418
470
|
* @param {string} hookName Name of the hook to profile.
|
419
471
|
* @param {Trace} tracer The trace object.
|
420
472
|
* @param {object} options Options for the profiled fn.
|
421
473
|
* @param {string} options.name Plugin name
|
422
|
-
* @param {
|
474
|
+
* @param {"sync" | "async" | "promise"} options.type Plugin type (sync | async | promise)
|
423
475
|
* @param {PluginFunction} options.fn Plugin function
|
424
476
|
* @returns {PluginFunction} Chainable hooked function.
|
425
477
|
*/
|
@@ -435,7 +487,9 @@ const makeNewProfiledTapFn = (hookName, tracer, { name, type, fn }) => {
|
|
435
487
|
id,
|
436
488
|
cat: defaultCategory
|
437
489
|
});
|
438
|
-
const promise =
|
490
|
+
const promise =
|
491
|
+
/** @type {Promise<(...args: EXPECTED_ANY[]) => EXPECTED_ANY>} */
|
492
|
+
(fn(...args));
|
439
493
|
return promise.then(r => {
|
440
494
|
tracer.trace.end({
|
441
495
|
name,
|
@@ -454,14 +508,20 @@ const makeNewProfiledTapFn = (hookName, tracer, { name, type, fn }) => {
|
|
454
508
|
cat: defaultCategory
|
455
509
|
});
|
456
510
|
const callback = args.pop();
|
457
|
-
fn(
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
511
|
+
fn(
|
512
|
+
...args,
|
513
|
+
/**
|
514
|
+
* @param {...EXPECTED_ANY[]} r result
|
515
|
+
*/
|
516
|
+
(...r) => {
|
517
|
+
tracer.trace.end({
|
518
|
+
name,
|
519
|
+
id,
|
520
|
+
cat: defaultCategory
|
521
|
+
});
|
522
|
+
callback(...r);
|
523
|
+
}
|
524
|
+
);
|
465
525
|
};
|
466
526
|
case "sync":
|
467
527
|
return (...args) => {
|
@@ -496,7 +556,7 @@ const makeNewProfiledTapFn = (hookName, tracer, { name, type, fn }) => {
|
|
496
556
|
return r;
|
497
557
|
};
|
498
558
|
default:
|
499
|
-
|
559
|
+
return fn;
|
500
560
|
}
|
501
561
|
};
|
502
562
|
|
@@ -248,7 +248,7 @@ class AMDDefineDependencyParserPlugin {
|
|
248
248
|
* @returns {boolean | undefined} result
|
249
249
|
*/
|
250
250
|
processCallDefine(parser, expr) {
|
251
|
-
/** @type {
|
251
|
+
/** @type {Expression | SpreadElement | undefined} */
|
252
252
|
let array;
|
253
253
|
/** @type {FunctionExpression | ArrowFunctionExpression | CallExpression | Identifier | undefined} */
|
254
254
|
let fn;
|
@@ -385,7 +385,7 @@ class AMDDefineDependencyParserPlugin {
|
|
385
385
|
let inTry;
|
386
386
|
if (fn && isUnboundFunctionExpression(fn)) {
|
387
387
|
inTry = parser.scope.inTry;
|
388
|
-
parser.inScope(fnParams, () => {
|
388
|
+
parser.inScope(/** @type {Identifier[]} */ (fnParams), () => {
|
389
389
|
for (const [name, varInfo] of fnRenames) {
|
390
390
|
parser.setVariable(name, varInfo);
|
391
391
|
}
|
@@ -425,7 +425,10 @@ class AMDDefineDependencyParserPlugin {
|
|
425
425
|
parser.prevStatement = prev;
|
426
426
|
parser.walkStatement(object.body);
|
427
427
|
} else {
|
428
|
-
parser.walkExpression(
|
428
|
+
parser.walkExpression(
|
429
|
+
/** @type {TODO} */
|
430
|
+
(object.body)
|
431
|
+
);
|
429
432
|
}
|
430
433
|
}
|
431
434
|
);
|
@@ -433,7 +436,10 @@ class AMDDefineDependencyParserPlugin {
|
|
433
436
|
parser.walkExpressions(fn.arguments);
|
434
437
|
}
|
435
438
|
} else if (fn || obj) {
|
436
|
-
parser.walkExpression(
|
439
|
+
parser.walkExpression(
|
440
|
+
/** @type {FunctionExpression | ArrowFunctionExpression | CallExpression | ObjectExpression | Identifier} */
|
441
|
+
(fn || obj)
|
442
|
+
);
|
437
443
|
}
|
438
444
|
|
439
445
|
const dep = this.newDefineDependency(
|
@@ -32,6 +32,7 @@ const ConstDependency = require("./ConstDependency");
|
|
32
32
|
const LocalModuleDependency = require("./LocalModuleDependency");
|
33
33
|
const UnsupportedDependency = require("./UnsupportedDependency");
|
34
34
|
|
35
|
+
/** @typedef {import("../../declarations/WebpackOptions").Amd} Amd */
|
35
36
|
/** @typedef {import("../../declarations/WebpackOptions").JavascriptParserOptions} JavascriptParserOptions */
|
36
37
|
/** @typedef {import("../../declarations/WebpackOptions").ModuleOptionsNormalized} ModuleOptions */
|
37
38
|
/** @typedef {import("../Compiler")} Compiler */
|
@@ -41,9 +42,11 @@ const UnsupportedDependency = require("./UnsupportedDependency");
|
|
41
42
|
|
42
43
|
const PLUGIN_NAME = "AMDPlugin";
|
43
44
|
|
45
|
+
/** @typedef {Record<string, TODO>} AmdOptions */
|
46
|
+
|
44
47
|
class AMDPlugin {
|
45
48
|
/**
|
46
|
-
* @param {
|
49
|
+
* @param {AmdOptions} amdOptions the AMD options
|
47
50
|
*/
|
48
51
|
constructor(amdOptions) {
|
49
52
|
this.amdOptions = amdOptions;
|
@@ -140,7 +143,7 @@ class AMDPlugin {
|
|
140
143
|
/**
|
141
144
|
* @param {string} optionExpr option expression
|
142
145
|
* @param {string} rootName root name
|
143
|
-
* @param {
|
146
|
+
* @param {() => TODO} getMembers callback
|
144
147
|
*/
|
145
148
|
const tapOptionsHooks = (optionExpr, rootName, getMembers) => {
|
146
149
|
parser.hooks.expression
|
@@ -7,6 +7,7 @@
|
|
7
7
|
|
8
8
|
const DependencyTemplate = require("../DependencyTemplate");
|
9
9
|
const makeSerializable = require("../util/makeSerializable");
|
10
|
+
const LocalModuleDependency = require("./LocalModuleDependency");
|
10
11
|
const NullDependency = require("./NullDependency");
|
11
12
|
|
12
13
|
/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */
|
@@ -16,7 +17,6 @@ const NullDependency = require("./NullDependency");
|
|
16
17
|
/** @typedef {import("../serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
|
17
18
|
/** @typedef {import("../serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */
|
18
19
|
/** @typedef {import("./AMDRequireItemDependency")} AMDRequireItemDependency */
|
19
|
-
/** @typedef {import("./LocalModuleDependency")} LocalModuleDependency */
|
20
20
|
|
21
21
|
class AMDRequireArrayDependency extends NullDependency {
|
22
22
|
/**
|
@@ -96,7 +96,7 @@ AMDRequireArrayDependency.Template = class AMDRequireArrayDependencyTemplate ext
|
|
96
96
|
}
|
97
97
|
|
98
98
|
/**
|
99
|
-
* @param {
|
99
|
+
* @param {string | LocalModuleDependency | AMDRequireItemDependency} dep the dependency for which the template should be applied
|
100
100
|
* @param {DependencyTemplateContext} templateContext the context object
|
101
101
|
* @returns {string} content
|
102
102
|
*/
|
@@ -108,9 +108,10 @@ AMDRequireArrayDependency.Template = class AMDRequireArrayDependencyTemplate ext
|
|
108
108
|
return dep;
|
109
109
|
}
|
110
110
|
|
111
|
-
if (dep
|
111
|
+
if (dep instanceof LocalModuleDependency) {
|
112
112
|
return dep.localModule.variableName();
|
113
113
|
}
|
114
|
+
|
114
115
|
return runtimeTemplate.moduleExports({
|
115
116
|
module: moduleGraph.getModule(dep),
|
116
117
|
chunkGraph,
|
@@ -11,10 +11,11 @@ const ContextDependency = require("./ContextDependency");
|
|
11
11
|
/** @typedef {import("../javascript/JavascriptParser").Range} Range */
|
12
12
|
/** @typedef {import("../serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
|
13
13
|
/** @typedef {import("../serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */
|
14
|
+
/** @typedef {import("./ContextDependency").ContextDependencyOptions} ContextDependencyOptions */
|
14
15
|
|
15
16
|
class AMDRequireContextDependency extends ContextDependency {
|
16
17
|
/**
|
17
|
-
* @param {
|
18
|
+
* @param {ContextDependencyOptions} options options
|
18
19
|
* @param {Range} range range
|
19
20
|
* @param {Range} valueRange value range
|
20
21
|
*/
|
@@ -104,7 +104,7 @@ class AMDRequireDependenciesBlockParserPlugin {
|
|
104
104
|
} else if (param.isConstArray()) {
|
105
105
|
/** @type {(string | LocalModuleDependency | AMDRequireItemDependency)[]} */
|
106
106
|
const deps = [];
|
107
|
-
for (const request of /** @type {
|
107
|
+
for (const request of /** @type {EXPECTED_ANY[]} */ (param.array)) {
|
108
108
|
let dep;
|
109
109
|
let localModule;
|
110
110
|
if (request === "require") {
|
@@ -158,20 +158,27 @@ class AMDRequireDependenciesBlockParserPlugin {
|
|
158
158
|
if (param.string === "require") {
|
159
159
|
dep = new ConstDependency(
|
160
160
|
RuntimeGlobals.require,
|
161
|
-
/** @type {TODO} */
|
161
|
+
/** @type {TODO} */
|
162
|
+
(param.string),
|
162
163
|
[RuntimeGlobals.require]
|
163
164
|
);
|
164
165
|
} else if (param.string === "module") {
|
165
166
|
dep = new ConstDependency(
|
166
|
-
/** @type {
|
167
|
-
(
|
167
|
+
/** @type {string} */
|
168
|
+
(
|
169
|
+
/** @type {BuildInfo} */
|
170
|
+
(parser.state.module.buildInfo).moduleArgument
|
171
|
+
),
|
168
172
|
/** @type {Range} */ (param.range),
|
169
173
|
[RuntimeGlobals.module]
|
170
174
|
);
|
171
175
|
} else if (param.string === "exports") {
|
172
176
|
dep = new ConstDependency(
|
173
|
-
/** @type {
|
174
|
-
(
|
177
|
+
/** @type {string} */
|
178
|
+
(
|
179
|
+
/** @type {BuildInfo} */
|
180
|
+
(parser.state.module.buildInfo).exportsArgument
|
181
|
+
),
|
175
182
|
/** @type {Range} */ (param.range),
|
176
183
|
[RuntimeGlobals.exports]
|
177
184
|
);
|
@@ -208,7 +215,8 @@ class AMDRequireDependenciesBlockParserPlugin {
|
|
208
215
|
processContext(parser, expr, param) {
|
209
216
|
const dep = ContextDependencyHelpers.create(
|
210
217
|
AMDRequireContextDependency,
|
211
|
-
/** @type {Range} */
|
218
|
+
/** @type {Range} */
|
219
|
+
(param.range),
|
212
220
|
param,
|
213
221
|
expr,
|
214
222
|
this.options,
|
@@ -8,6 +8,8 @@ const RuntimeGlobals = require("../RuntimeGlobals");
|
|
8
8
|
const RuntimeModule = require("../RuntimeModule");
|
9
9
|
const Template = require("../Template");
|
10
10
|
|
11
|
+
/** @typedef {import("./AMDPlugin").AmdOptions} AmdOptions */
|
12
|
+
|
11
13
|
class AMDDefineRuntimeModule extends RuntimeModule {
|
12
14
|
constructor() {
|
13
15
|
super("amd define");
|
@@ -27,7 +29,7 @@ class AMDDefineRuntimeModule extends RuntimeModule {
|
|
27
29
|
|
28
30
|
class AMDOptionsRuntimeModule extends RuntimeModule {
|
29
31
|
/**
|
30
|
-
* @param {
|
32
|
+
* @param {AmdOptions} options the AMD options
|
31
33
|
*/
|
32
34
|
constructor(options) {
|
33
35
|
super("amd options");
|
@@ -71,9 +71,7 @@ class CommonJsExportRequireDependency extends ModuleDependency {
|
|
71
71
|
* @returns {string[]} the imported id
|
72
72
|
*/
|
73
73
|
getIds(moduleGraph) {
|
74
|
-
return (
|
75
|
-
/** @type {TODO} */ (moduleGraph.getMeta(this))[idsSymbol] || this.ids
|
76
|
-
);
|
74
|
+
return moduleGraph.getMeta(this)[idsSymbol] || this.ids;
|
77
75
|
}
|
78
76
|
|
79
77
|
/**
|
@@ -82,7 +80,7 @@ class CommonJsExportRequireDependency extends ModuleDependency {
|
|
82
80
|
* @returns {void}
|
83
81
|
*/
|
84
82
|
setIds(moduleGraph, ids) {
|
85
|
-
|
83
|
+
moduleGraph.getMeta(this)[idsSymbol] = ids;
|
86
84
|
}
|
87
85
|
|
88
86
|
/**
|
@@ -190,7 +188,8 @@ class CommonJsExportRequireDependency extends ModuleDependency {
|
|
190
188
|
if (reexportInfo) {
|
191
189
|
return {
|
192
190
|
exports: Array.from(
|
193
|
-
/** @type {
|
191
|
+
/** @type {Set<string>} */
|
192
|
+
(reexportInfo.exports),
|
194
193
|
name => ({
|
195
194
|
name,
|
196
195
|
from,
|
@@ -44,16 +44,16 @@ const ModuleDecoratorDependency = require("./ModuleDecoratorDependency");
|
|
44
44
|
* exports.foo = void 0;
|
45
45
|
* exports.foo = "bar";
|
46
46
|
* ```
|
47
|
-
* @param {
|
47
|
+
* @param {Expression} expr expression
|
48
48
|
* @returns {Expression | undefined} returns the value of property descriptor
|
49
49
|
*/
|
50
50
|
const getValueOfPropertyDescription = expr => {
|
51
51
|
if (expr.type !== "ObjectExpression") return;
|
52
52
|
for (const property of expr.properties) {
|
53
|
-
if (property.computed) continue;
|
53
|
+
if (property.type === "SpreadElement" || property.computed) continue;
|
54
54
|
const key = property.key;
|
55
55
|
if (key.type !== "Identifier" || key.name !== "value") continue;
|
56
|
-
return property.value;
|
56
|
+
return /** @type {Expression} */ (property.value);
|
57
57
|
}
|
58
58
|
};
|
59
59
|
|
@@ -11,6 +11,7 @@ const RuntimeGlobals = require("../RuntimeGlobals");
|
|
11
11
|
const UnsupportedFeatureWarning = require("../UnsupportedFeatureWarning");
|
12
12
|
const WebpackError = require("../WebpackError");
|
13
13
|
const BasicEvaluatedExpression = require("../javascript/BasicEvaluatedExpression");
|
14
|
+
const { VariableInfo } = require("../javascript/JavascriptParser");
|
14
15
|
const {
|
15
16
|
evaluateToIdentifier,
|
16
17
|
evaluateToString,
|
@@ -201,9 +202,9 @@ class CommonJsImportsParserPlugin {
|
|
201
202
|
const requireAsExpressionHandler = expr => {
|
202
203
|
const dep = new CommonJsRequireContextDependency(
|
203
204
|
{
|
204
|
-
request: options.unknownContextRequest,
|
205
|
-
recursive: options.unknownContextRecursive,
|
206
|
-
regExp: options.unknownContextRegExp,
|
205
|
+
request: /** @type {string} */ (options.unknownContextRequest),
|
206
|
+
recursive: /** @type {boolean} */ (options.unknownContextRecursive),
|
207
|
+
regExp: /** @type {TODO} */ (options.unknownContextRegExp),
|
207
208
|
mode: "sync"
|
208
209
|
},
|
209
210
|
/** @type {Range} */ (expr.range),
|
@@ -729,11 +730,11 @@ class CommonJsImportsParserPlugin {
|
|
729
730
|
declarator.init.callee.type !== "Identifier"
|
730
731
|
)
|
731
732
|
return;
|
732
|
-
const variableInfo =
|
733
|
-
|
734
|
-
|
733
|
+
const variableInfo = parser.getVariableInfo(
|
734
|
+
declarator.init.callee.name
|
735
|
+
);
|
735
736
|
if (
|
736
|
-
variableInfo &&
|
737
|
+
variableInfo instanceof VariableInfo &&
|
737
738
|
variableInfo.tagInfo &&
|
738
739
|
variableInfo.tagInfo.tag === createRequireSpecifierTag
|
739
740
|
) {
|
@@ -12,10 +12,11 @@ const ContextDependencyTemplateAsRequireCall = require("./ContextDependencyTempl
|
|
12
12
|
/** @typedef {import("../javascript/JavascriptParser").Range} Range */
|
13
13
|
/** @typedef {import("../serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
|
14
14
|
/** @typedef {import("../serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */
|
15
|
+
/** @typedef {import("./ContextDependency").ContextDependencyOptions} ContextDependencyOptions */
|
15
16
|
|
16
17
|
class CommonJsRequireContextDependency extends ContextDependency {
|
17
18
|
/**
|
18
|
-
* @param {
|
19
|
+
* @param {ContextDependencyOptions} options options for the context module
|
19
20
|
* @param {Range} range location in source code
|
20
21
|
* @param {Range | undefined} valueRange location of the require call
|
21
22
|
* @param {boolean | string } inShorthand true or name
|
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
const { parseResource } = require("../util/identifier");
|
9
9
|
|
10
|
-
/** @typedef {import("estree").
|
10
|
+
/** @typedef {import("estree").Expression} Expression */
|
11
11
|
/** @typedef {import("../../declarations/WebpackOptions").JavascriptParserOptions} JavascriptParserOptions */
|
12
12
|
/** @typedef {import("../../declarations/WebpackOptions").ModuleOptionsNormalized} ModuleOptions */
|
13
13
|
/** @typedef {import("../Dependency").DependencyLocation} DependencyLocation */
|
@@ -48,11 +48,11 @@ const splitContextFromPrefix = prefix => {
|
|
48
48
|
* @param {ContextDependencyConstructor} Dep the Dependency class
|
49
49
|
* @param {Range} range source range
|
50
50
|
* @param {BasicEvaluatedExpression} param context param
|
51
|
-
* @param {
|
51
|
+
* @param {Expression} expr expr
|
52
52
|
* @param {Pick<JavascriptParserOptions, `${"expr"|"wrapped"}Context${"Critical"|"Recursive"|"RegExp"}` | "exprContextRequest">} options options for context creation
|
53
53
|
* @param {PartialContextDependencyOptions} contextOptions options for the ContextModule
|
54
54
|
* @param {JavascriptParser} parser the parser
|
55
|
-
* @param {...
|
55
|
+
* @param {...EXPECTED_ANY} depArgs depArgs
|
56
56
|
* @returns {ContextDependency} the created Dependency
|
57
57
|
*/
|
58
58
|
module.exports.create = (
|
@@ -164,7 +164,10 @@ module.exports.create = (
|
|
164
164
|
});
|
165
165
|
} else {
|
166
166
|
// Expression
|
167
|
-
parser.walkExpression(
|
167
|
+
parser.walkExpression(
|
168
|
+
/** @type {Expression} */
|
169
|
+
(part.expression)
|
170
|
+
);
|
168
171
|
}
|
169
172
|
}
|
170
173
|
|
@@ -233,7 +236,11 @@ module.exports.create = (
|
|
233
236
|
|
234
237
|
if (parser && param.wrappedInnerExpressions) {
|
235
238
|
for (const part of param.wrappedInnerExpressions) {
|
236
|
-
if (part.expression)
|
239
|
+
if (part.expression)
|
240
|
+
parser.walkExpression(
|
241
|
+
/** @type {Expression} */
|
242
|
+
(part.expression)
|
243
|
+
);
|
237
244
|
}
|
238
245
|
}
|
239
246
|
|
@@ -256,7 +263,7 @@ module.exports.create = (
|
|
256
263
|
options.exprContextCritical &&
|
257
264
|
"the request of a dependency is an expression";
|
258
265
|
|
259
|
-
parser.walkExpression(param.expression);
|
266
|
+
parser.walkExpression(/** @type {Expression} */ (param.expression));
|
260
267
|
|
261
268
|
return dep;
|
262
269
|
};
|
@@ -58,10 +58,12 @@ class CssIcssExportDependency extends NullDependency {
|
|
58
58
|
*/
|
59
59
|
getExports(moduleGraph) {
|
60
60
|
const module = /** @type {CssModule} */ (moduleGraph.getParentModule(this));
|
61
|
-
const
|
62
|
-
|
63
|
-
|
64
|
-
|
61
|
+
const generator = /** @type {CssGenerator} */ (module.generator);
|
62
|
+
const names = this.getExportsConventionNames(
|
63
|
+
this.name,
|
64
|
+
/** @type {CssGeneratorExportsConvention} */
|
65
|
+
(generator.convention)
|
66
|
+
);
|
65
67
|
return {
|
66
68
|
exports: names.map(name => ({
|
67
69
|
name,
|
@@ -82,12 +84,11 @@ class CssIcssExportDependency extends NullDependency {
|
|
82
84
|
const module =
|
83
85
|
/** @type {CssModule} */
|
84
86
|
(chunkGraph.moduleGraph.getParentModule(this));
|
85
|
-
const generator =
|
86
|
-
/** @type {CssGenerator} */
|
87
|
-
(module.generator);
|
87
|
+
const generator = /** @type {CssGenerator} */ (module.generator);
|
88
88
|
const names = this.getExportsConventionNames(
|
89
89
|
this.name,
|
90
|
-
|
90
|
+
/** @type {CssGeneratorExportsConvention} */
|
91
|
+
(generator.convention)
|
91
92
|
);
|
92
93
|
this._hashUpdate = JSON.stringify(names);
|
93
94
|
}
|
@@ -128,10 +129,12 @@ CssIcssExportDependency.Template = class CssIcssExportDependencyTemplate extends
|
|
128
129
|
apply(dependency, source, { cssData, module: m, runtime, moduleGraph }) {
|
129
130
|
const dep = /** @type {CssIcssExportDependency} */ (dependency);
|
130
131
|
const module = /** @type {CssModule} */ (m);
|
131
|
-
const
|
132
|
-
|
133
|
-
|
134
|
-
|
132
|
+
const generator = /** @type {CssGenerator} */ (module.generator);
|
133
|
+
const names = dep.getExportsConventionNames(
|
134
|
+
dep.name,
|
135
|
+
/** @type {CssGeneratorExportsConvention} */
|
136
|
+
(generator.convention)
|
137
|
+
);
|
135
138
|
const usedNames =
|
136
139
|
/** @type {string[]} */
|
137
140
|
(
|