@rspack-debug/core 1.6.6 → 1.7.0-beta.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/dist/Compilation.d.ts +25 -5
- package/dist/Resolver.d.ts +2 -2
- package/dist/RuntimeGlobals.d.ts +106 -78
- package/dist/builtin-plugin/css-extract/loader.d.ts +4 -4
- package/dist/builtin-plugin/lazy-compilation/middleware.d.ts +8 -0
- package/dist/config/normalization.d.ts +10 -1
- package/dist/config/types.d.ts +23 -3
- package/dist/cssExtractHmr.js +2 -2
- package/dist/cssExtractLoader.js +4 -4
- package/dist/exports.d.ts +9 -1
- package/dist/index.js +371 -218
- package/dist/lib/EntryOptionPlugin.d.ts +1 -1
- package/dist/util/fake.d.ts +6 -1
- package/dist/worker.js +11 -11
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
"../../node_modules/.pnpm/enhanced-resolve@5.18.3/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js"
|
|
3
|
+
"../../node_modules/.pnpm/enhanced-resolve@5.18.3/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js" (module1, __unused_webpack_exports, __webpack_require__) {
|
|
4
4
|
let { nextTick } = __webpack_require__("process"), dirname = (path)=>{
|
|
5
5
|
let idx = path.length - 1;
|
|
6
6
|
for(; idx >= 0;){
|
|
@@ -205,43 +205,43 @@ var __webpack_modules__ = {
|
|
|
205
205
|
}
|
|
206
206
|
};
|
|
207
207
|
},
|
|
208
|
-
"browserslist-load-config"
|
|
208
|
+
"browserslist-load-config" (module1) {
|
|
209
209
|
module1.exports = require("../compiled/browserslist-load-config/index.js");
|
|
210
210
|
},
|
|
211
|
-
watchpack
|
|
211
|
+
watchpack (module1) {
|
|
212
212
|
module1.exports = require("../compiled/watchpack/index.js");
|
|
213
213
|
},
|
|
214
|
-
"webpack-sources"
|
|
214
|
+
"webpack-sources" (module1) {
|
|
215
215
|
module1.exports = require("../compiled/webpack-sources/index.js");
|
|
216
216
|
},
|
|
217
|
-
"./moduleFederationDefaultRuntime.js"
|
|
217
|
+
"./moduleFederationDefaultRuntime.js" (module1) {
|
|
218
218
|
module1.exports = require("./moduleFederationDefaultRuntime.js");
|
|
219
219
|
},
|
|
220
|
-
"@rspack/binding"
|
|
220
|
+
"@rspack/binding" (module1) {
|
|
221
221
|
module1.exports = require(process.env.RSPACK_BINDING ? process.env.RSPACK_BINDING : "@rspack/binding");
|
|
222
222
|
},
|
|
223
|
-
"node:crypto"
|
|
223
|
+
"node:crypto" (module1) {
|
|
224
224
|
module1.exports = require("node:crypto");
|
|
225
225
|
},
|
|
226
|
-
"node:http"
|
|
226
|
+
"node:http" (module1) {
|
|
227
227
|
module1.exports = require("node:http");
|
|
228
228
|
},
|
|
229
|
-
"node:https"
|
|
229
|
+
"node:https" (module1) {
|
|
230
230
|
module1.exports = require("node:https");
|
|
231
231
|
},
|
|
232
|
-
"node:os"
|
|
232
|
+
"node:os" (module1) {
|
|
233
233
|
module1.exports = require("node:os");
|
|
234
234
|
},
|
|
235
|
-
"node:url"
|
|
235
|
+
"node:url" (module1) {
|
|
236
236
|
module1.exports = require("node:url");
|
|
237
237
|
},
|
|
238
|
-
"node:vm"
|
|
238
|
+
"node:vm" (module1) {
|
|
239
239
|
module1.exports = require("node:vm");
|
|
240
240
|
},
|
|
241
|
-
"node:zlib"
|
|
241
|
+
"node:zlib" (module1) {
|
|
242
242
|
module1.exports = require("node:zlib");
|
|
243
243
|
},
|
|
244
|
-
process
|
|
244
|
+
process (module1) {
|
|
245
245
|
module1.exports = require("process");
|
|
246
246
|
}
|
|
247
247
|
}, __webpack_module_cache__ = {};
|
|
@@ -271,7 +271,7 @@ __webpack_require__.n = (module1)=>{
|
|
|
271
271
|
});
|
|
272
272
|
};
|
|
273
273
|
var __webpack_exports__ = {};
|
|
274
|
-
for(var
|
|
274
|
+
for(var __rspack_i in (()=>{
|
|
275
275
|
let createMd4, createXxhash64, service_pool, loadLoader_url;
|
|
276
276
|
__webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_exports__, {
|
|
277
277
|
EntryPlugin: ()=>EntryPlugin,
|
|
@@ -297,6 +297,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
297
297
|
EvalDevToolModulePlugin: ()=>EvalDevToolModulePlugin,
|
|
298
298
|
NormalModuleReplacementPlugin: ()=>NormalModuleReplacementPlugin,
|
|
299
299
|
WebpackOptionsApply: ()=>RspackOptionsApply,
|
|
300
|
+
lazyCompilationMiddleware: ()=>lazyCompilationMiddleware,
|
|
300
301
|
EnvironmentPlugin: ()=>EnvironmentPlugin,
|
|
301
302
|
HotModuleReplacementPlugin: ()=>HotModuleReplacementPlugin,
|
|
302
303
|
Compilation: ()=>Compilation,
|
|
@@ -329,9 +330,10 @@ for(var __webpack_i__ in (()=>{
|
|
|
329
330
|
ModuleFilenameHelpers: ()=>ModuleFilenameHelpers_namespaceObject,
|
|
330
331
|
MultiCompiler: ()=>MultiCompiler,
|
|
331
332
|
SourceMapDevToolPlugin: ()=>SourceMapDevToolPlugin,
|
|
333
|
+
SubresourceIntegrityPlugin: ()=>SubresourceIntegrityPlugin,
|
|
332
334
|
library: ()=>exports_library,
|
|
335
|
+
RuntimeGlobals: ()=>DefaultRuntimeGlobals,
|
|
333
336
|
node: ()=>exports_node,
|
|
334
|
-
RuntimeGlobals: ()=>RuntimeGlobals,
|
|
335
337
|
rspackVersion: ()=>exports_rspackVersion,
|
|
336
338
|
util: ()=>util,
|
|
337
339
|
optimize: ()=>optimize,
|
|
@@ -344,7 +346,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
344
346
|
wasm: ()=>exports_wasm,
|
|
345
347
|
ProgressPlugin: ()=>ProgressPlugin
|
|
346
348
|
});
|
|
347
|
-
var StatsErrorCode, _computedKey, _computedKey1, _computedKey2, ArrayQueue_computedKey, browserslistTargetHandler_namespaceObject = {};
|
|
349
|
+
var RuntimeGlobals, StatsErrorCode, _computedKey, _computedKey1, _computedKey2, ArrayQueue_computedKey, browserslistTargetHandler_namespaceObject = {};
|
|
348
350
|
__webpack_require__.r(browserslistTargetHandler_namespaceObject), __webpack_require__.d(browserslistTargetHandler_namespaceObject, {
|
|
349
351
|
resolve: ()=>browserslistTargetHandler_resolve
|
|
350
352
|
});
|
|
@@ -395,12 +397,13 @@ for(var __webpack_i__ in (()=>{
|
|
|
395
397
|
ProgressPlugin: ()=>ProgressPlugin,
|
|
396
398
|
ProvidePlugin: ()=>ProvidePlugin,
|
|
397
399
|
RspackOptionsApply: ()=>RspackOptionsApply,
|
|
398
|
-
RuntimeGlobals: ()=>
|
|
400
|
+
RuntimeGlobals: ()=>DefaultRuntimeGlobals,
|
|
399
401
|
RuntimeModule: ()=>RuntimeModule,
|
|
400
402
|
RuntimePlugin: ()=>RuntimePlugin,
|
|
401
403
|
SourceMapDevToolPlugin: ()=>SourceMapDevToolPlugin,
|
|
402
404
|
Stats: ()=>Stats,
|
|
403
405
|
StatsErrorCode: ()=>statsFactoryUtils_StatsErrorCode,
|
|
406
|
+
SubresourceIntegrityPlugin: ()=>SubresourceIntegrityPlugin,
|
|
404
407
|
SwcJsMinimizerRspackPlugin: ()=>SwcJsMinimizerRspackPlugin,
|
|
405
408
|
Template: ()=>Template,
|
|
406
409
|
ValidationError: ()=>ValidationError,
|
|
@@ -412,6 +415,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
412
415
|
electron: ()=>electron,
|
|
413
416
|
experiments: ()=>exports_experiments,
|
|
414
417
|
javascript: ()=>javascript,
|
|
418
|
+
lazyCompilationMiddleware: ()=>lazyCompilationMiddleware,
|
|
415
419
|
library: ()=>exports_library,
|
|
416
420
|
node: ()=>exports_node,
|
|
417
421
|
optimize: ()=>optimize,
|
|
@@ -1185,20 +1189,35 @@ for(var __webpack_i__ in (()=>{
|
|
|
1185
1189
|
}
|
|
1186
1190
|
}
|
|
1187
1191
|
function createFakeCompilationDependencies(getDeps, addDeps) {
|
|
1188
|
-
let addDepsCaller = new MergeCaller(addDeps)
|
|
1192
|
+
let addDepsCaller = new MergeCaller(addDeps), deletedDeps = new Set(), hasDep = (dep)=>!deletedDeps.has(dep) && (addDepsCaller.pendingData().includes(dep) || getDeps().includes(dep)), getAllDeps = ()=>{
|
|
1193
|
+
let deps = new Set([
|
|
1194
|
+
...getDeps(),
|
|
1195
|
+
...addDepsCaller.pendingData()
|
|
1196
|
+
]);
|
|
1197
|
+
for (let deleted of deletedDeps)deps.delete(deleted);
|
|
1198
|
+
return deps;
|
|
1199
|
+
};
|
|
1189
1200
|
return {
|
|
1190
1201
|
*[Symbol.iterator] () {
|
|
1191
|
-
for (let dep of
|
|
1192
|
-
...getDeps(),
|
|
1193
|
-
...addDepsCaller.pendingData()
|
|
1194
|
-
]))yield dep;
|
|
1202
|
+
for (let dep of getAllDeps())yield dep;
|
|
1195
1203
|
},
|
|
1196
|
-
has:
|
|
1204
|
+
has: hasDep,
|
|
1197
1205
|
add: (dep)=>{
|
|
1198
|
-
addDepsCaller.push(dep);
|
|
1206
|
+
deletedDeps.delete(dep), addDepsCaller.push(dep);
|
|
1199
1207
|
},
|
|
1200
1208
|
addAll: (deps)=>{
|
|
1209
|
+
for (let dep of deps)deletedDeps.delete(dep);
|
|
1201
1210
|
addDepsCaller.push(...deps);
|
|
1211
|
+
},
|
|
1212
|
+
delete: (dep)=>{
|
|
1213
|
+
let hadDep = hasDep(dep);
|
|
1214
|
+
return hadDep && deletedDeps.add(dep), hadDep;
|
|
1215
|
+
},
|
|
1216
|
+
keys: ()=>getAllDeps().keys(),
|
|
1217
|
+
values: ()=>getAllDeps().values(),
|
|
1218
|
+
entries: ()=>getAllDeps().entries(),
|
|
1219
|
+
get size () {
|
|
1220
|
+
return getAllDeps().size;
|
|
1202
1221
|
}
|
|
1203
1222
|
};
|
|
1204
1223
|
}
|
|
@@ -1476,7 +1495,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
1476
1495
|
processAssetsHook.tap(getOptions(options), ()=>fn(...getArgs()));
|
|
1477
1496
|
},
|
|
1478
1497
|
tapAsync: (options, fn)=>{
|
|
1479
|
-
processAssetsHook.tapAsync(getOptions(options), (
|
|
1498
|
+
processAssetsHook.tapAsync(getOptions(options), (_assets, callback)=>fn(...getArgs(), callback));
|
|
1480
1499
|
},
|
|
1481
1500
|
tapPromise: (options, fn)=>{
|
|
1482
1501
|
processAssetsHook.tapPromise(getOptions(options), ()=>fn(...getArgs()));
|
|
@@ -2169,7 +2188,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
2169
2188
|
for (let entry of desc.import)new EntryPlugin(context, entry, options).apply(compiler);
|
|
2170
2189
|
}
|
|
2171
2190
|
}
|
|
2172
|
-
static entryDescriptionToOptions(
|
|
2191
|
+
static entryDescriptionToOptions(_compiler, name, desc) {
|
|
2173
2192
|
return {
|
|
2174
2193
|
name,
|
|
2175
2194
|
filename: desc.filename,
|
|
@@ -2192,13 +2211,13 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
2192
2211
|
} : options)
|
|
2193
2212
|
}), "make");
|
|
2194
2213
|
function getRawEntryOptions(entry) {
|
|
2195
|
-
let runtime = entry.runtime, chunkLoading = entry.chunkLoading;
|
|
2196
2214
|
return {
|
|
2197
2215
|
name: entry.name,
|
|
2198
2216
|
publicPath: entry.publicPath,
|
|
2199
2217
|
baseUri: entry.baseUri,
|
|
2200
|
-
runtime,
|
|
2201
|
-
chunkLoading,
|
|
2218
|
+
runtime: entry.runtime,
|
|
2219
|
+
chunkLoading: entry.chunkLoading,
|
|
2220
|
+
wasmLoading: entry.wasmLoading,
|
|
2202
2221
|
asyncChunks: entry.asyncChunks,
|
|
2203
2222
|
filename: entry.filename,
|
|
2204
2223
|
library: entry.library,
|
|
@@ -2287,7 +2306,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
2287
2306
|
var config;
|
|
2288
2307
|
let err, logger = compiler.getInfrastructureLogger(EsmLibraryPlugin.PLUGIN_NAME);
|
|
2289
2308
|
if (!function(options, logger) {
|
|
2290
|
-
options.optimization.concatenateModules = !1, options.output.chunkFormat = !1, options.output.chunkLoading && "import" !== options.output.chunkLoading && (logger.warn(`\`output.chunkLoading\` should be \`"import"\` or \`false\`, but got ${options.output.chunkLoading}, changed it to \`"import"\``), options.output.chunkLoading = "import"), void 0 === options.output.chunkLoading && (options.output.chunkLoading = "import"), options.output.library && (options.output.library = void 0);
|
|
2309
|
+
options.optimization.concatenateModules = !1, options.optimization.removeEmptyChunks = !1, options.output.chunkFormat = !1, options.output.chunkLoading && "import" !== options.output.chunkLoading && (logger.warn(`\`output.chunkLoading\` should be \`"import"\` or \`false\`, but got ${options.output.chunkLoading}, changed it to \`"import"\``), options.output.chunkLoading = "import"), void 0 === options.output.chunkLoading && (options.output.chunkLoading = "import"), options.output.library && (options.output.library = void 0);
|
|
2291
2310
|
let { splitChunks } = options.optimization;
|
|
2292
2311
|
void 0 === splitChunks && (splitChunks = options.optimization.splitChunks = {}), !1 !== splitChunks && (splitChunks.chunks = "all", splitChunks.minSize = 0, splitChunks.maxAsyncRequests = 1 / 0, splitChunks.maxInitialRequests = 1 / 0, splitChunks.cacheGroups ??= {}, splitChunks.cacheGroups.default = !1, splitChunks.cacheGroups.defaultVendors = !1);
|
|
2293
2312
|
}(compiler.options, logger), new RemoveDuplicateModulesPlugin().apply(compiler), err = (config = compiler.options).optimization.concatenateModules ? "You should disable `config.optimization.concatenateModules`" : !1 !== config.output.chunkFormat ? "You should disable default chunkFormat by `config.output.chunkFormat = false`" : void 0) throw new src_0.WebpackError(`Conflicted config for ${EsmLibraryPlugin.PLUGIN_NAME}: ${err}`);
|
|
@@ -3973,7 +3992,6 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
3973
3992
|
commonjs: parser.commonjs,
|
|
3974
3993
|
importDynamic: parser.importDynamic,
|
|
3975
3994
|
commonjsMagicComments: parser.commonjsMagicComments,
|
|
3976
|
-
inlineConst: parser.inlineConst,
|
|
3977
3995
|
typeReexportsPresence: parser.typeReexportsPresence,
|
|
3978
3996
|
jsx: parser.jsx,
|
|
3979
3997
|
deferImport: parser.deferImport
|
|
@@ -4442,7 +4460,36 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
4442
4460
|
currentActiveModules
|
|
4443
4461
|
}), "thisCompilation"), LAZY_COMPILATION_PREFIX = "/lazy-compilation-using-", noop = (_req, _res, next)=>{
|
|
4444
4462
|
"function" == typeof next && next();
|
|
4445
|
-
}, DEPRECATED_LAZY_COMPILATION_OPTIONS_WARN = "The `experiments.lazyCompilation` option is deprecated, please use the configuration top level `lazyCompilation` instead.", REPEAT_LAZY_COMPILATION_OPTIONS_WARN = "Both top-level `lazyCompilation` and `experiments.lazyCompilation` options are set. The top-level `lazyCompilation` configuration will take precedence."
|
|
4463
|
+
}, DEPRECATED_LAZY_COMPILATION_OPTIONS_WARN = "The `experiments.lazyCompilation` option is deprecated, please use the configuration top level `lazyCompilation` instead.", REPEAT_LAZY_COMPILATION_OPTIONS_WARN = "Both top-level `lazyCompilation` and `experiments.lazyCompilation` options are set. The top-level `lazyCompilation` configuration will take precedence.", lazyCompilationMiddleware = (compiler)=>{
|
|
4464
|
+
if (compiler instanceof MultiCompiler) {
|
|
4465
|
+
let middlewareByCompiler = new Map(), i = 0, isReportDeprecatedWarned = !1, isReportRepeatWarned = !1;
|
|
4466
|
+
for (let c of compiler.compilers){
|
|
4467
|
+
if (c.options.experiments.lazyCompilation && (c.name ? console.warn(`The 'experiments.lazyCompilation' option in compiler named '${c.name}' is deprecated, please use the Configuration top level 'lazyCompilation' instead.`) : isReportDeprecatedWarned || (console.warn(DEPRECATED_LAZY_COMPILATION_OPTIONS_WARN), isReportDeprecatedWarned = !0)), c.options.lazyCompilation && c.options.experiments.lazyCompilation && (c.name ? console.warn(`The top-level 'lazyCompilation' option in compiler named '${c.name}' will override the 'experiments.lazyCompilation' option.`) : isReportRepeatWarned || (console.warn(REPEAT_LAZY_COMPILATION_OPTIONS_WARN), isReportRepeatWarned = !0)), !c.options.lazyCompilation && !c.options.experiments.lazyCompilation) continue;
|
|
4468
|
+
let options = {
|
|
4469
|
+
...c.options.experiments.lazyCompilation,
|
|
4470
|
+
...c.options.lazyCompilation
|
|
4471
|
+
}, prefix = options.prefix || LAZY_COMPILATION_PREFIX;
|
|
4472
|
+
options.prefix = `${prefix}__${i++}`;
|
|
4473
|
+
let activeModules = new Set();
|
|
4474
|
+
middlewareByCompiler.set(options.prefix, lazyCompilationMiddlewareInternal(compiler, activeModules, options.prefix)), applyPlugin(c, options, activeModules);
|
|
4475
|
+
}
|
|
4476
|
+
let keys = [
|
|
4477
|
+
...middlewareByCompiler.keys()
|
|
4478
|
+
];
|
|
4479
|
+
return (req, res, next)=>{
|
|
4480
|
+
let key = keys.find((key)=>req.url?.startsWith(key));
|
|
4481
|
+
if (!key) return next?.();
|
|
4482
|
+
let middleware = middlewareByCompiler.get(key);
|
|
4483
|
+
return middleware?.(req, res, next);
|
|
4484
|
+
};
|
|
4485
|
+
}
|
|
4486
|
+
if (compiler.options.experiments.lazyCompilation && (console.warn(DEPRECATED_LAZY_COMPILATION_OPTIONS_WARN), compiler.options.lazyCompilation && console.warn(REPEAT_LAZY_COMPILATION_OPTIONS_WARN)), !compiler.options.lazyCompilation && !compiler.options.experiments.lazyCompilation) return noop;
|
|
4487
|
+
let activeModules = new Set(), options = {
|
|
4488
|
+
...compiler.options.experiments.lazyCompilation,
|
|
4489
|
+
...compiler.options.lazyCompilation
|
|
4490
|
+
};
|
|
4491
|
+
return applyPlugin(compiler, options, activeModules), lazyCompilationMiddlewareInternal(compiler, activeModules, options.prefix || LAZY_COMPILATION_PREFIX);
|
|
4492
|
+
};
|
|
4446
4493
|
function applyPlugin(compiler, options, activeModules) {
|
|
4447
4494
|
let compiler1;
|
|
4448
4495
|
new BuiltinLazyCompilationPlugin(()=>{
|
|
@@ -5735,12 +5782,16 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
5735
5782
|
if ("function" != typeof options.entry) for (let key of Object.keys(options.entry))F(options.entry[key], "import", ()=>[
|
|
5736
5783
|
"./src"
|
|
5737
5784
|
]);
|
|
5738
|
-
F(options, "devtool", ()=>!!development && "eval"), D(options, "watch", !1), D(options, "profile", !1),
|
|
5785
|
+
F(options, "devtool", ()=>!!development && "eval"), D(options, "watch", !1), D(options, "profile", !1), F(options, "lazyCompilation", ()=>!!targetProperties && !!targetProperties.web && !targetProperties.electron && !targetProperties.node && !targetProperties.nwjs && {
|
|
5786
|
+
imports: !0,
|
|
5787
|
+
entries: !1
|
|
5788
|
+
}), D(options, "bail", !1), F(options, "cache", ()=>development), !1 === options.cache && (options.experiments.cache = !1), applyExperimentsDefaults(options.experiments, {
|
|
5739
5789
|
development
|
|
5740
5790
|
}), applyOptimizationDefaults(options.optimization, {
|
|
5741
5791
|
production,
|
|
5742
5792
|
development,
|
|
5743
|
-
css: options.experiments.css
|
|
5793
|
+
css: options.experiments.css,
|
|
5794
|
+
deprecatedInline: options.experiments.inlineConst || options.experiments.inlineEnum
|
|
5744
5795
|
}), applySnapshotDefaults(options.snapshot, {
|
|
5745
5796
|
production
|
|
5746
5797
|
}), applyModuleDefaults(options.module, {
|
|
@@ -5750,17 +5801,13 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
5750
5801
|
targetProperties,
|
|
5751
5802
|
mode: options.mode,
|
|
5752
5803
|
uniqueName: options.output.uniqueName,
|
|
5753
|
-
usedExports: !!options.optimization.usedExports,
|
|
5754
|
-
inlineConst: options.experiments.inlineConst,
|
|
5755
5804
|
deferImport: options.experiments.deferImport
|
|
5756
5805
|
}), applyOutputDefaults(options.output, {
|
|
5757
5806
|
context: options.context,
|
|
5758
5807
|
targetProperties,
|
|
5759
5808
|
isAffectedByBrowserslist: void 0 === target || "string" == typeof target && target.startsWith("browserslist") || Array.isArray(target) && target.some((target)=>target.startsWith("browserslist")),
|
|
5760
5809
|
outputModule: options.experiments.outputModule,
|
|
5761
|
-
|
|
5762
|
-
entry: options.entry,
|
|
5763
|
-
futureDefaults: options.experiments.futureDefaults
|
|
5810
|
+
entry: options.entry
|
|
5764
5811
|
}), applybundlerInfoDefaults(options.experiments.rspackFuture, options.output.library), applyExternalsPresetsDefaults(options.externalsPresets, {
|
|
5765
5812
|
targetProperties,
|
|
5766
5813
|
buildHttp: !!options.experiments.buildHttp
|
|
@@ -5783,17 +5830,15 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
5783
5830
|
let tty = infrastructureLogging.stream?.isTTY && "dumb" !== process.env.TERM;
|
|
5784
5831
|
D(infrastructureLogging, "level", "info"), D(infrastructureLogging, "debug", !1), D(infrastructureLogging, "colors", tty), D(infrastructureLogging, "appendOnly", !tty);
|
|
5785
5832
|
}, applyExperimentsDefaults = (experiments, { development })=>{
|
|
5786
|
-
F(experiments, "cache", ()=>development), D(experiments, "futureDefaults", !1), D(experiments, "lazyCompilation", !1), D(experiments, "asyncWebAssembly", experiments.futureDefaults), D(experiments, "css", !!experiments.futureDefaults || void 0), D(experiments, "topLevelAwait", !0), D(experiments, "deferImport", !1), D(experiments, "buildHttp", void 0), experiments.buildHttp && "object" == typeof experiments.buildHttp && D(experiments.buildHttp, "upgrade", !1), D(experiments, "incremental", {}), "object" == typeof experiments.incremental && (D(experiments.incremental, "silent", !0), D(experiments.incremental, "make", !0), D(experiments.incremental, "inferAsyncModules", !0), D(experiments.incremental, "providedExports", !0), D(experiments.incremental, "dependenciesDiagnostics", !0), D(experiments.incremental, "sideEffects", !0), D(experiments.incremental, "buildChunkGraph", !1), D(experiments.incremental, "moduleIds", !0), D(experiments.incremental, "chunkIds", !0), D(experiments.incremental, "modulesHashes", !0), D(experiments.incremental, "modulesCodegen", !0), D(experiments.incremental, "modulesRuntimeRequirements", !0), D(experiments.incremental, "chunksRuntimeRequirements", !0), D(experiments.incremental, "chunksHashes", !0), D(experiments.incremental, "chunksRender", !0), D(experiments.incremental, "emitAssets", !0)), D(experiments, "rspackFuture", {}), D(experiments, "parallelCodeSplitting", !1), D(experiments, "parallelLoader", !1), D(experiments, "useInputFileSystem", !1), D(experiments, "inlineConst", !
|
|
5833
|
+
F(experiments, "cache", ()=>development), D(experiments, "futureDefaults", !1), D(experiments, "lazyCompilation", !1), D(experiments, "asyncWebAssembly", experiments.futureDefaults), D(experiments, "css", !!experiments.futureDefaults || void 0), D(experiments, "topLevelAwait", !0), D(experiments, "deferImport", !1), D(experiments, "buildHttp", void 0), experiments.buildHttp && "object" == typeof experiments.buildHttp && D(experiments.buildHttp, "upgrade", !1), D(experiments, "incremental", {}), "object" == typeof experiments.incremental && (D(experiments.incremental, "silent", !0), D(experiments.incremental, "make", !0), D(experiments.incremental, "inferAsyncModules", !0), D(experiments.incremental, "providedExports", !0), D(experiments.incremental, "dependenciesDiagnostics", !0), D(experiments.incremental, "sideEffects", !0), D(experiments.incremental, "buildChunkGraph", !1), D(experiments.incremental, "moduleIds", !0), D(experiments.incremental, "chunkIds", !0), D(experiments.incremental, "modulesHashes", !0), D(experiments.incremental, "modulesCodegen", !0), D(experiments.incremental, "modulesRuntimeRequirements", !0), D(experiments.incremental, "chunksRuntimeRequirements", !0), D(experiments.incremental, "chunksHashes", !0), D(experiments.incremental, "chunksRender", !0), D(experiments.incremental, "emitAssets", !0)), D(experiments, "rspackFuture", {}), D(experiments, "parallelCodeSplitting", !1), D(experiments, "parallelLoader", !1), D(experiments, "useInputFileSystem", !1), D(experiments, "inlineConst", !0), D(experiments, "inlineEnum", !1), D(experiments, "typeReexportsPresence", !1), D(experiments, "lazyBarrel", !0);
|
|
5787
5834
|
}, applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
5788
|
-
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.
|
|
5789
|
-
}, applySnapshotDefaults = (_snapshot, _env)=>{}, applyModuleDefaults = (module1, { cache, asyncWebAssembly, css, targetProperties, mode, uniqueName,
|
|
5790
|
-
if (assertNotNill(module1.parser), assertNotNill(module1.generator), cache ? D(module1, "unsafeCache", /[\\/]node_modules[\\/]/) : D(module1, "unsafeCache", !1), F(module1.parser, "asset", ()=>({})), assertNotNill(module1.parser.asset), F(module1.parser.asset, "dataUrlCondition", ()=>({})), "object" == typeof module1.parser.asset.dataUrlCondition && D(module1.parser.asset.dataUrlCondition, "maxSize", 8096), F(module1.parser, "javascript", ()=>({})), assertNotNill(module1.parser.javascript), ((parserOptions, {
|
|
5835
|
+
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.7.0-beta.0"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
|
|
5836
|
+
}, applySnapshotDefaults = (_snapshot, _env)=>{}, applyModuleDefaults = (module1, { cache, asyncWebAssembly, css, targetProperties, mode, uniqueName, deferImport })=>{
|
|
5837
|
+
if (assertNotNill(module1.parser), assertNotNill(module1.generator), cache ? D(module1, "unsafeCache", /[\\/]node_modules[\\/]/) : D(module1, "unsafeCache", !1), F(module1.parser, "asset", ()=>({})), assertNotNill(module1.parser.asset), F(module1.parser.asset, "dataUrlCondition", ()=>({})), "object" == typeof module1.parser.asset.dataUrlCondition && D(module1.parser.asset.dataUrlCondition, "maxSize", 8096), F(module1.parser, "javascript", ()=>({})), assertNotNill(module1.parser.javascript), ((parserOptions, { deferImport })=>{
|
|
5791
5838
|
D(parserOptions, "dynamicImportMode", "lazy"), D(parserOptions, "dynamicImportPrefetch", !1), D(parserOptions, "dynamicImportPreload", !1), D(parserOptions, "url", !0), D(parserOptions, "exprContextCritical", !0), D(parserOptions, "unknownContextCritical", !0), D(parserOptions, "wrappedContextCritical", !1), D(parserOptions, "wrappedContextRegExp", /.*/), D(parserOptions, "strictExportPresence", !1), D(parserOptions, "requireAsExpression", !0), D(parserOptions, "requireDynamic", !0), D(parserOptions, "requireResolve", !0), D(parserOptions, "commonjs", !0), D(parserOptions, "importDynamic", !0), D(parserOptions, "worker", [
|
|
5792
5839
|
"..."
|
|
5793
|
-
]), D(parserOptions, "importMeta", !0), D(parserOptions, "
|
|
5840
|
+
]), D(parserOptions, "importMeta", !0), D(parserOptions, "typeReexportsPresence", "no-tolerant"), D(parserOptions, "jsx", !1), D(parserOptions, "deferImport", deferImport);
|
|
5794
5841
|
})(module1.parser.javascript, {
|
|
5795
|
-
usedExports,
|
|
5796
|
-
inlineConst,
|
|
5797
5842
|
deferImport
|
|
5798
5843
|
}), F(module1.parser, "json", ()=>({})), assertNotNill(module1.parser.json), D(module1.parser.json, "exportsDepth", "development" === mode ? 1 : Number.MAX_SAFE_INTEGER), F(module1.generator, "json", ()=>({})), assertNotNill(module1.generator.json), D(module1.generator.json, "JSONParse", !0), css) {
|
|
5799
5844
|
F(module1.parser, "css", ()=>({})), assertNotNill(module1.parser.css), D(module1.parser.css, "namedExports", !0), D(module1.parser.css, "url", !0), F(module1.parser, "css/auto", ()=>({})), assertNotNill(module1.parser["css/auto"]), D(module1.parser["css/auto"], "namedExports", !0), D(module1.parser["css/auto"], "url", !0), F(module1.parser, "css/module", ()=>({})), assertNotNill(module1.parser["css/module"]), D(module1.parser["css/module"], "namedExports", !0), D(module1.parser["css/module"], "url", !0), F(module1.generator, "css", ()=>({})), assertNotNill(module1.generator.css), D(module1.generator.css, "exportsOnly", !targetProperties || !targetProperties.document), D(module1.generator.css, "esModule", !0), F(module1.generator, "css/auto", ()=>({})), assertNotNill(module1.generator["css/auto"]), D(module1.generator["css/auto"], "exportsOnly", !targetProperties || !targetProperties.document), D(module1.generator["css/auto"], "exportsConvention", "as-is");
|
|
@@ -5914,15 +5959,20 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
5914
5959
|
type: "json"
|
|
5915
5960
|
},
|
|
5916
5961
|
type: "json"
|
|
5962
|
+
}, {
|
|
5963
|
+
with: {
|
|
5964
|
+
type: "text"
|
|
5965
|
+
},
|
|
5966
|
+
type: "asset/source"
|
|
5917
5967
|
}), rules;
|
|
5918
5968
|
});
|
|
5919
|
-
}, applyOutputDefaults = (output, { context, outputModule, targetProperties: tp, isAffectedByBrowserslist,
|
|
5969
|
+
}, applyOutputDefaults = (output, { context, outputModule, targetProperties: tp, isAffectedByBrowserslist, entry })=>{
|
|
5920
5970
|
let getLibraryName = (library)=>{
|
|
5921
5971
|
let libraryName = "object" == typeof library && library && !Array.isArray(library) && "type" in library ? library.name : library;
|
|
5922
5972
|
return Array.isArray(libraryName) ? libraryName.join(".") : "object" == typeof libraryName ? getLibraryName(libraryName.root) : "string" == typeof libraryName ? libraryName : "";
|
|
5923
5973
|
};
|
|
5924
5974
|
F(output, "uniqueName", ()=>{
|
|
5925
|
-
let libraryName = getLibraryName(output.library).replace(/^\[(\\*[\w:]+\\*)\](\.)|(\.)\[(\\*[\w:]+\\*)\](?=\.|$)|\[(\\*[\w:]+\\*)\]/g, (
|
|
5975
|
+
let libraryName = getLibraryName(output.library).replace(/^\[(\\*[\w:]+\\*)\](\.)|(\.)\[(\\*[\w:]+\\*)\](?=\.|$)|\[(\\*[\w:]+\\*)\]/g, (_, a, d1, d2, b, c)=>{
|
|
5926
5976
|
let content = a || b || c;
|
|
5927
5977
|
return content.startsWith("\\") && content.endsWith("\\") ? `${d2 || ""}[${content.slice(1, -1)}]${d1 || ""}` : "";
|
|
5928
5978
|
});
|
|
@@ -6035,7 +6085,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6035
6085
|
if (tp) {
|
|
6036
6086
|
if (tp.fetchWasm) return "fetch";
|
|
6037
6087
|
if (tp.nodeBuiltins) return "async-node";
|
|
6038
|
-
null === tp.nodeBuiltins || tp.fetchWasm;
|
|
6088
|
+
if ((null === tp.nodeBuiltins || null === tp.fetchWasm) && output.module && environment.dynamicImport) return "universal";
|
|
6039
6089
|
}
|
|
6040
6090
|
return !1;
|
|
6041
6091
|
}), F(output, "workerWasmLoading", ()=>output.wasmLoading), F(output, "globalObject", ()=>{
|
|
@@ -6062,7 +6112,9 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6062
6112
|
}), Array.from(enabledChunkLoadingTypes);
|
|
6063
6113
|
}), A(output, "enabledWasmLoadingTypes", ()=>{
|
|
6064
6114
|
let enabledWasmLoadingTypes = new Set();
|
|
6065
|
-
return output.wasmLoading && enabledWasmLoadingTypes.add(output.wasmLoading), output.workerWasmLoading && enabledWasmLoadingTypes.add(output.workerWasmLoading),
|
|
6115
|
+
return output.wasmLoading && enabledWasmLoadingTypes.add(output.wasmLoading), output.workerWasmLoading && enabledWasmLoadingTypes.add(output.workerWasmLoading), forEachEntry((desc)=>{
|
|
6116
|
+
desc.wasmLoading && enabledWasmLoadingTypes.add(desc.wasmLoading);
|
|
6117
|
+
}), Array.from(enabledWasmLoadingTypes);
|
|
6066
6118
|
});
|
|
6067
6119
|
}, applyExternalsPresetsDefaults = (externalsPresets, { targetProperties, buildHttp })=>{
|
|
6068
6120
|
D(externalsPresets, "web", !buildHttp && targetProperties?.web), D(externalsPresets, "node", targetProperties?.node), D(externalsPresets, "electron", targetProperties?.electron), D(externalsPresets, "electronMain", targetProperties?.electron && targetProperties.electronMain), D(externalsPresets, "electronPreload", targetProperties?.electron && targetProperties.electronPreload), D(externalsPresets, "electronRenderer", targetProperties?.electron && targetProperties.electronRenderer), D(externalsPresets, "nwjs", targetProperties?.nwjs);
|
|
@@ -6079,8 +6131,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6079
6131
|
!1 !== node && (F(node, "global", ()=>!targetProperties?.global && "warn"), F(node, "__dirname", ()=>targetProperties?.node ? outputModule ? "node-module" : "eval-only" : "warn-mock"), F(node, "__filename", ()=>targetProperties?.node ? outputModule ? "node-module" : "eval-only" : "warn-mock"));
|
|
6080
6132
|
}, applyPerformanceDefaults = (performance, { production })=>{
|
|
6081
6133
|
!1 !== performance && (D(performance, "maxAssetSize", 250000), D(performance, "maxEntrypointSize", 250000), F(performance, "hints", ()=>!!production && "warning"));
|
|
6082
|
-
}, applyOptimizationDefaults = (optimization, { production, development, css })=>{
|
|
6083
|
-
D(optimization, "removeAvailableModules", !0), D(optimization, "removeEmptyChunks", !0), D(optimization, "mergeDuplicateChunks", !0), F(optimization, "moduleIds", ()=>production ? "deterministic" : development ? "named" : "natural"), F(optimization, "chunkIds", ()=>production ? "deterministic" : development ? "named" : "natural"), F(optimization, "sideEffects", ()=>!!production || "flag"), D(optimization, "mangleExports", production), D(optimization, "providedExports", !0), D(optimization, "usedExports", production), D(optimization, "innerGraph", production), D(optimization, "emitOnErrors", !production), D(optimization, "runtimeChunk", !1), D(optimization, "realContentHash", production), D(optimization, "avoidEntryIife", !1), D(optimization, "minimize", production), D(optimization, "concatenateModules", production), A(optimization, "minimizer", ()=>[
|
|
6134
|
+
}, applyOptimizationDefaults = (optimization, { production, development, css, deprecatedInline })=>{
|
|
6135
|
+
D(optimization, "removeAvailableModules", !0), D(optimization, "removeEmptyChunks", !0), D(optimization, "mergeDuplicateChunks", !0), F(optimization, "moduleIds", ()=>production ? "deterministic" : development ? "named" : "natural"), F(optimization, "chunkIds", ()=>production ? "deterministic" : development ? "named" : "natural"), F(optimization, "sideEffects", ()=>!!production || "flag"), D(optimization, "mangleExports", production), D(optimization, "inlineExports", deprecatedInline && production), D(optimization, "providedExports", !0), D(optimization, "usedExports", production), D(optimization, "innerGraph", production), D(optimization, "emitOnErrors", !production), D(optimization, "runtimeChunk", !1), D(optimization, "realContentHash", production), D(optimization, "avoidEntryIife", !1), D(optimization, "minimize", production), D(optimization, "concatenateModules", production), A(optimization, "minimizer", ()=>[
|
|
6084
6136
|
new SwcJsMinimizerRspackPlugin(),
|
|
6085
6137
|
new LightningCssMinimizerRspackPlugin()
|
|
6086
6138
|
]), F(optimization, "nodeEnv", ()=>production ? "production" : !!development && "development");
|
|
@@ -6243,13 +6295,15 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6243
6295
|
}, getPnpDefault = ()=>!!process.versions.pnp, getNormalizedRspackOptions = (config)=>{
|
|
6244
6296
|
let fn;
|
|
6245
6297
|
return {
|
|
6246
|
-
ignoreWarnings:
|
|
6247
|
-
if (
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6298
|
+
ignoreWarnings: ((ignoreWarnings)=>{
|
|
6299
|
+
if (ignoreWarnings) return ignoreWarnings.map((ignore)=>{
|
|
6300
|
+
if ("function" == typeof ignore) return ignore;
|
|
6301
|
+
let rule = ignore instanceof RegExp ? {
|
|
6302
|
+
message: ignore
|
|
6303
|
+
} : ignore;
|
|
6304
|
+
return (warning)=>(!!rule.message || !!rule.module || !!rule.file) && (!rule.message || !!rule.message.test(warning.message)) && (!rule.module || !!warning.module && !!rule.module.test(warning.module.readableIdentifier())) && (!rule.file || !!warning.file && !!rule.file.test(warning.file));
|
|
6305
|
+
});
|
|
6306
|
+
})(config.ignoreWarnings),
|
|
6253
6307
|
name: config.name,
|
|
6254
6308
|
dependencies: config.dependencies,
|
|
6255
6309
|
context: config.context,
|
|
@@ -6397,7 +6451,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6397
6451
|
plugins: nestedArray(config.plugins, (p)=>[
|
|
6398
6452
|
...p
|
|
6399
6453
|
]),
|
|
6400
|
-
experiments: nestedConfig(config.experiments, (experiments)=>(experiments.layers && external_node_util_default().deprecate(()=>{}, "`experiments.layers` config has been deprecated and will be removed in Rspack v2.0. Feature layers will be always enabled. Please remove this option from your Rspack configuration.")(), !1 === experiments.topLevelAwait && external_node_util_default().deprecate(()=>{}, "`experiments.topLevelAwait` config has been deprecated and will be removed in Rspack v2.0. Top-level await will be always enabled. Please remove this option from your Rspack configuration.")(), experiments.parallelCodeSplitting && external_node_util_default().deprecate(()=>{}, "`experiments.parallelCodeSplitting` config has been deprecated and will be removed in next minor. It has huge regression in some edge cases where the chunk graph has lots of cycles, we'll improve the performance of build_chunk_graph in the future instead")(), {
|
|
6454
|
+
experiments: nestedConfig(config.experiments, (experiments)=>(experiments.layers && external_node_util_default().deprecate(()=>{}, "`experiments.layers` config has been deprecated and will be removed in Rspack v2.0. Feature layers will be always enabled. Please remove this option from your Rspack configuration.")(), !1 === experiments.topLevelAwait && external_node_util_default().deprecate(()=>{}, "`experiments.topLevelAwait` config has been deprecated and will be removed in Rspack v2.0. Top-level await will be always enabled. Please remove this option from your Rspack configuration.")(), experiments.parallelCodeSplitting && external_node_util_default().deprecate(()=>{}, "`experiments.parallelCodeSplitting` config has been deprecated and will be removed in next minor. It has huge regression in some edge cases where the chunk graph has lots of cycles, we'll improve the performance of build_chunk_graph in the future instead")(), experiments.lazyBarrel && external_node_util_default().deprecate(()=>{}, "`experiments.lazyBarrel` config has been deprecated and will be removed in Rspack v2.0. Lazy barrel is already stable and enabled by default. Please remove this option from your Rspack configuration.")(), experiments.inlineConst && external_node_util_default().deprecate(()=>{}, "`experiments.inlineConst` config has been deprecated and will be removed in Rspack v2.0. Inline Const is already stable and enabled by default. Please remove this option from your Rspack configuration.")(), experiments.inlineEnum && external_node_util_default().deprecate(()=>{}, "`experiments.inlineEnum` config has been deprecated and will be removed in Rspack v2.0. Inline Enum is already stable. Please remove this option from your Rspack configuration.")(), experiments.typeReexportsPresence && external_node_util_default().deprecate(()=>{}, "`experiments.typeReexportsPresence` config has been deprecated and will be removed in Rspack v2.0. typeReexportsPresence is already stable. Please remove this option from your Rspack configuration.")(), {
|
|
6401
6455
|
...experiments,
|
|
6402
6456
|
cache: optionalNestedConfig(experiments.cache, (cache)=>{
|
|
6403
6457
|
if ("boolean" == typeof cache || "memory" === cache.type) return cache;
|
|
@@ -6519,15 +6573,214 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6519
6573
|
if (customKeys) for (let key of Object.keys(customKeys))key in result || (result[key] = customKeys[key]({}));
|
|
6520
6574
|
return result;
|
|
6521
6575
|
};
|
|
6576
|
+
function __from_binding_runtime_globals(runtimeRequirements, compilerRuntimeGlobals) {
|
|
6577
|
+
let res = new Set();
|
|
6578
|
+
for (let flag of runtimeRequirements.value)flag in compilerRuntimeGlobals ? res.add(compilerRuntimeGlobals[flag]) : res.add(flag);
|
|
6579
|
+
return res;
|
|
6580
|
+
}
|
|
6581
|
+
function __to_binding_runtime_globals(runtimeRequirements, compilerRuntimeGlobals) {
|
|
6582
|
+
let res = {
|
|
6583
|
+
value: []
|
|
6584
|
+
}, reversedCompilerRuntimeGlobals = Object.fromEntries(Object.entries(compilerRuntimeGlobals).map(([key, value])=>[
|
|
6585
|
+
value,
|
|
6586
|
+
key
|
|
6587
|
+
]));
|
|
6588
|
+
for (let flag of Array.from(runtimeRequirements)){
|
|
6589
|
+
let item = reversedCompilerRuntimeGlobals[flag];
|
|
6590
|
+
"string" == typeof item ? res.value.push(item) : res.value.push(flag);
|
|
6591
|
+
}
|
|
6592
|
+
return res;
|
|
6593
|
+
}
|
|
6594
|
+
var RuntimeGlobals_RuntimeGlobals = ((RuntimeGlobals = RuntimeGlobals_RuntimeGlobals || {})[RuntimeGlobals.require = 0] = "require", RuntimeGlobals[RuntimeGlobals.requireScope = 1] = "requireScope", RuntimeGlobals[RuntimeGlobals.exports = 2] = "exports", RuntimeGlobals[RuntimeGlobals.thisAsExports = 3] = "thisAsExports", RuntimeGlobals[RuntimeGlobals.returnExportsFromRuntime = 4] = "returnExportsFromRuntime", RuntimeGlobals[RuntimeGlobals.module = 5] = "module", RuntimeGlobals[RuntimeGlobals.moduleId = 6] = "moduleId", RuntimeGlobals[RuntimeGlobals.moduleLoaded = 7] = "moduleLoaded", RuntimeGlobals[RuntimeGlobals.publicPath = 8] = "publicPath", RuntimeGlobals[RuntimeGlobals.entryModuleId = 9] = "entryModuleId", RuntimeGlobals[RuntimeGlobals.moduleCache = 10] = "moduleCache", RuntimeGlobals[RuntimeGlobals.moduleFactories = 11] = "moduleFactories", RuntimeGlobals[RuntimeGlobals.moduleFactoriesAddOnly = 12] = "moduleFactoriesAddOnly", RuntimeGlobals[RuntimeGlobals.ensureChunk = 13] = "ensureChunk", RuntimeGlobals[RuntimeGlobals.ensureChunkHandlers = 14] = "ensureChunkHandlers", RuntimeGlobals[RuntimeGlobals.ensureChunkIncludeEntries = 15] = "ensureChunkIncludeEntries", RuntimeGlobals[RuntimeGlobals.prefetchChunk = 16] = "prefetchChunk", RuntimeGlobals[RuntimeGlobals.prefetchChunkHandlers = 17] = "prefetchChunkHandlers", RuntimeGlobals[RuntimeGlobals.preloadChunk = 18] = "preloadChunk", RuntimeGlobals[RuntimeGlobals.preloadChunkHandlers = 19] = "preloadChunkHandlers", RuntimeGlobals[RuntimeGlobals.definePropertyGetters = 20] = "definePropertyGetters", RuntimeGlobals[RuntimeGlobals.makeNamespaceObject = 21] = "makeNamespaceObject", RuntimeGlobals[RuntimeGlobals.createFakeNamespaceObject = 22] = "createFakeNamespaceObject", RuntimeGlobals[RuntimeGlobals.compatGetDefaultExport = 23] = "compatGetDefaultExport", RuntimeGlobals[RuntimeGlobals.harmonyModuleDecorator = 24] = "harmonyModuleDecorator", RuntimeGlobals[RuntimeGlobals.nodeModuleDecorator = 25] = "nodeModuleDecorator", RuntimeGlobals[RuntimeGlobals.getFullHash = 26] = "getFullHash", RuntimeGlobals[RuntimeGlobals.wasmInstances = 27] = "wasmInstances", RuntimeGlobals[RuntimeGlobals.instantiateWasm = 28] = "instantiateWasm", RuntimeGlobals[RuntimeGlobals.uncaughtErrorHandler = 29] = "uncaughtErrorHandler", RuntimeGlobals[RuntimeGlobals.scriptNonce = 30] = "scriptNonce", RuntimeGlobals[RuntimeGlobals.loadScript = 31] = "loadScript", RuntimeGlobals[RuntimeGlobals.createScript = 32] = "createScript", RuntimeGlobals[RuntimeGlobals.createScriptUrl = 33] = "createScriptUrl", RuntimeGlobals[RuntimeGlobals.getTrustedTypesPolicy = 34] = "getTrustedTypesPolicy", RuntimeGlobals[RuntimeGlobals.hasFetchPriority = 35] = "hasFetchPriority", RuntimeGlobals[RuntimeGlobals.chunkName = 36] = "chunkName", RuntimeGlobals[RuntimeGlobals.runtimeId = 37] = "runtimeId", RuntimeGlobals[RuntimeGlobals.getChunkScriptFilename = 38] = "getChunkScriptFilename", RuntimeGlobals[RuntimeGlobals.getChunkCssFilename = 39] = "getChunkCssFilename", RuntimeGlobals[RuntimeGlobals.rspackVersion = 40] = "rspackVersion", RuntimeGlobals[RuntimeGlobals.hasCssModules = 41] = "hasCssModules", RuntimeGlobals[RuntimeGlobals.rspackUniqueId = 42] = "rspackUniqueId", RuntimeGlobals[RuntimeGlobals.getChunkUpdateScriptFilename = 43] = "getChunkUpdateScriptFilename", RuntimeGlobals[RuntimeGlobals.getChunkUpdateCssFilename = 44] = "getChunkUpdateCssFilename", RuntimeGlobals[RuntimeGlobals.startup = 45] = "startup", RuntimeGlobals[RuntimeGlobals.startupNoDefault = 46] = "startupNoDefault", RuntimeGlobals[RuntimeGlobals.startupOnlyAfter = 47] = "startupOnlyAfter", RuntimeGlobals[RuntimeGlobals.startupOnlyBefore = 48] = "startupOnlyBefore", RuntimeGlobals[RuntimeGlobals.chunkCallback = 49] = "chunkCallback", RuntimeGlobals[RuntimeGlobals.startupEntrypoint = 50] = "startupEntrypoint", RuntimeGlobals[RuntimeGlobals.startupChunkDependencies = 51] = "startupChunkDependencies", RuntimeGlobals[RuntimeGlobals.onChunksLoaded = 52] = "onChunksLoaded", RuntimeGlobals[RuntimeGlobals.externalInstallChunk = 53] = "externalInstallChunk", RuntimeGlobals[RuntimeGlobals.interceptModuleExecution = 54] = "interceptModuleExecution", RuntimeGlobals[RuntimeGlobals.global = 55] = "global", RuntimeGlobals[RuntimeGlobals.shareScopeMap = 56] = "shareScopeMap", RuntimeGlobals[RuntimeGlobals.initializeSharing = 57] = "initializeSharing", RuntimeGlobals[RuntimeGlobals.currentRemoteGetScope = 58] = "currentRemoteGetScope", RuntimeGlobals[RuntimeGlobals.getUpdateManifestFilename = 59] = "getUpdateManifestFilename", RuntimeGlobals[RuntimeGlobals.hmrDownloadManifest = 60] = "hmrDownloadManifest", RuntimeGlobals[RuntimeGlobals.hmrDownloadUpdateHandlers = 61] = "hmrDownloadUpdateHandlers", RuntimeGlobals[RuntimeGlobals.hmrModuleData = 62] = "hmrModuleData", RuntimeGlobals[RuntimeGlobals.hmrInvalidateModuleHandlers = 63] = "hmrInvalidateModuleHandlers", RuntimeGlobals[RuntimeGlobals.hmrRuntimeStatePrefix = 64] = "hmrRuntimeStatePrefix", RuntimeGlobals[RuntimeGlobals.amdDefine = 65] = "amdDefine", RuntimeGlobals[RuntimeGlobals.amdOptions = 66] = "amdOptions", RuntimeGlobals[RuntimeGlobals.system = 67] = "system", RuntimeGlobals[RuntimeGlobals.hasOwnProperty = 68] = "hasOwnProperty", RuntimeGlobals[RuntimeGlobals.systemContext = 69] = "systemContext", RuntimeGlobals[RuntimeGlobals.baseURI = 70] = "baseURI", RuntimeGlobals[RuntimeGlobals.relativeUrl = 71] = "relativeUrl", RuntimeGlobals[RuntimeGlobals.asyncModule = 72] = "asyncModule", RuntimeGlobals[RuntimeGlobals.asyncModuleExportSymbol = 73] = "asyncModuleExportSymbol", RuntimeGlobals[RuntimeGlobals.makeDeferredNamespaceObject = 74] = "makeDeferredNamespaceObject", RuntimeGlobals[RuntimeGlobals.makeDeferredNamespaceObjectSymbol = 75] = "makeDeferredNamespaceObjectSymbol", RuntimeGlobals);
|
|
6595
|
+
function renderRuntimeVariables(variable, _compilerOptions) {
|
|
6596
|
+
switch(variable){
|
|
6597
|
+
case 0:
|
|
6598
|
+
return "__webpack_require__";
|
|
6599
|
+
case 1:
|
|
6600
|
+
return "__webpack_modules__";
|
|
6601
|
+
case 2:
|
|
6602
|
+
return "__webpack_module_cache__";
|
|
6603
|
+
case 3:
|
|
6604
|
+
return "__webpack_module__";
|
|
6605
|
+
case 4:
|
|
6606
|
+
return "__webpack_exports__";
|
|
6607
|
+
case 5:
|
|
6608
|
+
return "__webpack_exec__";
|
|
6609
|
+
}
|
|
6610
|
+
}
|
|
6611
|
+
function createCompilerRuntimeGlobals(compilerOptions) {
|
|
6612
|
+
let res = {};
|
|
6613
|
+
for (let key of Object.keys(RuntimeGlobals_RuntimeGlobals))res[key] = function(runtimeGlobals, _compilerOptions) {
|
|
6614
|
+
let scope_name = renderRuntimeVariables(0, _compilerOptions), exports_name = renderRuntimeVariables(4, _compilerOptions);
|
|
6615
|
+
switch(runtimeGlobals){
|
|
6616
|
+
case 0:
|
|
6617
|
+
return scope_name;
|
|
6618
|
+
case 1:
|
|
6619
|
+
return `${scope_name}.*`;
|
|
6620
|
+
case 2:
|
|
6621
|
+
return exports_name;
|
|
6622
|
+
case 3:
|
|
6623
|
+
return "top-level-this-exports";
|
|
6624
|
+
case 4:
|
|
6625
|
+
return "return-exports-from-runtime";
|
|
6626
|
+
case 5:
|
|
6627
|
+
return "module";
|
|
6628
|
+
case 6:
|
|
6629
|
+
return "module.id";
|
|
6630
|
+
case 7:
|
|
6631
|
+
return "module.loaded";
|
|
6632
|
+
case 8:
|
|
6633
|
+
return `${scope_name}.p`;
|
|
6634
|
+
case 9:
|
|
6635
|
+
return `${scope_name}.s`;
|
|
6636
|
+
case 10:
|
|
6637
|
+
return `${scope_name}.c`;
|
|
6638
|
+
case 11:
|
|
6639
|
+
return `${scope_name}.m`;
|
|
6640
|
+
case 12:
|
|
6641
|
+
return `${scope_name}.m (add only)`;
|
|
6642
|
+
case 13:
|
|
6643
|
+
return `${scope_name}.e`;
|
|
6644
|
+
case 14:
|
|
6645
|
+
return `${scope_name}.f`;
|
|
6646
|
+
case 15:
|
|
6647
|
+
return `${scope_name}.f (include entries)`;
|
|
6648
|
+
case 16:
|
|
6649
|
+
return `${scope_name}.E`;
|
|
6650
|
+
case 17:
|
|
6651
|
+
return `${scope_name}.F`;
|
|
6652
|
+
case 18:
|
|
6653
|
+
return `${scope_name}.G`;
|
|
6654
|
+
case 19:
|
|
6655
|
+
return `${scope_name}.H`;
|
|
6656
|
+
case 20:
|
|
6657
|
+
return `${scope_name}.d`;
|
|
6658
|
+
case 21:
|
|
6659
|
+
return `${scope_name}.r`;
|
|
6660
|
+
case 22:
|
|
6661
|
+
return `${scope_name}.t`;
|
|
6662
|
+
case 23:
|
|
6663
|
+
return `${scope_name}.n`;
|
|
6664
|
+
case 24:
|
|
6665
|
+
return `${scope_name}.hmd`;
|
|
6666
|
+
case 25:
|
|
6667
|
+
return `${scope_name}.nmd`;
|
|
6668
|
+
case 26:
|
|
6669
|
+
return `${scope_name}.h`;
|
|
6670
|
+
case 27:
|
|
6671
|
+
return `${scope_name}.w`;
|
|
6672
|
+
case 28:
|
|
6673
|
+
return `${scope_name}.v`;
|
|
6674
|
+
case 29:
|
|
6675
|
+
return `${scope_name}.oe`;
|
|
6676
|
+
case 30:
|
|
6677
|
+
return `${scope_name}.nc`;
|
|
6678
|
+
case 31:
|
|
6679
|
+
return `${scope_name}.l`;
|
|
6680
|
+
case 32:
|
|
6681
|
+
return `${scope_name}.ts`;
|
|
6682
|
+
case 33:
|
|
6683
|
+
return `${scope_name}.tu`;
|
|
6684
|
+
case 34:
|
|
6685
|
+
return `${scope_name}.tt`;
|
|
6686
|
+
case 35:
|
|
6687
|
+
return "has fetch priority";
|
|
6688
|
+
case 36:
|
|
6689
|
+
return `${scope_name}.cn`;
|
|
6690
|
+
case 37:
|
|
6691
|
+
return `${scope_name}.j`;
|
|
6692
|
+
case 38:
|
|
6693
|
+
return `${scope_name}.u`;
|
|
6694
|
+
case 39:
|
|
6695
|
+
return `${scope_name}.k`;
|
|
6696
|
+
case 40:
|
|
6697
|
+
return `${scope_name}.rv`;
|
|
6698
|
+
case 41:
|
|
6699
|
+
return "has css modules";
|
|
6700
|
+
case 42:
|
|
6701
|
+
return `${scope_name}.ruid`;
|
|
6702
|
+
case 43:
|
|
6703
|
+
return `${scope_name}.hu`;
|
|
6704
|
+
case 44:
|
|
6705
|
+
return `${scope_name}.hk`;
|
|
6706
|
+
case 45:
|
|
6707
|
+
return `${scope_name}.x`;
|
|
6708
|
+
case 46:
|
|
6709
|
+
return `${scope_name}.x (no default handler)`;
|
|
6710
|
+
case 47:
|
|
6711
|
+
return `${scope_name}.x (only after)`;
|
|
6712
|
+
case 48:
|
|
6713
|
+
return `${scope_name}.x (only before)`;
|
|
6714
|
+
case 49:
|
|
6715
|
+
return "global chunk callback";
|
|
6716
|
+
case 50:
|
|
6717
|
+
return `${scope_name}.X`;
|
|
6718
|
+
case 51:
|
|
6719
|
+
return `${scope_name}.x (chunk dependencies)`;
|
|
6720
|
+
case 52:
|
|
6721
|
+
return `${scope_name}.O`;
|
|
6722
|
+
case 53:
|
|
6723
|
+
return `${scope_name}.C`;
|
|
6724
|
+
case 54:
|
|
6725
|
+
return `${scope_name}.i`;
|
|
6726
|
+
case 55:
|
|
6727
|
+
return `${scope_name}.g`;
|
|
6728
|
+
case 56:
|
|
6729
|
+
return `${scope_name}.S`;
|
|
6730
|
+
case 57:
|
|
6731
|
+
return `${scope_name}.I`;
|
|
6732
|
+
case 58:
|
|
6733
|
+
return `${scope_name}.R`;
|
|
6734
|
+
case 59:
|
|
6735
|
+
return `${scope_name}.hmrF`;
|
|
6736
|
+
case 60:
|
|
6737
|
+
return `${scope_name}.hmrM`;
|
|
6738
|
+
case 61:
|
|
6739
|
+
return `${scope_name}.hmrC`;
|
|
6740
|
+
case 62:
|
|
6741
|
+
return `${scope_name}.hmrD`;
|
|
6742
|
+
case 63:
|
|
6743
|
+
return `${scope_name}.hmrI`;
|
|
6744
|
+
case 64:
|
|
6745
|
+
return `${scope_name}.hmrS`;
|
|
6746
|
+
case 65:
|
|
6747
|
+
return `${scope_name}.amdD`;
|
|
6748
|
+
case 66:
|
|
6749
|
+
return `${scope_name}.amdO`;
|
|
6750
|
+
case 67:
|
|
6751
|
+
return `${scope_name}.System`;
|
|
6752
|
+
case 68:
|
|
6753
|
+
return `${scope_name}.o`;
|
|
6754
|
+
case 69:
|
|
6755
|
+
return `${scope_name}.y`;
|
|
6756
|
+
case 70:
|
|
6757
|
+
return `${scope_name}.b`;
|
|
6758
|
+
case 71:
|
|
6759
|
+
return `${scope_name}.U`;
|
|
6760
|
+
case 72:
|
|
6761
|
+
return `${scope_name}.a`;
|
|
6762
|
+
case 73:
|
|
6763
|
+
return `${scope_name}.aE`;
|
|
6764
|
+
case 74:
|
|
6765
|
+
return `${scope_name}.z`;
|
|
6766
|
+
case 75:
|
|
6767
|
+
return `${scope_name}.zS`;
|
|
6768
|
+
default:
|
|
6769
|
+
return "";
|
|
6770
|
+
}
|
|
6771
|
+
}(RuntimeGlobals_RuntimeGlobals[key], compilerOptions);
|
|
6772
|
+
return res;
|
|
6773
|
+
}
|
|
6774
|
+
let DefaultRuntimeGlobals = createCompilerRuntimeGlobals();
|
|
6522
6775
|
class ExecuteModulePlugin {
|
|
6523
6776
|
apply(compiler) {
|
|
6524
6777
|
compiler.hooks.thisCompilation.tap("executeModule", (compilation)=>{
|
|
6525
6778
|
compiler.__internal__get_module_execution_results_map().clear(), compilation.hooks.executeModule.tap("executeModule", (options, context)=>{
|
|
6526
6779
|
let vm = __webpack_require__("node:vm"), moduleObject = options.moduleObject, source = options.codeGenerationResult.get("javascript");
|
|
6527
6780
|
if (void 0 !== source) try {
|
|
6528
|
-
vm.runInThisContext(`(function(module,
|
|
6781
|
+
vm.runInThisContext(`(function(module, ${renderRuntimeVariables(3, compiler.options)}, ${renderRuntimeVariables(4, compiler.options)}, exports, ${renderRuntimeVariables(0, compiler.options)}) {\n${source}\n})`, {
|
|
6529
6782
|
filename: moduleObject.id
|
|
6530
|
-
}).call(moduleObject.exports, moduleObject, moduleObject, moduleObject.exports, moduleObject.exports, context.
|
|
6783
|
+
}).call(moduleObject.exports, moduleObject, moduleObject, moduleObject.exports, moduleObject.exports, context[renderRuntimeVariables(0, compiler.options)]);
|
|
6531
6784
|
} catch (e) {
|
|
6532
6785
|
let err = e instanceof Error ? e : Error(e);
|
|
6533
6786
|
throw err.stack += printGeneratedCodeForStack(moduleObject.id, source), err;
|
|
@@ -6684,7 +6937,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6684
6937
|
constructor(fs){
|
|
6685
6938
|
if (Object.assign(this, NOOP_FILESYSTEM), !fs) return;
|
|
6686
6939
|
this.writeFile = memoizeFn(()=>external_node_util_default().promisify(fs.writeFile.bind(fs))), this.removeFile = memoizeFn(()=>external_node_util_default().promisify(fs.unlink.bind(fs))), this.mkdir = memoizeFn(()=>external_node_util_default().promisify(fs.mkdir.bind(fs))), this.mkdirp = memoizeFn(()=>external_node_util_default().promisify(mkdirp.bind(null, fs))), this.removeDirAll = memoizeFn(()=>external_node_util_default().promisify((function rmrf(fs, p, callback) {
|
|
6687
|
-
fs.stat(p, (err, stats)=>{
|
|
6940
|
+
(fs.lstat || fs.stat)(p, (err, stats)=>{
|
|
6688
6941
|
if (err) return "ENOENT" === err.code ? callback() : callback(err);
|
|
6689
6942
|
stats.isDirectory() ? fs.readdir(p, (err, files)=>{
|
|
6690
6943
|
if (err) return callback(err);
|
|
@@ -6739,7 +6992,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6739
6992
|
readFn(fd, {
|
|
6740
6993
|
position,
|
|
6741
6994
|
length
|
|
6742
|
-
}, (err,
|
|
6995
|
+
}, (err, _bytesRead, buffer)=>{
|
|
6743
6996
|
err ? resolve(err) : resolve(buffer);
|
|
6744
6997
|
});
|
|
6745
6998
|
});
|
|
@@ -7034,10 +7287,10 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
7034
7287
|
constructor(binding){
|
|
7035
7288
|
this.#binding = binding;
|
|
7036
7289
|
}
|
|
7037
|
-
resolveSync(
|
|
7290
|
+
resolveSync(_context, path, request) {
|
|
7038
7291
|
return this.#binding.resolveSync(path, request) ?? !1;
|
|
7039
7292
|
}
|
|
7040
|
-
resolve(
|
|
7293
|
+
resolve(_context, path, request, resolveContext, callback) {
|
|
7041
7294
|
this.#binding.resolve(path, request, (error, text)=>{
|
|
7042
7295
|
if (error) return void callback(error);
|
|
7043
7296
|
let req = text ? JSON.parse(text) : void 0;
|
|
@@ -7093,98 +7346,6 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
7093
7346
|
this.references = new Map(), this.builtinReferences = new Map();
|
|
7094
7347
|
}
|
|
7095
7348
|
}
|
|
7096
|
-
let RESERVED_RUNTIME_GLOBALS = new Map();
|
|
7097
|
-
function __from_binding_runtime_globals(runtimeRequirements) {
|
|
7098
|
-
let res = new Set();
|
|
7099
|
-
for (let flag of runtimeRequirements.value)flag in RuntimeGlobals ? res.add(RuntimeGlobals[flag]) : res.add(flag);
|
|
7100
|
-
return res;
|
|
7101
|
-
}
|
|
7102
|
-
function __to_binding_runtime_globals(runtimeRequirements) {
|
|
7103
|
-
let res = {
|
|
7104
|
-
value: []
|
|
7105
|
-
};
|
|
7106
|
-
for (let flag of Array.from(runtimeRequirements)){
|
|
7107
|
-
let item = RESERVED_RUNTIME_GLOBALS.get(flag);
|
|
7108
|
-
"string" == typeof item ? res.value.push(item) : res.value.push(flag);
|
|
7109
|
-
}
|
|
7110
|
-
return res;
|
|
7111
|
-
}
|
|
7112
|
-
let RuntimeGlobals = {
|
|
7113
|
-
require: "__webpack_require__",
|
|
7114
|
-
requireScope: "__webpack_require__.*",
|
|
7115
|
-
exports: "__webpack_exports__",
|
|
7116
|
-
thisAsExports: "top-level-this-exports",
|
|
7117
|
-
returnExportsFromRuntime: "return-exports-from-runtime",
|
|
7118
|
-
module: "module",
|
|
7119
|
-
moduleId: "module.id",
|
|
7120
|
-
moduleLoaded: "module.loaded",
|
|
7121
|
-
publicPath: "__webpack_require__.p",
|
|
7122
|
-
entryModuleId: "__webpack_require__.s",
|
|
7123
|
-
moduleCache: "__webpack_require__.c",
|
|
7124
|
-
moduleFactories: "__webpack_require__.m",
|
|
7125
|
-
moduleFactoriesAddOnly: "__webpack_require__.m (add only)",
|
|
7126
|
-
ensureChunk: "__webpack_require__.e",
|
|
7127
|
-
ensureChunkHandlers: "__webpack_require__.f",
|
|
7128
|
-
ensureChunkIncludeEntries: "__webpack_require__.f (include entries)",
|
|
7129
|
-
prefetchChunk: "__webpack_require__.E",
|
|
7130
|
-
prefetchChunkHandlers: "__webpack_require__.F",
|
|
7131
|
-
preloadChunk: "__webpack_require__.G",
|
|
7132
|
-
preloadChunkHandlers: "__webpack_require__.H",
|
|
7133
|
-
definePropertyGetters: "__webpack_require__.d",
|
|
7134
|
-
makeNamespaceObject: "__webpack_require__.r",
|
|
7135
|
-
createFakeNamespaceObject: "__webpack_require__.t",
|
|
7136
|
-
compatGetDefaultExport: "__webpack_require__.n",
|
|
7137
|
-
harmonyModuleDecorator: "__webpack_require__.hmd",
|
|
7138
|
-
nodeModuleDecorator: "__webpack_require__.nmd",
|
|
7139
|
-
getFullHash: "__webpack_require__.h",
|
|
7140
|
-
wasmInstances: "__webpack_require__.w",
|
|
7141
|
-
instantiateWasm: "__webpack_require__.v",
|
|
7142
|
-
uncaughtErrorHandler: "__webpack_require__.oe",
|
|
7143
|
-
scriptNonce: "__webpack_require__.nc",
|
|
7144
|
-
loadScript: "__webpack_require__.l",
|
|
7145
|
-
createScript: "__webpack_require__.ts",
|
|
7146
|
-
createScriptUrl: "__webpack_require__.tu",
|
|
7147
|
-
getTrustedTypesPolicy: "__webpack_require__.tt",
|
|
7148
|
-
hasFetchPriority: "has fetch priority",
|
|
7149
|
-
chunkName: "__webpack_require__.cn",
|
|
7150
|
-
runtimeId: "__webpack_require__.j",
|
|
7151
|
-
getChunkScriptFilename: "__webpack_require__.u",
|
|
7152
|
-
getChunkCssFilename: "__webpack_require__.k",
|
|
7153
|
-
hasCssModules: "has css modules",
|
|
7154
|
-
getChunkUpdateScriptFilename: "__webpack_require__.hu",
|
|
7155
|
-
getChunkUpdateCssFilename: "__webpack_require__.hk",
|
|
7156
|
-
startup: "__webpack_require__.x",
|
|
7157
|
-
startupNoDefault: "__webpack_require__.x (no default handler)",
|
|
7158
|
-
startupOnlyAfter: "__webpack_require__.x (only after)",
|
|
7159
|
-
startupOnlyBefore: "__webpack_require__.x (only before)",
|
|
7160
|
-
chunkCallback: "webpackChunk",
|
|
7161
|
-
startupEntrypoint: "__webpack_require__.X",
|
|
7162
|
-
onChunksLoaded: "__webpack_require__.O",
|
|
7163
|
-
externalInstallChunk: "__webpack_require__.C",
|
|
7164
|
-
interceptModuleExecution: "__webpack_require__.i",
|
|
7165
|
-
global: "__webpack_require__.g",
|
|
7166
|
-
shareScopeMap: "__webpack_require__.S",
|
|
7167
|
-
initializeSharing: "__webpack_require__.I",
|
|
7168
|
-
currentRemoteGetScope: "__webpack_require__.R",
|
|
7169
|
-
getUpdateManifestFilename: "__webpack_require__.hmrF",
|
|
7170
|
-
hmrDownloadManifest: "__webpack_require__.hmrM",
|
|
7171
|
-
hmrDownloadUpdateHandlers: "__webpack_require__.hmrC",
|
|
7172
|
-
hmrModuleData: "__webpack_require__.hmrD",
|
|
7173
|
-
hmrInvalidateModuleHandlers: "__webpack_require__.hmrI",
|
|
7174
|
-
hmrRuntimeStatePrefix: "__webpack_require__.hmrS",
|
|
7175
|
-
amdDefine: "__webpack_require__.amdD",
|
|
7176
|
-
amdOptions: "__webpack_require__.amdO",
|
|
7177
|
-
system: "__webpack_require__.System",
|
|
7178
|
-
hasOwnProperty: "__webpack_require__.o",
|
|
7179
|
-
systemContext: "__webpack_require__.y",
|
|
7180
|
-
baseURI: "__webpack_require__.b",
|
|
7181
|
-
relativeUrl: "__webpack_require__.U",
|
|
7182
|
-
asyncModule: "__webpack_require__.a",
|
|
7183
|
-
asyncModuleExportSymbol: "__webpack_require__.aE",
|
|
7184
|
-
makeDeferredNamespaceObject: "__webpack_require__.z",
|
|
7185
|
-
makeDeferredNamespaceObjectSymbol: "__webpack_require__.zS"
|
|
7186
|
-
};
|
|
7187
|
-
for (let entry of Object.entries(RuntimeGlobals))RESERVED_RUNTIME_GLOBALS.set(entry[1], entry[0]);
|
|
7188
7349
|
class CodeGenerationResult {
|
|
7189
7350
|
#inner;
|
|
7190
7351
|
constructor(result){
|
|
@@ -7438,7 +7599,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
7438
7599
|
});
|
|
7439
7600
|
}
|
|
7440
7601
|
}
|
|
7441
|
-
let CORE_VERSION = "1.
|
|
7602
|
+
let CORE_VERSION = "1.7.0-beta.0", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
|
|
7442
7603
|
|
|
7443
7604
|
Help:
|
|
7444
7605
|
Looks like you are using a custom binding (via environment variable 'RSPACK_BINDING=${process.env.RSPACK_BINDING}').
|
|
@@ -7828,7 +7989,15 @@ Help:
|
|
|
7828
7989
|
"entry"
|
|
7829
7990
|
]),
|
|
7830
7991
|
additionalPass: new lite_tapable_namespaceObject.AsyncSeriesHook([])
|
|
7831
|
-
}
|
|
7992
|
+
};
|
|
7993
|
+
const compilerRuntimeGlobals = createCompilerRuntimeGlobals(options);
|
|
7994
|
+
this.webpack = {
|
|
7995
|
+
...src_rspack_0,
|
|
7996
|
+
RuntimeGlobals: compilerRuntimeGlobals
|
|
7997
|
+
}, this.rspack = {
|
|
7998
|
+
...src_rspack_0,
|
|
7999
|
+
RuntimeGlobals: compilerRuntimeGlobals
|
|
8000
|
+
}, this.root = this, this.outputPath = "", this.inputFileSystem = null, this.intermediateFileSystem = null, this.outputFileSystem = null, this.watchFileSystem = null, this.records = {}, this.options = options, this.context = context, this.cache = new Cache(), this.compilerPath = "", this.running = !1, this.idle = !1, this.watchMode = !1, this.__internal_browser_require = ()=>{
|
|
7832
8001
|
throw Error("Cannot execute user defined code in browser without `BrowserRequirePlugin`");
|
|
7833
8002
|
}, this.resolverFactory = new ResolverFactory(options.resolve.pnp ?? getPnpDefault(), options.resolve, options.resolveLoader), new JsLoaderRspackPlugin(this).apply(this), new ExecuteModulePlugin().apply(this), new TraceHookPlugin().apply(this);
|
|
7834
8003
|
}
|
|
@@ -8063,11 +8232,11 @@ Help:
|
|
|
8063
8232
|
parser: Object.fromEntries(Object.entries(parser = module1.parser).map(([k, v])=>[
|
|
8064
8233
|
k,
|
|
8065
8234
|
getRawParserOptions(v, k)
|
|
8066
|
-
]).filter(([
|
|
8235
|
+
]).filter(([_, v])=>void 0 !== v)),
|
|
8067
8236
|
generator: Object.fromEntries(Object.entries(generator = module1.generator).map(([k, v])=>[
|
|
8068
8237
|
k,
|
|
8069
8238
|
getRawGeneratorOptions(v, k)
|
|
8070
|
-
]).filter(([
|
|
8239
|
+
]).filter(([_, v])=>void 0 !== v)),
|
|
8071
8240
|
noParse: module1.noParse,
|
|
8072
8241
|
unsafeCache: module1.unsafeCache
|
|
8073
8242
|
};
|
|
@@ -8199,9 +8368,9 @@ Help:
|
|
|
8199
8368
|
return getCompiler2().__internal__get_compilation().hooks.additionalTreeRuntimeRequirements;
|
|
8200
8369
|
}, function(queried) {
|
|
8201
8370
|
return function({ chunk, runtimeRequirements }) {
|
|
8202
|
-
let set = __from_binding_runtime_globals(runtimeRequirements);
|
|
8371
|
+
let set = __from_binding_runtime_globals(runtimeRequirements, getCompiler2().rspack.RuntimeGlobals);
|
|
8203
8372
|
return queried.call(chunk, set), {
|
|
8204
|
-
runtimeRequirements: __to_binding_runtime_globals(set)
|
|
8373
|
+
runtimeRequirements: __to_binding_runtime_globals(set, getCompiler2().rspack.RuntimeGlobals)
|
|
8205
8374
|
};
|
|
8206
8375
|
};
|
|
8207
8376
|
}),
|
|
@@ -8209,14 +8378,14 @@ Help:
|
|
|
8209
8378
|
return getCompiler2().__internal__get_compilation().hooks.runtimeRequirementInTree;
|
|
8210
8379
|
}, function(queried) {
|
|
8211
8380
|
return function({ chunk, allRuntimeRequirements, runtimeRequirements }) {
|
|
8212
|
-
let set = __from_binding_runtime_globals(runtimeRequirements), all = __from_binding_runtime_globals(allRuntimeRequirements), customRuntimeGlobals = new Set(), originalAdd = all.add.bind(all), add = function(r) {
|
|
8381
|
+
let set = __from_binding_runtime_globals(runtimeRequirements, getCompiler2().rspack.RuntimeGlobals), all = __from_binding_runtime_globals(allRuntimeRequirements, getCompiler2().rspack.RuntimeGlobals), customRuntimeGlobals = new Set(), originalAdd = all.add.bind(all), add = function(r) {
|
|
8213
8382
|
let r1;
|
|
8214
|
-
return all.has(r) ? all : (r1 = r,
|
|
8383
|
+
return all.has(r) ? all : (r1 = r, Object.values(getCompiler2().rspack.RuntimeGlobals).includes(r1) || customRuntimeGlobals.add(r), originalAdd(r));
|
|
8215
8384
|
};
|
|
8216
8385
|
for (let r of (all.add = add.bind(add), set))queried.for(r).call(chunk, all);
|
|
8217
8386
|
for (let r of customRuntimeGlobals)queried.for(r).call(chunk, all);
|
|
8218
8387
|
return {
|
|
8219
|
-
allRuntimeRequirements: __to_binding_runtime_globals(all)
|
|
8388
|
+
allRuntimeRequirements: __to_binding_runtime_globals(all, getCompiler2().rspack.RuntimeGlobals)
|
|
8220
8389
|
};
|
|
8221
8390
|
};
|
|
8222
8391
|
}),
|
|
@@ -8256,7 +8425,7 @@ Help:
|
|
|
8256
8425
|
}, function(queried) {
|
|
8257
8426
|
return function({ entry, id, codegenResults, runtimeModules }) {
|
|
8258
8427
|
try {
|
|
8259
|
-
let
|
|
8428
|
+
let RuntimeGlobals = getCompiler2().rspack.RuntimeGlobals, moduleRequireFn = (id)=>{
|
|
8260
8429
|
let cached = moduleCache[id];
|
|
8261
8430
|
if (void 0 !== cached) {
|
|
8262
8431
|
if (cached.error) throw cached.error;
|
|
@@ -8270,7 +8439,7 @@ Help:
|
|
|
8270
8439
|
loaded: !1,
|
|
8271
8440
|
error: void 0
|
|
8272
8441
|
},
|
|
8273
|
-
require:
|
|
8442
|
+
require: moduleRequireFn
|
|
8274
8443
|
};
|
|
8275
8444
|
for (let handler of interceptModuleExecution)handler(execOptions);
|
|
8276
8445
|
let result = codegenResults.map[id]["build time"], moduleObject = execOptions.module;
|
|
@@ -8285,11 +8454,11 @@ Help:
|
|
|
8285
8454
|
codeGenerationResult: new CodeGenerationResult(result),
|
|
8286
8455
|
moduleObject
|
|
8287
8456
|
}, {
|
|
8288
|
-
|
|
8457
|
+
[RuntimeGlobals.require]: moduleRequireFn
|
|
8289
8458
|
}), "Compilation.hooks.executeModule"), moduleObject.loaded = !0, moduleObject.exports;
|
|
8290
|
-
}, moduleCache =
|
|
8291
|
-
for (let runtimeModule of runtimeModules)
|
|
8292
|
-
let executeResult =
|
|
8459
|
+
}, moduleCache = moduleRequireFn[RuntimeGlobals.moduleCache.replace(`${RuntimeGlobals.require}.`, "")] = {}, interceptModuleExecution = moduleRequireFn[RuntimeGlobals.interceptModuleExecution.replace(`${RuntimeGlobals.require}.`, "")] = [];
|
|
8460
|
+
for (let runtimeModule of runtimeModules)moduleRequireFn(runtimeModule);
|
|
8461
|
+
let executeResult = moduleRequireFn(entry);
|
|
8293
8462
|
getCompiler2().__internal__get_module_execution_results_map().set(id, executeResult);
|
|
8294
8463
|
} catch (e) {
|
|
8295
8464
|
throw getCompiler2().__internal__get_module_execution_results_map().set(id, e), e;
|
|
@@ -8739,7 +8908,7 @@ Help:
|
|
|
8739
8908
|
obj.children = this.stats.map((stat, idx)=>{
|
|
8740
8909
|
let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
|
|
8741
8910
|
return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
|
|
8742
|
-
}), childOptions.version && (obj.rspackVersion = "1.
|
|
8911
|
+
}), childOptions.version && (obj.rspackVersion = "1.7.0-beta.0", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
|
|
8743
8912
|
let mapError = (j, obj)=>({
|
|
8744
8913
|
...obj,
|
|
8745
8914
|
compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
|
|
@@ -9082,7 +9251,13 @@ Help:
|
|
|
9082
9251
|
}
|
|
9083
9252
|
apply(compiler) {
|
|
9084
9253
|
compiler.hooks.compilation.tap(this.name, (compilation)=>{
|
|
9085
|
-
compilation.hooks.processWarnings.tap(this.name, (warnings)=>warnings.filter((warning)
|
|
9254
|
+
compilation.hooks.processWarnings.tap(this.name, (warnings)=>warnings.filter((warning)=>{
|
|
9255
|
+
let plainWarning = warning.message ? {
|
|
9256
|
+
...warning,
|
|
9257
|
+
message: external_node_util_default().stripVTControlCharacters(warning.message)
|
|
9258
|
+
} : warning;
|
|
9259
|
+
return !this._ignorePattern.some((ignore)=>ignore(plainWarning, compilation));
|
|
9260
|
+
}));
|
|
9086
9261
|
});
|
|
9087
9262
|
}
|
|
9088
9263
|
};
|
|
@@ -9612,15 +9787,20 @@ Help:
|
|
|
9612
9787
|
if (!1 === logging && !debugMode) continue;
|
|
9613
9788
|
let groupStack = [], rootList = [], currentList = rootList, processedLogEntries = 0;
|
|
9614
9789
|
for (let entry of logEntries){
|
|
9615
|
-
let type = entry.type, typeBitFlag = getLogTypeBitFlag(type);
|
|
9790
|
+
let message, type = entry.type, typeBitFlag = getLogTypeBitFlag(type);
|
|
9616
9791
|
if (!debugMode && (acceptedTypes & typeBitFlag) !== typeBitFlag) continue;
|
|
9617
9792
|
if (type === LogType.groupCollapsed && (debugMode || collapsedGroups) && (type = LogType.group), 0 === depthInCollapsedGroup && processedLogEntries++, type === LogType.groupEnd) {
|
|
9618
9793
|
groupStack.pop(), currentList = groupStack.length > 0 ? groupStack[groupStack.length - 1].children : rootList, depthInCollapsedGroup > 0 && depthInCollapsedGroup--;
|
|
9619
9794
|
continue;
|
|
9620
9795
|
}
|
|
9796
|
+
if (entry.type === LogType.time) {
|
|
9797
|
+
let [label, first, second] = entry.args;
|
|
9798
|
+
"number" == typeof first && "number" == typeof second && (message = `${label}: ${1000 * first + second / 1000000} ms`);
|
|
9799
|
+
}
|
|
9800
|
+
message || (message = entry.args?.length ? external_node_util_namespaceObject.format(entry.args[0], ...entry.args.slice(1)) : "");
|
|
9621
9801
|
let newEntry = {
|
|
9622
9802
|
type,
|
|
9623
|
-
message:
|
|
9803
|
+
message: message || "",
|
|
9624
9804
|
trace: loggingTrace ? entry.trace : void 0,
|
|
9625
9805
|
children: type === LogType.group || type === LogType.groupCollapsed ? [] : void 0
|
|
9626
9806
|
};
|
|
@@ -9638,7 +9818,7 @@ Help:
|
|
|
9638
9818
|
object.hash = context.getStatsCompilation(compilation).hash;
|
|
9639
9819
|
},
|
|
9640
9820
|
version: (object)=>{
|
|
9641
|
-
object.version = "5.75.0", object.rspackVersion = "1.
|
|
9821
|
+
object.version = "5.75.0", object.rspackVersion = "1.7.0-beta.0";
|
|
9642
9822
|
},
|
|
9643
9823
|
env: (object, _compilation, _context, { _env })=>{
|
|
9644
9824
|
object.env = _env;
|
|
@@ -9686,7 +9866,7 @@ Help:
|
|
|
9686
9866
|
}), options.assetsSpace ?? 1 / 0);
|
|
9687
9867
|
object.assets = limited.children, object.filteredAssets = limited.filteredChildren;
|
|
9688
9868
|
},
|
|
9689
|
-
chunks: (object, compilation, context,
|
|
9869
|
+
chunks: (object, compilation, context, _options, factory)=>{
|
|
9690
9870
|
let { type, getStatsCompilation } = context, chunks = getStatsCompilation(compilation).chunks;
|
|
9691
9871
|
object.chunks = factory.create(`${type}.chunks`, chunks, context);
|
|
9692
9872
|
},
|
|
@@ -10140,8 +10320,8 @@ Help:
|
|
|
10140
10320
|
warningsFilter: (value)=>(Array.isArray(value) ? value : value ? [
|
|
10141
10321
|
value
|
|
10142
10322
|
] : []).map((filter)=>{
|
|
10143
|
-
if ("string" == typeof filter) return (
|
|
10144
|
-
if (filter instanceof RegExp) return (
|
|
10323
|
+
if ("string" == typeof filter) return (_warning, warningString)=>warningString.includes(filter);
|
|
10324
|
+
if (filter instanceof RegExp) return (_warning, warningString)=>filter.test(warningString);
|
|
10145
10325
|
if ("function" == typeof filter) return filter;
|
|
10146
10326
|
throw Error(`Can only filter warnings with Strings or RegExps. (Given: ${filter})`);
|
|
10147
10327
|
}),
|
|
@@ -10977,7 +11157,7 @@ Help:
|
|
|
10977
11157
|
moduleFilenameTemplate: options.output.devtoolModuleFilenameTemplate,
|
|
10978
11158
|
namespace: options.output.devtoolNamespace
|
|
10979
11159
|
}).apply(compiler);
|
|
10980
|
-
if (new JavascriptModulesPlugin().apply(compiler), new URLPlugin().apply(compiler), new JsonModulesPlugin().apply(compiler), new AssetModulesPlugin().apply(compiler), options.experiments.asyncWebAssembly && new AsyncWebAssemblyModulesPlugin().apply(compiler), options.experiments.css && new CssModulesPlugin().apply(compiler), new lib_EntryOptionPlugin().apply(compiler), assertNotNill(options.context), compiler.hooks.entryOption.call(options.context, options.entry), new RuntimePlugin().apply(compiler), options.experiments.rspackFuture.bundlerInfo && new BundlerInfoRspackPlugin(options.experiments.rspackFuture.bundlerInfo).apply(compiler), new InferAsyncModulesPlugin().apply(compiler), new APIPlugin().apply(compiler), new DataUriPlugin().apply(compiler), new FileUriPlugin().apply(compiler), options.experiments.buildHttp && new HttpUriPlugin(options.experiments.buildHttp).apply(compiler), new EnsureChunkConditionsPlugin().apply(compiler), options.optimization.mergeDuplicateChunks && new MergeDuplicateChunksPlugin().apply(compiler), options.optimization.sideEffects && new SideEffectsFlagPlugin().apply(compiler), options.optimization.providedExports && new FlagDependencyExportsPlugin().apply(compiler), options.optimization.usedExports && new FlagDependencyUsagePlugin("global" === options.optimization.usedExports).apply(compiler), options.optimization.concatenateModules && new ModuleConcatenationPlugin().apply(compiler),
|
|
11160
|
+
if (new JavascriptModulesPlugin().apply(compiler), new URLPlugin().apply(compiler), new JsonModulesPlugin().apply(compiler), new AssetModulesPlugin().apply(compiler), options.experiments.asyncWebAssembly && new AsyncWebAssemblyModulesPlugin().apply(compiler), options.experiments.css && new CssModulesPlugin().apply(compiler), new lib_EntryOptionPlugin().apply(compiler), assertNotNill(options.context), compiler.hooks.entryOption.call(options.context, options.entry), new RuntimePlugin().apply(compiler), options.experiments.rspackFuture.bundlerInfo && new BundlerInfoRspackPlugin(options.experiments.rspackFuture.bundlerInfo).apply(compiler), new InferAsyncModulesPlugin().apply(compiler), new APIPlugin().apply(compiler), new DataUriPlugin().apply(compiler), new FileUriPlugin().apply(compiler), options.experiments.buildHttp && new HttpUriPlugin(options.experiments.buildHttp).apply(compiler), new EnsureChunkConditionsPlugin().apply(compiler), options.optimization.mergeDuplicateChunks && new MergeDuplicateChunksPlugin().apply(compiler), options.optimization.sideEffects && new SideEffectsFlagPlugin().apply(compiler), options.optimization.providedExports && new FlagDependencyExportsPlugin().apply(compiler), options.optimization.usedExports && new FlagDependencyUsagePlugin("global" === options.optimization.usedExports).apply(compiler), options.optimization.concatenateModules && new ModuleConcatenationPlugin().apply(compiler), options.optimization.inlineExports && new InlineExportsPlugin().apply(compiler), options.optimization.mangleExports && new MangleExportsPlugin("size" !== options.optimization.mangleExports).apply(compiler), options.output.enabledLibraryTypes && options.output.enabledLibraryTypes.length > 0) for (let type of options.output.enabledLibraryTypes)new EnableLibraryPlugin(type).apply(compiler);
|
|
10981
11161
|
options.optimization.splitChunks && new SplitChunksPlugin(options.optimization.splitChunks).apply(compiler), options.optimization.removeEmptyChunks && new RemoveEmptyChunksPlugin().apply(compiler), options.optimization.realContentHash && new RealContentHashPlugin().apply(compiler);
|
|
10982
11162
|
let moduleIds = options.optimization.moduleIds;
|
|
10983
11163
|
if (moduleIds) switch(moduleIds){
|
|
@@ -11857,7 +12037,7 @@ Help:
|
|
|
11857
12037
|
let _options = JSON.stringify(options || {});
|
|
11858
12038
|
return binding_default().transform(source, _options);
|
|
11859
12039
|
}
|
|
11860
|
-
let exports_rspackVersion = "1.
|
|
12040
|
+
let exports_rspackVersion = "1.7.0-beta.0", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
|
|
11861
12041
|
getNormalizedRspackOptions: getNormalizedRspackOptions,
|
|
11862
12042
|
applyRspackOptionsDefaults: applyRspackOptionsDefaults,
|
|
11863
12043
|
getNormalizedWebpackOptions: getNormalizedRspackOptions,
|
|
@@ -11965,7 +12145,7 @@ Help:
|
|
|
11965
12145
|
}), sum;
|
|
11966
12146
|
}, {}), manifestExposes = function(exposes) {
|
|
11967
12147
|
if (!exposes) return;
|
|
11968
|
-
let result = parseOptions(exposes, (value
|
|
12148
|
+
let result = parseOptions(exposes, (value)=>({
|
|
11969
12149
|
import: Array.isArray(value) ? value : [
|
|
11970
12150
|
value
|
|
11971
12151
|
],
|
|
@@ -12061,41 +12241,12 @@ Help:
|
|
|
12061
12241
|
}
|
|
12062
12242
|
},
|
|
12063
12243
|
RemoveDuplicateModulesPlugin: RemoveDuplicateModulesPlugin,
|
|
12244
|
+
SubresourceIntegrityPlugin: SubresourceIntegrityPlugin,
|
|
12064
12245
|
EsmLibraryPlugin: EsmLibraryPlugin,
|
|
12065
12246
|
RsdoctorPlugin: RsdoctorPluginImpl,
|
|
12066
12247
|
RstestPlugin: RstestPlugin,
|
|
12067
12248
|
RslibPlugin: RslibPlugin,
|
|
12068
|
-
|
|
12069
|
-
lazyCompilationMiddleware: (compiler)=>{
|
|
12070
|
-
if (compiler instanceof MultiCompiler) {
|
|
12071
|
-
let middlewareByCompiler = new Map(), i = 0, isReportDeprecatedWarned = !1, isReportRepeatWarned = !1;
|
|
12072
|
-
for (let c of compiler.compilers){
|
|
12073
|
-
if (c.options.experiments.lazyCompilation && (c.name ? console.warn(`The 'experiments.lazyCompilation' option in compiler named '${c.name}' is deprecated, please use the Configuration top level 'lazyCompilation' instead.`) : isReportDeprecatedWarned || (console.warn(DEPRECATED_LAZY_COMPILATION_OPTIONS_WARN), isReportDeprecatedWarned = !0)), c.options.lazyCompilation && c.options.experiments.lazyCompilation && (c.name ? console.warn(`The top-level 'lazyCompilation' option in compiler named '${c.name}' will override the 'experiments.lazyCompilation' option.`) : isReportRepeatWarned || (console.warn(REPEAT_LAZY_COMPILATION_OPTIONS_WARN), isReportRepeatWarned = !0)), !c.options.lazyCompilation && !c.options.experiments.lazyCompilation) continue;
|
|
12074
|
-
let options = {
|
|
12075
|
-
...c.options.experiments.lazyCompilation,
|
|
12076
|
-
...c.options.lazyCompilation
|
|
12077
|
-
}, prefix = options.prefix || LAZY_COMPILATION_PREFIX;
|
|
12078
|
-
options.prefix = `${prefix}__${i++}`;
|
|
12079
|
-
let activeModules = new Set();
|
|
12080
|
-
middlewareByCompiler.set(options.prefix, lazyCompilationMiddlewareInternal(compiler, activeModules, options.prefix)), applyPlugin(c, options, activeModules);
|
|
12081
|
-
}
|
|
12082
|
-
let keys = [
|
|
12083
|
-
...middlewareByCompiler.keys()
|
|
12084
|
-
];
|
|
12085
|
-
return (req, res, next)=>{
|
|
12086
|
-
let key = keys.find((key)=>req.url?.startsWith(key));
|
|
12087
|
-
if (!key) return next?.();
|
|
12088
|
-
let middleware = middlewareByCompiler.get(key);
|
|
12089
|
-
return middleware?.(req, res, next);
|
|
12090
|
-
};
|
|
12091
|
-
}
|
|
12092
|
-
if (compiler.options.experiments.lazyCompilation && (console.warn(DEPRECATED_LAZY_COMPILATION_OPTIONS_WARN), compiler.options.lazyCompilation && console.warn(REPEAT_LAZY_COMPILATION_OPTIONS_WARN)), !compiler.options.lazyCompilation && !compiler.options.experiments.lazyCompilation) return noop;
|
|
12093
|
-
let activeModules = new Set(), options = {
|
|
12094
|
-
...compiler.options.experiments.lazyCompilation,
|
|
12095
|
-
...compiler.options.lazyCompilation
|
|
12096
|
-
};
|
|
12097
|
-
return applyPlugin(compiler, options, activeModules), lazyCompilationMiddlewareInternal(compiler, activeModules, options.prefix || LAZY_COMPILATION_PREFIX);
|
|
12098
|
-
},
|
|
12249
|
+
lazyCompilationMiddleware: lazyCompilationMiddleware,
|
|
12099
12250
|
swc: {
|
|
12100
12251
|
minify: minify,
|
|
12101
12252
|
transform: transform,
|
|
@@ -12205,7 +12356,7 @@ Help:
|
|
|
12205
12356
|
}, exports_namespaceObject);
|
|
12206
12357
|
src_fn.rspack = src_fn, src_fn.webpack = src_fn;
|
|
12207
12358
|
let src_rspack_0 = src_fn, src_0 = src_rspack_0;
|
|
12208
|
-
})(), exports.AsyncDependenciesBlock = __webpack_exports__.AsyncDependenciesBlock, exports.BannerPlugin = __webpack_exports__.BannerPlugin, exports.CircularDependencyRspackPlugin = __webpack_exports__.CircularDependencyRspackPlugin, exports.Compilation = __webpack_exports__.Compilation, exports.Compiler = __webpack_exports__.Compiler, exports.ConcatenatedModule = __webpack_exports__.ConcatenatedModule, exports.ContextModule = __webpack_exports__.ContextModule, exports.ContextReplacementPlugin = __webpack_exports__.ContextReplacementPlugin, exports.CopyRspackPlugin = __webpack_exports__.CopyRspackPlugin, exports.CssExtractRspackPlugin = __webpack_exports__.CssExtractRspackPlugin, exports.DefinePlugin = __webpack_exports__.DefinePlugin, exports.Dependency = __webpack_exports__.Dependency, exports.DllPlugin = __webpack_exports__.DllPlugin, exports.DllReferencePlugin = __webpack_exports__.DllReferencePlugin, exports.DynamicEntryPlugin = __webpack_exports__.DynamicEntryPlugin, exports.EntryDependency = __webpack_exports__.EntryDependency, exports.EntryOptionPlugin = __webpack_exports__.EntryOptionPlugin, exports.EntryPlugin = __webpack_exports__.EntryPlugin, exports.EnvironmentPlugin = __webpack_exports__.EnvironmentPlugin, exports.EvalDevToolModulePlugin = __webpack_exports__.EvalDevToolModulePlugin, exports.EvalSourceMapDevToolPlugin = __webpack_exports__.EvalSourceMapDevToolPlugin, exports.ExternalModule = __webpack_exports__.ExternalModule, exports.ExternalsPlugin = __webpack_exports__.ExternalsPlugin, exports.HotModuleReplacementPlugin = __webpack_exports__.HotModuleReplacementPlugin, exports.HtmlRspackPlugin = __webpack_exports__.HtmlRspackPlugin, exports.IgnorePlugin = __webpack_exports__.IgnorePlugin, exports.LightningCssMinimizerRspackPlugin = __webpack_exports__.LightningCssMinimizerRspackPlugin, exports.LoaderOptionsPlugin = __webpack_exports__.LoaderOptionsPlugin, exports.LoaderTargetPlugin = __webpack_exports__.LoaderTargetPlugin, exports.Module = __webpack_exports__.Module, exports.ModuleFilenameHelpers = __webpack_exports__.ModuleFilenameHelpers, exports.MultiCompiler = __webpack_exports__.MultiCompiler, exports.MultiStats = __webpack_exports__.MultiStats, exports.NoEmitOnErrorsPlugin = __webpack_exports__.NoEmitOnErrorsPlugin, exports.NormalModule = __webpack_exports__.NormalModule, exports.NormalModuleReplacementPlugin = __webpack_exports__.NormalModuleReplacementPlugin, exports.ProgressPlugin = __webpack_exports__.ProgressPlugin, exports.ProvidePlugin = __webpack_exports__.ProvidePlugin, exports.RspackOptionsApply = __webpack_exports__.RspackOptionsApply, exports.RuntimeGlobals = __webpack_exports__.RuntimeGlobals, exports.RuntimeModule = __webpack_exports__.RuntimeModule, exports.RuntimePlugin = __webpack_exports__.RuntimePlugin, exports.SourceMapDevToolPlugin = __webpack_exports__.SourceMapDevToolPlugin, exports.Stats = __webpack_exports__.Stats, exports.StatsErrorCode = __webpack_exports__.StatsErrorCode, exports.SwcJsMinimizerRspackPlugin = __webpack_exports__.SwcJsMinimizerRspackPlugin, exports.Template = __webpack_exports__.Template, exports.ValidationError = __webpack_exports__.ValidationError, exports.WarnCaseSensitiveModulesPlugin = __webpack_exports__.WarnCaseSensitiveModulesPlugin, exports.WebpackError = __webpack_exports__.WebpackError, exports.WebpackOptionsApply = __webpack_exports__.WebpackOptionsApply, exports.config = __webpack_exports__.config, exports.container = __webpack_exports__.container, exports.default = __webpack_exports__.default, exports.electron = __webpack_exports__.electron, exports.experiments = __webpack_exports__.experiments, exports.javascript = __webpack_exports__.javascript, exports.library = __webpack_exports__.library, exports.node = __webpack_exports__.node, exports.optimize = __webpack_exports__.optimize, exports.rspack = __webpack_exports__.rspack, exports.rspackVersion = __webpack_exports__.rspackVersion, exports.sharing = __webpack_exports__.sharing, exports.sources = __webpack_exports__.sources, exports.util = __webpack_exports__.util, exports.version = __webpack_exports__.version, exports.wasm = __webpack_exports__.wasm, exports.web = __webpack_exports__.web, exports.webworker = __webpack_exports__.webworker, __webpack_exports__)-1 === [
|
|
12359
|
+
})(), exports.AsyncDependenciesBlock = __webpack_exports__.AsyncDependenciesBlock, exports.BannerPlugin = __webpack_exports__.BannerPlugin, exports.CircularDependencyRspackPlugin = __webpack_exports__.CircularDependencyRspackPlugin, exports.Compilation = __webpack_exports__.Compilation, exports.Compiler = __webpack_exports__.Compiler, exports.ConcatenatedModule = __webpack_exports__.ConcatenatedModule, exports.ContextModule = __webpack_exports__.ContextModule, exports.ContextReplacementPlugin = __webpack_exports__.ContextReplacementPlugin, exports.CopyRspackPlugin = __webpack_exports__.CopyRspackPlugin, exports.CssExtractRspackPlugin = __webpack_exports__.CssExtractRspackPlugin, exports.DefinePlugin = __webpack_exports__.DefinePlugin, exports.Dependency = __webpack_exports__.Dependency, exports.DllPlugin = __webpack_exports__.DllPlugin, exports.DllReferencePlugin = __webpack_exports__.DllReferencePlugin, exports.DynamicEntryPlugin = __webpack_exports__.DynamicEntryPlugin, exports.EntryDependency = __webpack_exports__.EntryDependency, exports.EntryOptionPlugin = __webpack_exports__.EntryOptionPlugin, exports.EntryPlugin = __webpack_exports__.EntryPlugin, exports.EnvironmentPlugin = __webpack_exports__.EnvironmentPlugin, exports.EvalDevToolModulePlugin = __webpack_exports__.EvalDevToolModulePlugin, exports.EvalSourceMapDevToolPlugin = __webpack_exports__.EvalSourceMapDevToolPlugin, exports.ExternalModule = __webpack_exports__.ExternalModule, exports.ExternalsPlugin = __webpack_exports__.ExternalsPlugin, exports.HotModuleReplacementPlugin = __webpack_exports__.HotModuleReplacementPlugin, exports.HtmlRspackPlugin = __webpack_exports__.HtmlRspackPlugin, exports.IgnorePlugin = __webpack_exports__.IgnorePlugin, exports.LightningCssMinimizerRspackPlugin = __webpack_exports__.LightningCssMinimizerRspackPlugin, exports.LoaderOptionsPlugin = __webpack_exports__.LoaderOptionsPlugin, exports.LoaderTargetPlugin = __webpack_exports__.LoaderTargetPlugin, exports.Module = __webpack_exports__.Module, exports.ModuleFilenameHelpers = __webpack_exports__.ModuleFilenameHelpers, exports.MultiCompiler = __webpack_exports__.MultiCompiler, exports.MultiStats = __webpack_exports__.MultiStats, exports.NoEmitOnErrorsPlugin = __webpack_exports__.NoEmitOnErrorsPlugin, exports.NormalModule = __webpack_exports__.NormalModule, exports.NormalModuleReplacementPlugin = __webpack_exports__.NormalModuleReplacementPlugin, exports.ProgressPlugin = __webpack_exports__.ProgressPlugin, exports.ProvidePlugin = __webpack_exports__.ProvidePlugin, exports.RspackOptionsApply = __webpack_exports__.RspackOptionsApply, exports.RuntimeGlobals = __webpack_exports__.RuntimeGlobals, exports.RuntimeModule = __webpack_exports__.RuntimeModule, exports.RuntimePlugin = __webpack_exports__.RuntimePlugin, exports.SourceMapDevToolPlugin = __webpack_exports__.SourceMapDevToolPlugin, exports.Stats = __webpack_exports__.Stats, exports.StatsErrorCode = __webpack_exports__.StatsErrorCode, exports.SubresourceIntegrityPlugin = __webpack_exports__.SubresourceIntegrityPlugin, exports.SwcJsMinimizerRspackPlugin = __webpack_exports__.SwcJsMinimizerRspackPlugin, exports.Template = __webpack_exports__.Template, exports.ValidationError = __webpack_exports__.ValidationError, exports.WarnCaseSensitiveModulesPlugin = __webpack_exports__.WarnCaseSensitiveModulesPlugin, exports.WebpackError = __webpack_exports__.WebpackError, exports.WebpackOptionsApply = __webpack_exports__.WebpackOptionsApply, exports.config = __webpack_exports__.config, exports.container = __webpack_exports__.container, exports.default = __webpack_exports__.default, exports.electron = __webpack_exports__.electron, exports.experiments = __webpack_exports__.experiments, exports.javascript = __webpack_exports__.javascript, exports.lazyCompilationMiddleware = __webpack_exports__.lazyCompilationMiddleware, exports.library = __webpack_exports__.library, exports.node = __webpack_exports__.node, exports.optimize = __webpack_exports__.optimize, exports.rspack = __webpack_exports__.rspack, exports.rspackVersion = __webpack_exports__.rspackVersion, exports.sharing = __webpack_exports__.sharing, exports.sources = __webpack_exports__.sources, exports.util = __webpack_exports__.util, exports.version = __webpack_exports__.version, exports.wasm = __webpack_exports__.wasm, exports.web = __webpack_exports__.web, exports.webworker = __webpack_exports__.webworker, __webpack_exports__)-1 === [
|
|
12209
12360
|
"AsyncDependenciesBlock",
|
|
12210
12361
|
"BannerPlugin",
|
|
12211
12362
|
"CircularDependencyRspackPlugin",
|
|
@@ -12251,6 +12402,7 @@ Help:
|
|
|
12251
12402
|
"SourceMapDevToolPlugin",
|
|
12252
12403
|
"Stats",
|
|
12253
12404
|
"StatsErrorCode",
|
|
12405
|
+
"SubresourceIntegrityPlugin",
|
|
12254
12406
|
"SwcJsMinimizerRspackPlugin",
|
|
12255
12407
|
"Template",
|
|
12256
12408
|
"ValidationError",
|
|
@@ -12263,6 +12415,7 @@ Help:
|
|
|
12263
12415
|
"electron",
|
|
12264
12416
|
"experiments",
|
|
12265
12417
|
"javascript",
|
|
12418
|
+
"lazyCompilationMiddleware",
|
|
12266
12419
|
"library",
|
|
12267
12420
|
"node",
|
|
12268
12421
|
"optimize",
|
|
@@ -12275,7 +12428,7 @@ Help:
|
|
|
12275
12428
|
"wasm",
|
|
12276
12429
|
"web",
|
|
12277
12430
|
"webworker"
|
|
12278
|
-
].indexOf(
|
|
12431
|
+
].indexOf(__rspack_i) && (exports[__rspack_i] = __webpack_exports__[__rspack_i]);
|
|
12279
12432
|
Object.defineProperty(exports, '__esModule', {
|
|
12280
12433
|
value: !0
|
|
12281
12434
|
});
|