@rspack/core 1.6.5 → 1.6.7
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 +1 -1
- package/dist/RuntimeGlobals.d.ts +106 -78
- package/dist/builtin-plugin/css-extract/loader.d.ts +4 -4
- package/dist/config/target.d.ts +2 -0
- package/dist/config/types.d.ts +23 -3
- package/dist/cssExtractHmr.js +2 -2
- package/dist/cssExtractLoader.js +4 -4
- package/dist/index.js +289 -137
- package/dist/loader-runner/index.d.ts +3 -1
- package/dist/loader-runner/service.d.ts +2 -0
- package/dist/worker.js +16 -16
- 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,
|
|
@@ -331,7 +331,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
331
331
|
SourceMapDevToolPlugin: ()=>SourceMapDevToolPlugin,
|
|
332
332
|
library: ()=>exports_library,
|
|
333
333
|
node: ()=>exports_node,
|
|
334
|
-
RuntimeGlobals: ()=>
|
|
334
|
+
RuntimeGlobals: ()=>DefaultRuntimeGlobals,
|
|
335
335
|
rspackVersion: ()=>exports_rspackVersion,
|
|
336
336
|
util: ()=>util,
|
|
337
337
|
optimize: ()=>optimize,
|
|
@@ -344,7 +344,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
344
344
|
wasm: ()=>exports_wasm,
|
|
345
345
|
ProgressPlugin: ()=>ProgressPlugin
|
|
346
346
|
});
|
|
347
|
-
var StatsErrorCode, _computedKey, _computedKey1, _computedKey2, ArrayQueue_computedKey, browserslistTargetHandler_namespaceObject = {};
|
|
347
|
+
var RuntimeGlobals, StatsErrorCode, _computedKey, _computedKey1, _computedKey2, ArrayQueue_computedKey, browserslistTargetHandler_namespaceObject = {};
|
|
348
348
|
__webpack_require__.r(browserslistTargetHandler_namespaceObject), __webpack_require__.d(browserslistTargetHandler_namespaceObject, {
|
|
349
349
|
resolve: ()=>browserslistTargetHandler_resolve
|
|
350
350
|
});
|
|
@@ -395,7 +395,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
395
395
|
ProgressPlugin: ()=>ProgressPlugin,
|
|
396
396
|
ProvidePlugin: ()=>ProvidePlugin,
|
|
397
397
|
RspackOptionsApply: ()=>RspackOptionsApply,
|
|
398
|
-
RuntimeGlobals: ()=>
|
|
398
|
+
RuntimeGlobals: ()=>DefaultRuntimeGlobals,
|
|
399
399
|
RuntimeModule: ()=>RuntimeModule,
|
|
400
400
|
RuntimePlugin: ()=>RuntimePlugin,
|
|
401
401
|
SourceMapDevToolPlugin: ()=>SourceMapDevToolPlugin,
|
|
@@ -2945,13 +2945,13 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
2945
2945
|
super(ModuleError_createMessage(err, "Warning", from)), this.name = "ModuleWarning", this.error = err, this.details = getErrorDetails(err);
|
|
2946
2946
|
}
|
|
2947
2947
|
}
|
|
2948
|
-
let ensureLoaderWorkerPool = async ()=>service_pool || (service_pool = import("../compiled/tinypool/dist/index.js").then(({ Tinypool })=>{
|
|
2949
|
-
let availableThreads = Math.max(__webpack_require__("node:os").cpus().length - 1, 1);
|
|
2948
|
+
let ensureLoaderWorkerPool = async (workerOptions)=>service_pool || (service_pool = import("../compiled/tinypool/dist/index.js").then(({ Tinypool })=>{
|
|
2949
|
+
let availableThreads = Math.max(__webpack_require__("node:os").cpus().length - 1, 1), maxWorkers = workerOptions?.maxWorkers ? Math.max(workerOptions.maxWorkers, 1) : void 0;
|
|
2950
2950
|
return new Tinypool({
|
|
2951
2951
|
filename: external_node_path_default().resolve(__dirname, "worker.js"),
|
|
2952
2952
|
useAtomics: !1,
|
|
2953
|
-
maxThreads: availableThreads,
|
|
2954
|
-
minThreads: availableThreads,
|
|
2953
|
+
maxThreads: maxWorkers || availableThreads,
|
|
2954
|
+
minThreads: maxWorkers || availableThreads,
|
|
2955
2955
|
concurrentTasksPerWorker: 1
|
|
2956
2956
|
});
|
|
2957
2957
|
}));
|
|
@@ -2968,7 +2968,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
2968
2968
|
};
|
|
2969
2969
|
throw Error("Failed to serialize error, only string, Error instances and objects with a message property are supported");
|
|
2970
2970
|
}
|
|
2971
|
-
let service_run = async (loaderName, task, options)=>ensureLoaderWorkerPool().then(async (pool)=>{
|
|
2971
|
+
let service_run = async (loaderName, task, options, workerOptions)=>ensureLoaderWorkerPool(workerOptions).then(async (pool)=>{
|
|
2972
2972
|
let { MessageChannel } = await import("node:worker_threads"), { port1: mainPort, port2: workerPort } = new MessageChannel(), { port1: mainSyncPort, port2: workerSyncPort } = new MessageChannel();
|
|
2973
2973
|
return new Promise((resolve, reject)=>{
|
|
2974
2974
|
let handleError = (error)=>{
|
|
@@ -3589,7 +3589,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
3589
3589
|
throw Error(`Unknown request type: ${requestType}`);
|
|
3590
3590
|
}
|
|
3591
3591
|
}
|
|
3592
|
-
}) || [];
|
|
3592
|
+
}, "object" == typeof currentLoaderObject?.parallel ? currentLoaderObject.parallel : void 0) || [];
|
|
3593
3593
|
} else loaderState === binding_.JsLoaderState.Normal && function(args, raw) {
|
|
3594
3594
|
if (!raw && args[0] instanceof Uint8Array) {
|
|
3595
3595
|
var buf;
|
|
@@ -5173,6 +5173,35 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
5173
5173
|
0
|
|
5174
5174
|
]
|
|
5175
5175
|
}),
|
|
5176
|
+
methodShorthand: rawChecker({
|
|
5177
|
+
chrome: 47,
|
|
5178
|
+
and_chr: 47,
|
|
5179
|
+
edge: 12,
|
|
5180
|
+
firefox: 34,
|
|
5181
|
+
and_ff: 34,
|
|
5182
|
+
opera: 34,
|
|
5183
|
+
op_mob: 34,
|
|
5184
|
+
safari: 9,
|
|
5185
|
+
ios_saf: 9,
|
|
5186
|
+
samsung: 5,
|
|
5187
|
+
android: 47,
|
|
5188
|
+
and_qq: [
|
|
5189
|
+
14,
|
|
5190
|
+
9
|
|
5191
|
+
],
|
|
5192
|
+
and_uc: [
|
|
5193
|
+
15,
|
|
5194
|
+
5
|
|
5195
|
+
],
|
|
5196
|
+
kaios: [
|
|
5197
|
+
2,
|
|
5198
|
+
5
|
|
5199
|
+
],
|
|
5200
|
+
node: [
|
|
5201
|
+
4,
|
|
5202
|
+
9
|
|
5203
|
+
]
|
|
5204
|
+
}),
|
|
5176
5205
|
arrowFunction: rawChecker({
|
|
5177
5206
|
chrome: 45,
|
|
5178
5207
|
and_chr: 45,
|
|
@@ -5561,6 +5590,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
5561
5590
|
const: v(6),
|
|
5562
5591
|
templateLiteral: v(4),
|
|
5563
5592
|
optionalChaining: v(14),
|
|
5593
|
+
methodShorthand: v(4),
|
|
5564
5594
|
arrowFunction: v(6),
|
|
5565
5595
|
asyncFunction: v(7, 6),
|
|
5566
5596
|
forOf: v(5),
|
|
@@ -5600,6 +5630,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
5600
5630
|
const: v(1, 1),
|
|
5601
5631
|
templateLiteral: v(1, 1),
|
|
5602
5632
|
optionalChaining: v(8),
|
|
5633
|
+
methodShorthand: v(1, 1),
|
|
5603
5634
|
arrowFunction: v(1, 1),
|
|
5604
5635
|
asyncFunction: v(1, 7),
|
|
5605
5636
|
forOf: v(0, 36),
|
|
@@ -5635,6 +5666,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
5635
5666
|
const: v(0, 15),
|
|
5636
5667
|
templateLiteral: v(0, 13),
|
|
5637
5668
|
optionalChaining: v(0, 44),
|
|
5669
|
+
methodShorthand: v(0, 15),
|
|
5638
5670
|
arrowFunction: v(0, 15),
|
|
5639
5671
|
asyncFunction: v(0, 21),
|
|
5640
5672
|
forOf: v(0, 13),
|
|
@@ -5656,6 +5688,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
5656
5688
|
const: v >= 2015,
|
|
5657
5689
|
templateLiteral: v >= 2015,
|
|
5658
5690
|
optionalChaining: v >= 2020,
|
|
5691
|
+
methodShorthand: v >= 2015,
|
|
5659
5692
|
arrowFunction: v >= 2015,
|
|
5660
5693
|
forOf: v >= 2015,
|
|
5661
5694
|
destructuring: v >= 2015,
|
|
@@ -5752,7 +5785,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
5752
5785
|
}, applyExperimentsDefaults = (experiments, { development })=>{
|
|
5753
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", !1), D(experiments, "inlineEnum", !1), D(experiments, "typeReexportsPresence", !1), D(experiments, "lazyBarrel", !0);
|
|
5754
5787
|
}, applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
5755
|
-
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.6.
|
|
5788
|
+
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.6.7"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
|
|
5756
5789
|
}, applySnapshotDefaults = (_snapshot, _env)=>{}, applyModuleDefaults = (module1, { cache, asyncWebAssembly, css, targetProperties, mode, uniqueName, usedExports, inlineConst, deferImport })=>{
|
|
5757
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, { usedExports, inlineConst, deferImport })=>{
|
|
5758
5791
|
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", [
|
|
@@ -5909,6 +5942,9 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
5909
5942
|
}), F(environment, "const", ()=>{
|
|
5910
5943
|
let v;
|
|
5911
5944
|
return tp && ((v = tp.const) || void 0 === v);
|
|
5945
|
+
}), F(environment, "methodShorthand", ()=>{
|
|
5946
|
+
let v;
|
|
5947
|
+
return tp && ((v = tp.methodShorthand) || void 0 === v);
|
|
5912
5948
|
}), F(environment, "arrowFunction", ()=>{
|
|
5913
5949
|
let v;
|
|
5914
5950
|
return tp && ((v = tp.arrowFunction) || void 0 === v);
|
|
@@ -5948,7 +5984,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
5948
5984
|
return "function" != typeof chunkFilename ? chunkFilename.replace(/\.[mc]?js(\?|$)/, ".css$1") : "[id].css";
|
|
5949
5985
|
}), D(output, "hotUpdateChunkFilename", `[id].[fullhash].hot-update.${output.module ? "mjs" : "js"}`), F(output, "hotUpdateMainFilename", ()=>`[runtime].[fullhash].hot-update.${output.module ? "json.mjs" : "json"}`);
|
|
5950
5986
|
let uniqueNameId = Template.toIdentifier(output.uniqueName);
|
|
5951
|
-
F(output, "hotUpdateGlobal", ()=>`webpackHotUpdate${uniqueNameId}`), F(output, "chunkLoadingGlobal", ()=>`webpackChunk${uniqueNameId}`), D(output, "assetModuleFilename", "[hash][ext][query]"), D(output, "webassemblyModuleFilename", "[hash].module.wasm"), D(output, "compareBeforeEmit", !0), F(output, "path", ()=>external_node_path_default().join(process.cwd(), "dist")), F(output, "pathinfo", ()
|
|
5987
|
+
F(output, "hotUpdateGlobal", ()=>`webpackHotUpdate${uniqueNameId}`), F(output, "chunkLoadingGlobal", ()=>`webpackChunk${uniqueNameId}`), D(output, "assetModuleFilename", "[hash][ext][query]"), D(output, "webassemblyModuleFilename", "[hash].module.wasm"), D(output, "compareBeforeEmit", !0), F(output, "path", ()=>external_node_path_default().join(process.cwd(), "dist")), F(output, "pathinfo", ()=>!1), D(output, "publicPath", tp && (tp.document || tp.importScripts) ? "auto" : ""), D(output, "hashFunction", "xxhash64"), D(output, "hashDigest", "hex"), D(output, "hashDigestLength", 16), D(output, "strictModuleErrorHandling", !1), output.library && F(output.library, "type", ()=>output.module ? "module" : "var"), F(output, "chunkFormat", ()=>{
|
|
5952
5988
|
if (tp) {
|
|
5953
5989
|
let helpMessage = isAffectedByBrowserslist ? "Make sure that your 'browserslist' includes only platforms that support these features or select an appropriate 'target' to allow selecting a chunk format by default. Alternatively specify the 'output.chunkFormat' directly." : "Select an appropriate 'target' to allow selecting one by default, or specify the 'output.chunkFormat' directly.";
|
|
5954
5990
|
if (output.module) {
|
|
@@ -6483,15 +6519,214 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6483
6519
|
if (customKeys) for (let key of Object.keys(customKeys))key in result || (result[key] = customKeys[key]({}));
|
|
6484
6520
|
return result;
|
|
6485
6521
|
};
|
|
6522
|
+
function __from_binding_runtime_globals(runtimeRequirements, compilerRuntimeGlobals) {
|
|
6523
|
+
let res = new Set();
|
|
6524
|
+
for (let flag of runtimeRequirements.value)flag in compilerRuntimeGlobals ? res.add(compilerRuntimeGlobals[flag]) : res.add(flag);
|
|
6525
|
+
return res;
|
|
6526
|
+
}
|
|
6527
|
+
function __to_binding_runtime_globals(runtimeRequirements, compilerRuntimeGlobals) {
|
|
6528
|
+
let res = {
|
|
6529
|
+
value: []
|
|
6530
|
+
}, reversedCompilerRuntimeGlobals = Object.fromEntries(Object.entries(compilerRuntimeGlobals).map(([key, value])=>[
|
|
6531
|
+
value,
|
|
6532
|
+
key
|
|
6533
|
+
]));
|
|
6534
|
+
for (let flag of Array.from(runtimeRequirements)){
|
|
6535
|
+
let item = reversedCompilerRuntimeGlobals[flag];
|
|
6536
|
+
"string" == typeof item ? res.value.push(item) : res.value.push(flag);
|
|
6537
|
+
}
|
|
6538
|
+
return res;
|
|
6539
|
+
}
|
|
6540
|
+
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);
|
|
6541
|
+
function renderRuntimeVariables(variable, _compilerOptions) {
|
|
6542
|
+
switch(variable){
|
|
6543
|
+
case 0:
|
|
6544
|
+
return "__webpack_require__";
|
|
6545
|
+
case 1:
|
|
6546
|
+
return "__webpack_modules__";
|
|
6547
|
+
case 2:
|
|
6548
|
+
return "__webpack_module_cache__";
|
|
6549
|
+
case 3:
|
|
6550
|
+
return "__webpack_module__";
|
|
6551
|
+
case 4:
|
|
6552
|
+
return "__webpack_exports__";
|
|
6553
|
+
case 5:
|
|
6554
|
+
return "__webpack_exec__";
|
|
6555
|
+
}
|
|
6556
|
+
}
|
|
6557
|
+
function createCompilerRuntimeGlobals(compilerOptions) {
|
|
6558
|
+
let res = {};
|
|
6559
|
+
for (let key of Object.keys(RuntimeGlobals_RuntimeGlobals))res[key] = function(runtimeGlobals, _compilerOptions) {
|
|
6560
|
+
let scope_name = renderRuntimeVariables(0, _compilerOptions), exports_name = renderRuntimeVariables(4, _compilerOptions);
|
|
6561
|
+
switch(runtimeGlobals){
|
|
6562
|
+
case 0:
|
|
6563
|
+
return scope_name;
|
|
6564
|
+
case 1:
|
|
6565
|
+
return `${scope_name}.*`;
|
|
6566
|
+
case 2:
|
|
6567
|
+
return exports_name;
|
|
6568
|
+
case 3:
|
|
6569
|
+
return "top-level-this-exports";
|
|
6570
|
+
case 4:
|
|
6571
|
+
return "return-exports-from-runtime";
|
|
6572
|
+
case 5:
|
|
6573
|
+
return "module";
|
|
6574
|
+
case 6:
|
|
6575
|
+
return "module.id";
|
|
6576
|
+
case 7:
|
|
6577
|
+
return "module.loaded";
|
|
6578
|
+
case 8:
|
|
6579
|
+
return `${scope_name}.p`;
|
|
6580
|
+
case 9:
|
|
6581
|
+
return `${scope_name}.s`;
|
|
6582
|
+
case 10:
|
|
6583
|
+
return `${scope_name}.c`;
|
|
6584
|
+
case 11:
|
|
6585
|
+
return `${scope_name}.m`;
|
|
6586
|
+
case 12:
|
|
6587
|
+
return `${scope_name}.m (add only)`;
|
|
6588
|
+
case 13:
|
|
6589
|
+
return `${scope_name}.e`;
|
|
6590
|
+
case 14:
|
|
6591
|
+
return `${scope_name}.f`;
|
|
6592
|
+
case 15:
|
|
6593
|
+
return `${scope_name}.f (include entries)`;
|
|
6594
|
+
case 16:
|
|
6595
|
+
return `${scope_name}.E`;
|
|
6596
|
+
case 17:
|
|
6597
|
+
return `${scope_name}.F`;
|
|
6598
|
+
case 18:
|
|
6599
|
+
return `${scope_name}.G`;
|
|
6600
|
+
case 19:
|
|
6601
|
+
return `${scope_name}.H`;
|
|
6602
|
+
case 20:
|
|
6603
|
+
return `${scope_name}.d`;
|
|
6604
|
+
case 21:
|
|
6605
|
+
return `${scope_name}.r`;
|
|
6606
|
+
case 22:
|
|
6607
|
+
return `${scope_name}.t`;
|
|
6608
|
+
case 23:
|
|
6609
|
+
return `${scope_name}.n`;
|
|
6610
|
+
case 24:
|
|
6611
|
+
return `${scope_name}.hmd`;
|
|
6612
|
+
case 25:
|
|
6613
|
+
return `${scope_name}.nmd`;
|
|
6614
|
+
case 26:
|
|
6615
|
+
return `${scope_name}.h`;
|
|
6616
|
+
case 27:
|
|
6617
|
+
return `${scope_name}.w`;
|
|
6618
|
+
case 28:
|
|
6619
|
+
return `${scope_name}.v`;
|
|
6620
|
+
case 29:
|
|
6621
|
+
return `${scope_name}.oe`;
|
|
6622
|
+
case 30:
|
|
6623
|
+
return `${scope_name}.nc`;
|
|
6624
|
+
case 31:
|
|
6625
|
+
return `${scope_name}.l`;
|
|
6626
|
+
case 32:
|
|
6627
|
+
return `${scope_name}.ts`;
|
|
6628
|
+
case 33:
|
|
6629
|
+
return `${scope_name}.tu`;
|
|
6630
|
+
case 34:
|
|
6631
|
+
return `${scope_name}.tt`;
|
|
6632
|
+
case 35:
|
|
6633
|
+
return "has fetch priority";
|
|
6634
|
+
case 36:
|
|
6635
|
+
return `${scope_name}.cn`;
|
|
6636
|
+
case 37:
|
|
6637
|
+
return `${scope_name}.j`;
|
|
6638
|
+
case 38:
|
|
6639
|
+
return `${scope_name}.u`;
|
|
6640
|
+
case 39:
|
|
6641
|
+
return `${scope_name}.k`;
|
|
6642
|
+
case 40:
|
|
6643
|
+
return `${scope_name}.rv`;
|
|
6644
|
+
case 41:
|
|
6645
|
+
return "has css modules";
|
|
6646
|
+
case 42:
|
|
6647
|
+
return `${scope_name}.ruid`;
|
|
6648
|
+
case 43:
|
|
6649
|
+
return `${scope_name}.hu`;
|
|
6650
|
+
case 44:
|
|
6651
|
+
return `${scope_name}.hk`;
|
|
6652
|
+
case 45:
|
|
6653
|
+
return `${scope_name}.x`;
|
|
6654
|
+
case 46:
|
|
6655
|
+
return `${scope_name}.x (no default handler)`;
|
|
6656
|
+
case 47:
|
|
6657
|
+
return `${scope_name}.x (only after)`;
|
|
6658
|
+
case 48:
|
|
6659
|
+
return `${scope_name}.x (only before)`;
|
|
6660
|
+
case 49:
|
|
6661
|
+
return "global chunk callback";
|
|
6662
|
+
case 50:
|
|
6663
|
+
return `${scope_name}.X`;
|
|
6664
|
+
case 51:
|
|
6665
|
+
return `${scope_name}.x (chunk dependencies)`;
|
|
6666
|
+
case 52:
|
|
6667
|
+
return `${scope_name}.O`;
|
|
6668
|
+
case 53:
|
|
6669
|
+
return `${scope_name}.C`;
|
|
6670
|
+
case 54:
|
|
6671
|
+
return `${scope_name}.i`;
|
|
6672
|
+
case 55:
|
|
6673
|
+
return `${scope_name}.g`;
|
|
6674
|
+
case 56:
|
|
6675
|
+
return `${scope_name}.S`;
|
|
6676
|
+
case 57:
|
|
6677
|
+
return `${scope_name}.I`;
|
|
6678
|
+
case 58:
|
|
6679
|
+
return `${scope_name}.R`;
|
|
6680
|
+
case 59:
|
|
6681
|
+
return `${scope_name}.hmrF`;
|
|
6682
|
+
case 60:
|
|
6683
|
+
return `${scope_name}.hmrM`;
|
|
6684
|
+
case 61:
|
|
6685
|
+
return `${scope_name}.hmrC`;
|
|
6686
|
+
case 62:
|
|
6687
|
+
return `${scope_name}.hmrD`;
|
|
6688
|
+
case 63:
|
|
6689
|
+
return `${scope_name}.hmrI`;
|
|
6690
|
+
case 64:
|
|
6691
|
+
return `${scope_name}.hmrS`;
|
|
6692
|
+
case 65:
|
|
6693
|
+
return `${scope_name}.amdD`;
|
|
6694
|
+
case 66:
|
|
6695
|
+
return `${scope_name}.amdO`;
|
|
6696
|
+
case 67:
|
|
6697
|
+
return `${scope_name}.System`;
|
|
6698
|
+
case 68:
|
|
6699
|
+
return `${scope_name}.o`;
|
|
6700
|
+
case 69:
|
|
6701
|
+
return `${scope_name}.y`;
|
|
6702
|
+
case 70:
|
|
6703
|
+
return `${scope_name}.b`;
|
|
6704
|
+
case 71:
|
|
6705
|
+
return `${scope_name}.U`;
|
|
6706
|
+
case 72:
|
|
6707
|
+
return `${scope_name}.a`;
|
|
6708
|
+
case 73:
|
|
6709
|
+
return `${scope_name}.aE`;
|
|
6710
|
+
case 74:
|
|
6711
|
+
return `${scope_name}.z`;
|
|
6712
|
+
case 75:
|
|
6713
|
+
return `${scope_name}.zS`;
|
|
6714
|
+
default:
|
|
6715
|
+
return "";
|
|
6716
|
+
}
|
|
6717
|
+
}(RuntimeGlobals_RuntimeGlobals[key], compilerOptions);
|
|
6718
|
+
return res;
|
|
6719
|
+
}
|
|
6720
|
+
let DefaultRuntimeGlobals = createCompilerRuntimeGlobals();
|
|
6486
6721
|
class ExecuteModulePlugin {
|
|
6487
6722
|
apply(compiler) {
|
|
6488
6723
|
compiler.hooks.thisCompilation.tap("executeModule", (compilation)=>{
|
|
6489
6724
|
compiler.__internal__get_module_execution_results_map().clear(), compilation.hooks.executeModule.tap("executeModule", (options, context)=>{
|
|
6490
6725
|
let vm = __webpack_require__("node:vm"), moduleObject = options.moduleObject, source = options.codeGenerationResult.get("javascript");
|
|
6491
6726
|
if (void 0 !== source) try {
|
|
6492
|
-
vm.runInThisContext(`(function(module,
|
|
6727
|
+
vm.runInThisContext(`(function(module, ${renderRuntimeVariables(3, compiler.options)}, ${renderRuntimeVariables(4, compiler.options)}, exports, ${renderRuntimeVariables(0, compiler.options)}) {\n${source}\n})`, {
|
|
6493
6728
|
filename: moduleObject.id
|
|
6494
|
-
}).call(moduleObject.exports, moduleObject, moduleObject, moduleObject.exports, moduleObject.exports, context.
|
|
6729
|
+
}).call(moduleObject.exports, moduleObject, moduleObject, moduleObject.exports, moduleObject.exports, context[renderRuntimeVariables(0, compiler.options)]);
|
|
6495
6730
|
} catch (e) {
|
|
6496
6731
|
let err = e instanceof Error ? e : Error(e);
|
|
6497
6732
|
throw err.stack += printGeneratedCodeForStack(moduleObject.id, source), err;
|
|
@@ -7057,98 +7292,6 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
7057
7292
|
this.references = new Map(), this.builtinReferences = new Map();
|
|
7058
7293
|
}
|
|
7059
7294
|
}
|
|
7060
|
-
let RESERVED_RUNTIME_GLOBALS = new Map();
|
|
7061
|
-
function __from_binding_runtime_globals(runtimeRequirements) {
|
|
7062
|
-
let res = new Set();
|
|
7063
|
-
for (let flag of runtimeRequirements.value)flag in RuntimeGlobals ? res.add(RuntimeGlobals[flag]) : res.add(flag);
|
|
7064
|
-
return res;
|
|
7065
|
-
}
|
|
7066
|
-
function __to_binding_runtime_globals(runtimeRequirements) {
|
|
7067
|
-
let res = {
|
|
7068
|
-
value: []
|
|
7069
|
-
};
|
|
7070
|
-
for (let flag of Array.from(runtimeRequirements)){
|
|
7071
|
-
let item = RESERVED_RUNTIME_GLOBALS.get(flag);
|
|
7072
|
-
"string" == typeof item ? res.value.push(item) : res.value.push(flag);
|
|
7073
|
-
}
|
|
7074
|
-
return res;
|
|
7075
|
-
}
|
|
7076
|
-
let RuntimeGlobals = {
|
|
7077
|
-
require: "__webpack_require__",
|
|
7078
|
-
requireScope: "__webpack_require__.*",
|
|
7079
|
-
exports: "__webpack_exports__",
|
|
7080
|
-
thisAsExports: "top-level-this-exports",
|
|
7081
|
-
returnExportsFromRuntime: "return-exports-from-runtime",
|
|
7082
|
-
module: "module",
|
|
7083
|
-
moduleId: "module.id",
|
|
7084
|
-
moduleLoaded: "module.loaded",
|
|
7085
|
-
publicPath: "__webpack_require__.p",
|
|
7086
|
-
entryModuleId: "__webpack_require__.s",
|
|
7087
|
-
moduleCache: "__webpack_require__.c",
|
|
7088
|
-
moduleFactories: "__webpack_require__.m",
|
|
7089
|
-
moduleFactoriesAddOnly: "__webpack_require__.m (add only)",
|
|
7090
|
-
ensureChunk: "__webpack_require__.e",
|
|
7091
|
-
ensureChunkHandlers: "__webpack_require__.f",
|
|
7092
|
-
ensureChunkIncludeEntries: "__webpack_require__.f (include entries)",
|
|
7093
|
-
prefetchChunk: "__webpack_require__.E",
|
|
7094
|
-
prefetchChunkHandlers: "__webpack_require__.F",
|
|
7095
|
-
preloadChunk: "__webpack_require__.G",
|
|
7096
|
-
preloadChunkHandlers: "__webpack_require__.H",
|
|
7097
|
-
definePropertyGetters: "__webpack_require__.d",
|
|
7098
|
-
makeNamespaceObject: "__webpack_require__.r",
|
|
7099
|
-
createFakeNamespaceObject: "__webpack_require__.t",
|
|
7100
|
-
compatGetDefaultExport: "__webpack_require__.n",
|
|
7101
|
-
harmonyModuleDecorator: "__webpack_require__.hmd",
|
|
7102
|
-
nodeModuleDecorator: "__webpack_require__.nmd",
|
|
7103
|
-
getFullHash: "__webpack_require__.h",
|
|
7104
|
-
wasmInstances: "__webpack_require__.w",
|
|
7105
|
-
instantiateWasm: "__webpack_require__.v",
|
|
7106
|
-
uncaughtErrorHandler: "__webpack_require__.oe",
|
|
7107
|
-
scriptNonce: "__webpack_require__.nc",
|
|
7108
|
-
loadScript: "__webpack_require__.l",
|
|
7109
|
-
createScript: "__webpack_require__.ts",
|
|
7110
|
-
createScriptUrl: "__webpack_require__.tu",
|
|
7111
|
-
getTrustedTypesPolicy: "__webpack_require__.tt",
|
|
7112
|
-
hasFetchPriority: "has fetch priority",
|
|
7113
|
-
chunkName: "__webpack_require__.cn",
|
|
7114
|
-
runtimeId: "__webpack_require__.j",
|
|
7115
|
-
getChunkScriptFilename: "__webpack_require__.u",
|
|
7116
|
-
getChunkCssFilename: "__webpack_require__.k",
|
|
7117
|
-
hasCssModules: "has css modules",
|
|
7118
|
-
getChunkUpdateScriptFilename: "__webpack_require__.hu",
|
|
7119
|
-
getChunkUpdateCssFilename: "__webpack_require__.hk",
|
|
7120
|
-
startup: "__webpack_require__.x",
|
|
7121
|
-
startupNoDefault: "__webpack_require__.x (no default handler)",
|
|
7122
|
-
startupOnlyAfter: "__webpack_require__.x (only after)",
|
|
7123
|
-
startupOnlyBefore: "__webpack_require__.x (only before)",
|
|
7124
|
-
chunkCallback: "webpackChunk",
|
|
7125
|
-
startupEntrypoint: "__webpack_require__.X",
|
|
7126
|
-
onChunksLoaded: "__webpack_require__.O",
|
|
7127
|
-
externalInstallChunk: "__webpack_require__.C",
|
|
7128
|
-
interceptModuleExecution: "__webpack_require__.i",
|
|
7129
|
-
global: "__webpack_require__.g",
|
|
7130
|
-
shareScopeMap: "__webpack_require__.S",
|
|
7131
|
-
initializeSharing: "__webpack_require__.I",
|
|
7132
|
-
currentRemoteGetScope: "__webpack_require__.R",
|
|
7133
|
-
getUpdateManifestFilename: "__webpack_require__.hmrF",
|
|
7134
|
-
hmrDownloadManifest: "__webpack_require__.hmrM",
|
|
7135
|
-
hmrDownloadUpdateHandlers: "__webpack_require__.hmrC",
|
|
7136
|
-
hmrModuleData: "__webpack_require__.hmrD",
|
|
7137
|
-
hmrInvalidateModuleHandlers: "__webpack_require__.hmrI",
|
|
7138
|
-
hmrRuntimeStatePrefix: "__webpack_require__.hmrS",
|
|
7139
|
-
amdDefine: "__webpack_require__.amdD",
|
|
7140
|
-
amdOptions: "__webpack_require__.amdO",
|
|
7141
|
-
system: "__webpack_require__.System",
|
|
7142
|
-
hasOwnProperty: "__webpack_require__.o",
|
|
7143
|
-
systemContext: "__webpack_require__.y",
|
|
7144
|
-
baseURI: "__webpack_require__.b",
|
|
7145
|
-
relativeUrl: "__webpack_require__.U",
|
|
7146
|
-
asyncModule: "__webpack_require__.a",
|
|
7147
|
-
asyncModuleExportSymbol: "__webpack_require__.aE",
|
|
7148
|
-
makeDeferredNamespaceObject: "__webpack_require__.z",
|
|
7149
|
-
makeDeferredNamespaceObjectSymbol: "__webpack_require__.zS"
|
|
7150
|
-
};
|
|
7151
|
-
for (let entry of Object.entries(RuntimeGlobals))RESERVED_RUNTIME_GLOBALS.set(entry[1], entry[0]);
|
|
7152
7295
|
class CodeGenerationResult {
|
|
7153
7296
|
#inner;
|
|
7154
7297
|
constructor(result){
|
|
@@ -7402,7 +7545,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
7402
7545
|
});
|
|
7403
7546
|
}
|
|
7404
7547
|
}
|
|
7405
|
-
let CORE_VERSION = "1.6.
|
|
7548
|
+
let CORE_VERSION = "1.6.7", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
|
|
7406
7549
|
|
|
7407
7550
|
Help:
|
|
7408
7551
|
Looks like you are using a custom binding (via environment variable 'RSPACK_BINDING=${process.env.RSPACK_BINDING}').
|
|
@@ -7792,7 +7935,15 @@ Help:
|
|
|
7792
7935
|
"entry"
|
|
7793
7936
|
]),
|
|
7794
7937
|
additionalPass: new lite_tapable_namespaceObject.AsyncSeriesHook([])
|
|
7795
|
-
}
|
|
7938
|
+
};
|
|
7939
|
+
const compilerRuntimeGlobals = createCompilerRuntimeGlobals(options);
|
|
7940
|
+
this.webpack = {
|
|
7941
|
+
...src_rspack_0,
|
|
7942
|
+
RuntimeGlobals: compilerRuntimeGlobals
|
|
7943
|
+
}, this.rspack = {
|
|
7944
|
+
...src_rspack_0,
|
|
7945
|
+
RuntimeGlobals: compilerRuntimeGlobals
|
|
7946
|
+
}, 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 = ()=>{
|
|
7796
7947
|
throw Error("Cannot execute user defined code in browser without `BrowserRequirePlugin`");
|
|
7797
7948
|
}, 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);
|
|
7798
7949
|
}
|
|
@@ -7994,6 +8145,7 @@ Help:
|
|
|
7994
8145
|
environment: function(environment = {}) {
|
|
7995
8146
|
return {
|
|
7996
8147
|
const: !!environment.const,
|
|
8148
|
+
methodShorthand: !!environment.methodShorthand,
|
|
7997
8149
|
arrowFunction: !!environment.arrowFunction,
|
|
7998
8150
|
nodePrefixForCoreModules: !!environment.nodePrefixForCoreModules,
|
|
7999
8151
|
asyncFunction: !!environment.asyncFunction,
|
|
@@ -8162,9 +8314,9 @@ Help:
|
|
|
8162
8314
|
return getCompiler2().__internal__get_compilation().hooks.additionalTreeRuntimeRequirements;
|
|
8163
8315
|
}, function(queried) {
|
|
8164
8316
|
return function({ chunk, runtimeRequirements }) {
|
|
8165
|
-
let set = __from_binding_runtime_globals(runtimeRequirements);
|
|
8317
|
+
let set = __from_binding_runtime_globals(runtimeRequirements, getCompiler2().rspack.RuntimeGlobals);
|
|
8166
8318
|
return queried.call(chunk, set), {
|
|
8167
|
-
runtimeRequirements: __to_binding_runtime_globals(set)
|
|
8319
|
+
runtimeRequirements: __to_binding_runtime_globals(set, getCompiler2().rspack.RuntimeGlobals)
|
|
8168
8320
|
};
|
|
8169
8321
|
};
|
|
8170
8322
|
}),
|
|
@@ -8172,14 +8324,14 @@ Help:
|
|
|
8172
8324
|
return getCompiler2().__internal__get_compilation().hooks.runtimeRequirementInTree;
|
|
8173
8325
|
}, function(queried) {
|
|
8174
8326
|
return function({ chunk, allRuntimeRequirements, runtimeRequirements }) {
|
|
8175
|
-
let set = __from_binding_runtime_globals(runtimeRequirements), all = __from_binding_runtime_globals(allRuntimeRequirements), customRuntimeGlobals = new Set(), originalAdd = all.add.bind(all), add = function(r) {
|
|
8327
|
+
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) {
|
|
8176
8328
|
let r1;
|
|
8177
|
-
return all.has(r) ? all : (r1 = r,
|
|
8329
|
+
return all.has(r) ? all : (r1 = r, Object.values(getCompiler2().rspack.RuntimeGlobals).includes(r1) || customRuntimeGlobals.add(r), originalAdd(r));
|
|
8178
8330
|
};
|
|
8179
8331
|
for (let r of (all.add = add.bind(add), set))queried.for(r).call(chunk, all);
|
|
8180
8332
|
for (let r of customRuntimeGlobals)queried.for(r).call(chunk, all);
|
|
8181
8333
|
return {
|
|
8182
|
-
allRuntimeRequirements: __to_binding_runtime_globals(all)
|
|
8334
|
+
allRuntimeRequirements: __to_binding_runtime_globals(all, getCompiler2().rspack.RuntimeGlobals)
|
|
8183
8335
|
};
|
|
8184
8336
|
};
|
|
8185
8337
|
}),
|
|
@@ -8219,7 +8371,7 @@ Help:
|
|
|
8219
8371
|
}, function(queried) {
|
|
8220
8372
|
return function({ entry, id, codegenResults, runtimeModules }) {
|
|
8221
8373
|
try {
|
|
8222
|
-
let
|
|
8374
|
+
let RuntimeGlobals = getCompiler2().rspack.RuntimeGlobals, moduleRequireFn = (id)=>{
|
|
8223
8375
|
let cached = moduleCache[id];
|
|
8224
8376
|
if (void 0 !== cached) {
|
|
8225
8377
|
if (cached.error) throw cached.error;
|
|
@@ -8233,7 +8385,7 @@ Help:
|
|
|
8233
8385
|
loaded: !1,
|
|
8234
8386
|
error: void 0
|
|
8235
8387
|
},
|
|
8236
|
-
require:
|
|
8388
|
+
require: moduleRequireFn
|
|
8237
8389
|
};
|
|
8238
8390
|
for (let handler of interceptModuleExecution)handler(execOptions);
|
|
8239
8391
|
let result = codegenResults.map[id]["build time"], moduleObject = execOptions.module;
|
|
@@ -8248,11 +8400,11 @@ Help:
|
|
|
8248
8400
|
codeGenerationResult: new CodeGenerationResult(result),
|
|
8249
8401
|
moduleObject
|
|
8250
8402
|
}, {
|
|
8251
|
-
|
|
8403
|
+
[`${RuntimeGlobals.require}`]: moduleRequireFn
|
|
8252
8404
|
}), "Compilation.hooks.executeModule"), moduleObject.loaded = !0, moduleObject.exports;
|
|
8253
|
-
}, moduleCache =
|
|
8254
|
-
for (let runtimeModule of runtimeModules)
|
|
8255
|
-
let executeResult =
|
|
8405
|
+
}, moduleCache = moduleRequireFn[`${RuntimeGlobals.moduleCache}`.replace(`${RuntimeGlobals.require}.`, "")] = {}, interceptModuleExecution = moduleRequireFn[`${RuntimeGlobals.interceptModuleExecution}`.replace(`${RuntimeGlobals.require}.`, "")] = [];
|
|
8406
|
+
for (let runtimeModule of runtimeModules)moduleRequireFn(runtimeModule);
|
|
8407
|
+
let executeResult = moduleRequireFn(entry);
|
|
8256
8408
|
getCompiler2().__internal__get_module_execution_results_map().set(id, executeResult);
|
|
8257
8409
|
} catch (e) {
|
|
8258
8410
|
throw getCompiler2().__internal__get_module_execution_results_map().set(id, e), e;
|
|
@@ -8702,7 +8854,7 @@ Help:
|
|
|
8702
8854
|
obj.children = this.stats.map((stat, idx)=>{
|
|
8703
8855
|
let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
|
|
8704
8856
|
return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
|
|
8705
|
-
}), childOptions.version && (obj.rspackVersion = "1.6.
|
|
8857
|
+
}), childOptions.version && (obj.rspackVersion = "1.6.7", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
|
|
8706
8858
|
let mapError = (j, obj)=>({
|
|
8707
8859
|
...obj,
|
|
8708
8860
|
compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
|
|
@@ -9601,7 +9753,7 @@ Help:
|
|
|
9601
9753
|
object.hash = context.getStatsCompilation(compilation).hash;
|
|
9602
9754
|
},
|
|
9603
9755
|
version: (object)=>{
|
|
9604
|
-
object.version = "5.75.0", object.rspackVersion = "1.6.
|
|
9756
|
+
object.version = "5.75.0", object.rspackVersion = "1.6.7";
|
|
9605
9757
|
},
|
|
9606
9758
|
env: (object, _compilation, _context, { _env })=>{
|
|
9607
9759
|
object.env = _env;
|
|
@@ -11820,7 +11972,7 @@ Help:
|
|
|
11820
11972
|
let _options = JSON.stringify(options || {});
|
|
11821
11973
|
return binding_default().transform(source, _options);
|
|
11822
11974
|
}
|
|
11823
|
-
let exports_rspackVersion = "1.6.
|
|
11975
|
+
let exports_rspackVersion = "1.6.7", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
|
|
11824
11976
|
getNormalizedRspackOptions: getNormalizedRspackOptions,
|
|
11825
11977
|
applyRspackOptionsDefaults: applyRspackOptionsDefaults,
|
|
11826
11978
|
getNormalizedWebpackOptions: getNormalizedRspackOptions,
|
|
@@ -12238,7 +12390,7 @@ Help:
|
|
|
12238
12390
|
"wasm",
|
|
12239
12391
|
"web",
|
|
12240
12392
|
"webworker"
|
|
12241
|
-
].indexOf(
|
|
12393
|
+
].indexOf(__rspack_i) && (exports[__rspack_i] = __webpack_exports__[__rspack_i]);
|
|
12242
12394
|
Object.defineProperty(exports, '__esModule', {
|
|
12243
12395
|
value: !0
|
|
12244
12396
|
});
|