@rspack/core 1.4.4 → 1.4.6
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/compiled/watchpack/index.d.ts +1 -0
- package/compiled/webpack-sources/index.js +623 -648
- package/compiled/webpack-sources/package.json +1 -1
- package/compiled/webpack-sources/types.d.ts +162 -26
- package/dist/ChunkGraph.d.ts +1 -0
- package/dist/Compilation.d.ts +2 -0
- package/dist/FileSystem.d.ts +2 -0
- package/dist/builtin-loader/swc/types.d.ts +0 -399
- package/dist/exports.d.ts +1 -1
- package/dist/index.js +221 -249
- package/dist/loader-runner/service.d.ts +1 -1
- package/dist/{config/zod.d.ts → schema/config.d.ts} +14 -13
- package/dist/schema/loaders.d.ts +400 -0
- package/dist/schema/plugins.d.ts +163 -0
- package/dist/{config → schema}/utils.d.ts +1 -0
- package/dist/{util → schema}/validate.d.ts +1 -0
- package/dist/stats/StatsFactory.d.ts +1 -1
- package/dist/util/bindingVersionCheck.d.ts +1 -1
- package/dist/util/fs.d.ts +1 -0
- package/hot/lazy-compilation-node.js +1 -1
- package/hot/lazy-compilation-web.js +10 -16
- package/package.json +5 -7
package/dist/index.js
CHANGED
@@ -222,9 +222,6 @@ var __webpack_modules__ = {
|
|
222
222
|
"@rspack/binding": function(module) {
|
223
223
|
module.exports = require(process.env.RSPACK_BINDING ? process.env.RSPACK_BINDING : "@rspack/binding");
|
224
224
|
},
|
225
|
-
"@rspack/binding/package.json": function(module) {
|
226
|
-
module.exports = require(process.env.RSPACK_BINDING ? require("node:path").resolve(process.env.RSPACK_BINDING, './package.json') : "@rspack/binding/package.json");
|
227
|
-
},
|
228
225
|
"node:http": function(module) {
|
229
226
|
module.exports = require("node:http");
|
230
227
|
},
|
@@ -282,7 +279,7 @@ __webpack_require__.n = (module)=>{
|
|
282
279
|
};
|
283
280
|
var __webpack_exports__ = {};
|
284
281
|
for(var __webpack_i__ in (()=>{
|
285
|
-
let createMd4, createXxhash64, service_pool,
|
282
|
+
let createMd4, createXxhash64, service_pool, loadLoader_url, _Err, _Err1;
|
286
283
|
__webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_exports__, {
|
287
284
|
CopyRspackPlugin: ()=>CopyRspackPlugin,
|
288
285
|
RuntimePlugin: ()=>RuntimePlugin,
|
@@ -313,7 +310,7 @@ for(var __webpack_i__ in (()=>{
|
|
313
310
|
EvalDevToolModulePlugin: ()=>EvalDevToolModulePlugin,
|
314
311
|
SwcJsMinimizerRspackPlugin: ()=>SwcJsMinimizerRspackPlugin,
|
315
312
|
MultiCompiler: ()=>MultiCompiler,
|
316
|
-
EntryOptionPlugin: ()=>
|
313
|
+
EntryOptionPlugin: ()=>lib_EntryOptionPlugin,
|
317
314
|
javascript: ()=>javascript,
|
318
315
|
EvalSourceMapDevToolPlugin: ()=>EvalSourceMapDevToolPlugin,
|
319
316
|
ContextReplacementPlugin: ()=>ContextReplacementPlugin,
|
@@ -382,7 +379,7 @@ for(var __webpack_i__ in (()=>{
|
|
382
379
|
DllReferencePlugin: ()=>DllReferencePlugin,
|
383
380
|
DynamicEntryPlugin: ()=>DynamicEntryPlugin,
|
384
381
|
EntryDependency: ()=>binding_.EntryDependency,
|
385
|
-
EntryOptionPlugin: ()=>
|
382
|
+
EntryOptionPlugin: ()=>lib_EntryOptionPlugin,
|
386
383
|
EntryPlugin: ()=>EntryPlugin,
|
387
384
|
EnvironmentPlugin: ()=>EnvironmentPlugin,
|
388
385
|
EvalDevToolModulePlugin: ()=>EvalDevToolModulePlugin,
|
@@ -603,7 +600,9 @@ for(var __webpack_i__ in (()=>{
|
|
603
600
|
compilation: this.compilation,
|
604
601
|
getStatsCompilation: (compilation)=>{
|
605
602
|
if (statsCompilationMap.has(compilation)) return statsCompilationMap.get(compilation);
|
606
|
-
let
|
603
|
+
let innerStats = this.#getInnerByCompilation(compilation);
|
604
|
+
options.warnings = !1;
|
605
|
+
let innerStatsCompilation = innerStats.toJson(options);
|
607
606
|
return statsCompilationMap.set(compilation, innerStatsCompilation), innerStatsCompilation;
|
608
607
|
},
|
609
608
|
getInner: this.#getInnerByCompilation.bind(this)
|
@@ -1321,6 +1320,19 @@ for(var __webpack_i__ in (()=>{
|
|
1321
1320
|
let modules = this.getChunkModules(chunk);
|
1322
1321
|
return modules.sort(compareFn), modules;
|
1323
1322
|
}
|
1323
|
+
}), Object.defineProperty(binding_.ChunkGraph.prototype, "getModuleChunksIterable", {
|
1324
|
+
enumerable: !0,
|
1325
|
+
configurable: !0,
|
1326
|
+
value (module) {
|
1327
|
+
return this.getModuleChunks(module);
|
1328
|
+
}
|
1329
|
+
}), Object.defineProperty(binding_.ChunkGraph.prototype, "getOrderedChunkModulesIterable", {
|
1330
|
+
enumerable: !0,
|
1331
|
+
configurable: !0,
|
1332
|
+
value (chunk, compareFn) {
|
1333
|
+
let modules = this.getChunkModules(chunk);
|
1334
|
+
return modules.sort(compareFn), modules;
|
1335
|
+
}
|
1324
1336
|
}), Object.defineProperty(binding_.ChunkGraph.prototype, "getModuleHash", {
|
1325
1337
|
enumerable: !0,
|
1326
1338
|
configurable: !0,
|
@@ -1780,6 +1792,12 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
1780
1792
|
name: optionsOrName
|
1781
1793
|
}, callback);
|
1782
1794
|
}
|
1795
|
+
getWarnings() {
|
1796
|
+
return this.hooks.processWarnings.call(this.#inner.getWarnings());
|
1797
|
+
}
|
1798
|
+
getErrors() {
|
1799
|
+
return this.#inner.getErrors();
|
1800
|
+
}
|
1783
1801
|
__internal__getAssetSource(filename) {
|
1784
1802
|
let rawSource = this.#inner.getAssetSource(filename);
|
1785
1803
|
if (rawSource) return JsSource.__from_binding(rawSource);
|
@@ -2436,6 +2454,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2436
2454
|
readFile: ASYNC_NOOP,
|
2437
2455
|
stat: ASYNC_NOOP,
|
2438
2456
|
lstat: ASYNC_NOOP,
|
2457
|
+
chmod: ASYNC_NOOP,
|
2439
2458
|
realpath: ASYNC_NOOP,
|
2440
2459
|
open: ASYNC_NOOP,
|
2441
2460
|
rename: ASYNC_NOOP,
|
@@ -2455,7 +2474,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2455
2474
|
mtimeMs: stat.mtimeMs ?? toMs(stat.mtime),
|
2456
2475
|
ctimeMs: stat.ctimeMs ?? toMs(stat.ctime),
|
2457
2476
|
birthtimeMs: stat.birthtimeMs ?? toMs(stat.birthtime),
|
2458
|
-
size: stat.size
|
2477
|
+
size: stat.size,
|
2478
|
+
mode: stat.mode
|
2459
2479
|
};
|
2460
2480
|
}
|
2461
2481
|
function toMs(i) {
|
@@ -2471,6 +2491,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2471
2491
|
readFile;
|
2472
2492
|
stat;
|
2473
2493
|
lstat;
|
2494
|
+
chmod;
|
2474
2495
|
realpath;
|
2475
2496
|
open;
|
2476
2497
|
rename;
|
@@ -2519,6 +2540,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2519
2540
|
readFile;
|
2520
2541
|
stat;
|
2521
2542
|
lstat;
|
2543
|
+
chmod;
|
2522
2544
|
realpath;
|
2523
2545
|
open;
|
2524
2546
|
rename;
|
@@ -2562,7 +2584,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2562
2584
|
let res = await statFn(filePath);
|
2563
2585
|
return res && __to_binding_stat(res);
|
2564
2586
|
};
|
2565
|
-
});
|
2587
|
+
}), this.chmod = memoizeFn(()=>external_node_util_default().promisify(fs.chmod.bind(fs)));
|
2566
2588
|
}
|
2567
2589
|
static __to_binding(fs) {
|
2568
2590
|
return new this(fs);
|
@@ -3117,7 +3139,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3117
3139
|
};
|
3118
3140
|
throw Error("Failed to serialize error, only string, Error instances and objects with a message property are supported");
|
3119
3141
|
}
|
3120
|
-
let service_run = async (task, options)=>ensureLoaderWorkerPool().then(async (pool)=>{
|
3142
|
+
let service_run = async (loaderName, task, options)=>ensureLoaderWorkerPool().then(async (pool)=>{
|
3121
3143
|
let { port1: mainPort, port2: workerPort } = new external_node_worker_threads_namespaceObject.MessageChannel(), { port1: mainSyncPort, port2: workerSyncPort } = new external_node_worker_threads_namespaceObject.MessageChannel();
|
3122
3144
|
return new Promise((resolve, reject)=>{
|
3123
3145
|
let handleError = (error)=>{
|
@@ -3161,7 +3183,23 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3161
3183
|
});
|
3162
3184
|
}
|
3163
3185
|
Atomics.add(sharedBufferView, 0, 1), Atomics.notify(sharedBufferView, 0, Number.POSITIVE_INFINITY);
|
3164
|
-
}), mainSyncPort.on("messageerror", handleError)
|
3186
|
+
}), mainSyncPort.on("messageerror", handleError);
|
3187
|
+
var obj = task, loaderName1 = loaderName;
|
3188
|
+
let errors = [];
|
3189
|
+
for (let key of Object.keys(obj))try {
|
3190
|
+
structuredClone(obj[key]);
|
3191
|
+
} catch (e) {
|
3192
|
+
errors.push({
|
3193
|
+
key,
|
3194
|
+
type: typeof obj[key],
|
3195
|
+
reason: e.message
|
3196
|
+
});
|
3197
|
+
}
|
3198
|
+
if (errors.length > 0) {
|
3199
|
+
let errorMsg = errors.map((err)=>`option "${err.key}" (type: ${err.type}) is not cloneable: ${err.reason}`).join("\n");
|
3200
|
+
throw Error(`The options for ${loaderName1} are not cloneable, which is not supported by parallelLoader. Consider disabling parallel for this loader or removing the non-cloneable properties from the options:\n${errorMsg}`);
|
3201
|
+
}
|
3202
|
+
pool.run({
|
3165
3203
|
...task,
|
3166
3204
|
workerData: {
|
3167
3205
|
workerPort,
|
@@ -3603,7 +3641,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3603
3641
|
is_pitch: pitch,
|
3604
3642
|
resource: resource
|
3605
3643
|
}
|
3606
|
-
}), parallelism) result = await service_run({
|
3644
|
+
}), parallelism) result = await service_run(loaderName, {
|
3607
3645
|
loaderContext: getWorkerLoaderContext(),
|
3608
3646
|
loaderState,
|
3609
3647
|
args
|
@@ -4479,14 +4517,14 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
4479
4517
|
return createBuiltinPlugin(this.name, void 0);
|
4480
4518
|
}
|
4481
4519
|
}
|
4482
|
-
class
|
4520
|
+
class EntryOptionPlugin {
|
4483
4521
|
apply(compiler) {
|
4484
|
-
compiler.hooks.entryOption.tap("EntryOptionPlugin", (context, entry)=>(
|
4522
|
+
compiler.hooks.entryOption.tap("EntryOptionPlugin", (context, entry)=>(EntryOptionPlugin.applyEntryOption(compiler, context, entry), !0));
|
4485
4523
|
}
|
4486
4524
|
static applyEntryOption(compiler, context, entry) {
|
4487
4525
|
if ("function" == typeof entry) new DynamicEntryPlugin(context, entry).apply(compiler);
|
4488
4526
|
else for (let name of Object.keys(entry)){
|
4489
|
-
let desc = entry[name], options =
|
4527
|
+
let desc = entry[name], options = EntryOptionPlugin.entryDescriptionToOptions(compiler, name, desc);
|
4490
4528
|
for (let entry of (external_node_assert_default()(void 0 !== desc.import, "desc.import should not be `undefined` once `EntryOptionPlugin.applyEntryOption` is called"), desc.import))new EntryPlugin(context, entry, options).apply(compiler);
|
4491
4529
|
}
|
4492
4530
|
}
|
@@ -4507,7 +4545,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
4507
4545
|
return options;
|
4508
4546
|
}
|
4509
4547
|
}
|
4510
|
-
let
|
4548
|
+
let lib_EntryOptionPlugin = EntryOptionPlugin, EntryPlugin = base_create(binding_.BuiltinPluginName.EntryPlugin, (context, entry, options = "")=>({
|
4511
4549
|
context,
|
4512
4550
|
entry,
|
4513
4551
|
options: getRawEntryOptions("string" == typeof options ? {
|
@@ -4542,7 +4580,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
4542
4580
|
let raw = {
|
4543
4581
|
context: this.context,
|
4544
4582
|
entry: async ()=>Object.entries(await this.entry()).map(([name, desc])=>{
|
4545
|
-
let options =
|
4583
|
+
let options = lib_EntryOptionPlugin.entryDescriptionToOptions(compiler, name, desc);
|
4546
4584
|
return {
|
4547
4585
|
import: desc.import,
|
4548
4586
|
options: getRawEntryOptions(options)
|
@@ -7149,7 +7187,145 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
7149
7187
|
error: (input)=>({
|
7150
7188
|
message: `Expected function, received ${getParsedType(input)}`
|
7151
7189
|
})
|
7152
|
-
})
|
7190
|
+
}), getIgnorePluginOptionsSchema = memoize(()=>union([
|
7191
|
+
schemas_object({
|
7192
|
+
contextRegExp: _instanceof(RegExp).optional(),
|
7193
|
+
resourceRegExp: _instanceof(RegExp)
|
7194
|
+
}),
|
7195
|
+
schemas_object({
|
7196
|
+
checkResource: anyFunction
|
7197
|
+
})
|
7198
|
+
])), getRsdoctorPluginSchema = memoize(()=>strictObject({
|
7199
|
+
moduleGraphFeatures: union([
|
7200
|
+
schemas_boolean(),
|
7201
|
+
schemas_array(schemas_enum([
|
7202
|
+
"graph",
|
7203
|
+
"ids",
|
7204
|
+
"sources"
|
7205
|
+
]))
|
7206
|
+
]).optional(),
|
7207
|
+
chunkGraphFeatures: union([
|
7208
|
+
schemas_boolean(),
|
7209
|
+
schemas_array(schemas_enum([
|
7210
|
+
"graph",
|
7211
|
+
"assets"
|
7212
|
+
]))
|
7213
|
+
]).optional()
|
7214
|
+
})), getSRIPluginOptionsSchema = memoize(()=>{
|
7215
|
+
let hashFunctionSchema = schemas_enum([
|
7216
|
+
"sha256",
|
7217
|
+
"sha384",
|
7218
|
+
"sha512"
|
7219
|
+
]);
|
7220
|
+
return schemas_object({
|
7221
|
+
hashFuncNames: tuple([
|
7222
|
+
hashFunctionSchema
|
7223
|
+
]).rest(hashFunctionSchema).optional(),
|
7224
|
+
htmlPlugin: schemas_string().or(literal(!1)).optional(),
|
7225
|
+
enabled: literal("auto").or(schemas_boolean()).optional()
|
7226
|
+
});
|
7227
|
+
}), getDllPluginOptionsSchema = memoize(()=>schemas_object({
|
7228
|
+
context: schemas_string().optional(),
|
7229
|
+
entryOnly: schemas_boolean().optional(),
|
7230
|
+
format: schemas_boolean().optional(),
|
7231
|
+
name: schemas_string().optional(),
|
7232
|
+
path: schemas_string(),
|
7233
|
+
type: schemas_string().optional()
|
7234
|
+
})), getDllReferencePluginOptionsSchema = memoize(()=>{
|
7235
|
+
let dllReferencePluginOptionsContentItem = schemas_object({
|
7236
|
+
buildMeta: custom(),
|
7237
|
+
exports: schemas_array(schemas_string()).or(literal(!0)),
|
7238
|
+
id: schemas_string().or(numberOrInfinity)
|
7239
|
+
}).partial(), dllReferencePluginOptionsContent = record(schemas_string(), dllReferencePluginOptionsContentItem), dllReferencePluginOptionsSourceType = schemas_enum([
|
7240
|
+
"var",
|
7241
|
+
"assign",
|
7242
|
+
"this",
|
7243
|
+
"window",
|
7244
|
+
"global",
|
7245
|
+
"commonjs",
|
7246
|
+
"commonjs2",
|
7247
|
+
"commonjs-module",
|
7248
|
+
"amd",
|
7249
|
+
"amd-require",
|
7250
|
+
"umd",
|
7251
|
+
"umd2",
|
7252
|
+
"jsonp",
|
7253
|
+
"system"
|
7254
|
+
]), dllReferencePluginOptionsManifest = schemas_object({
|
7255
|
+
content: dllReferencePluginOptionsContent,
|
7256
|
+
name: schemas_string().optional(),
|
7257
|
+
type: dllReferencePluginOptionsSourceType.optional()
|
7258
|
+
});
|
7259
|
+
return union([
|
7260
|
+
schemas_object({
|
7261
|
+
context: schemas_string().optional(),
|
7262
|
+
extensions: schemas_array(schemas_string()).optional(),
|
7263
|
+
manifest: schemas_string().or(dllReferencePluginOptionsManifest),
|
7264
|
+
name: schemas_string().optional(),
|
7265
|
+
scope: schemas_string().optional(),
|
7266
|
+
sourceType: dllReferencePluginOptionsSourceType.optional(),
|
7267
|
+
type: schemas_enum([
|
7268
|
+
"require",
|
7269
|
+
"object"
|
7270
|
+
]).optional()
|
7271
|
+
}),
|
7272
|
+
schemas_object({
|
7273
|
+
content: dllReferencePluginOptionsContent,
|
7274
|
+
context: schemas_string().optional(),
|
7275
|
+
extensions: schemas_array(schemas_string()).optional(),
|
7276
|
+
name: schemas_string(),
|
7277
|
+
scope: schemas_string().optional(),
|
7278
|
+
sourceType: dllReferencePluginOptionsSourceType.optional(),
|
7279
|
+
type: schemas_enum([
|
7280
|
+
"require",
|
7281
|
+
"object"
|
7282
|
+
]).optional()
|
7283
|
+
})
|
7284
|
+
]);
|
7285
|
+
}), getHtmlPluginOptionsSchema = memoize(()=>schemas_object({
|
7286
|
+
filename: schemas_string().or(anyFunction),
|
7287
|
+
template: schemas_string().refine((val)=>!val.includes("!"), {
|
7288
|
+
error: "HtmlRspackPlugin does not support template path with loader yet"
|
7289
|
+
}),
|
7290
|
+
templateContent: schemas_string().or(anyFunction),
|
7291
|
+
templateParameters: record(schemas_string(), schemas_string()).or(schemas_boolean()).or(anyFunction),
|
7292
|
+
inject: schemas_enum([
|
7293
|
+
"head",
|
7294
|
+
"body"
|
7295
|
+
]).or(schemas_boolean()),
|
7296
|
+
publicPath: schemas_string(),
|
7297
|
+
base: schemas_string().or(strictObject({
|
7298
|
+
href: schemas_string(),
|
7299
|
+
target: schemas_enum([
|
7300
|
+
"_self",
|
7301
|
+
"_blank",
|
7302
|
+
"_parent",
|
7303
|
+
"_top"
|
7304
|
+
])
|
7305
|
+
}).partial()),
|
7306
|
+
scriptLoading: schemas_enum([
|
7307
|
+
"blocking",
|
7308
|
+
"defer",
|
7309
|
+
"module",
|
7310
|
+
"systemjs-module"
|
7311
|
+
]),
|
7312
|
+
chunks: schemas_string().array(),
|
7313
|
+
excludeChunks: schemas_string().array(),
|
7314
|
+
chunksSortMode: schemas_enum([
|
7315
|
+
"auto",
|
7316
|
+
"manual"
|
7317
|
+
]),
|
7318
|
+
sri: schemas_enum([
|
7319
|
+
"sha256",
|
7320
|
+
"sha384",
|
7321
|
+
"sha512"
|
7322
|
+
]),
|
7323
|
+
minify: schemas_boolean(),
|
7324
|
+
title: schemas_string(),
|
7325
|
+
favicon: schemas_string(),
|
7326
|
+
meta: record(schemas_string(), schemas_string().or(record(schemas_string(), schemas_string()))),
|
7327
|
+
hash: schemas_boolean()
|
7328
|
+
}).partial());
|
7153
7329
|
function isZodErrorLike(err) {
|
7154
7330
|
return err instanceof Object && "name" in err && ("ZodError" === err.name || "$ZodError" === err.name) && "issues" in err && Array.isArray(err.issues);
|
7155
7331
|
}
|
@@ -7599,50 +7775,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
7599
7775
|
return !1;
|
7600
7776
|
}
|
7601
7777
|
}
|
7602
|
-
let compilationOptionsMap = new WeakMap(),
|
7603
|
-
filename: schemas_string().or(anyFunction),
|
7604
|
-
template: schemas_string().refine((val)=>!val.includes("!"), {
|
7605
|
-
error: "HtmlRspackPlugin does not support template path with loader yet"
|
7606
|
-
}),
|
7607
|
-
templateContent: schemas_string().or(anyFunction),
|
7608
|
-
templateParameters: record(schemas_string(), schemas_string()).or(schemas_boolean()).or(anyFunction),
|
7609
|
-
inject: schemas_enum([
|
7610
|
-
"head",
|
7611
|
-
"body"
|
7612
|
-
]).or(schemas_boolean()),
|
7613
|
-
publicPath: schemas_string(),
|
7614
|
-
base: schemas_string().or(strictObject({
|
7615
|
-
href: schemas_string(),
|
7616
|
-
target: schemas_enum([
|
7617
|
-
"_self",
|
7618
|
-
"_blank",
|
7619
|
-
"_parent",
|
7620
|
-
"_top"
|
7621
|
-
])
|
7622
|
-
}).partial()),
|
7623
|
-
scriptLoading: schemas_enum([
|
7624
|
-
"blocking",
|
7625
|
-
"defer",
|
7626
|
-
"module",
|
7627
|
-
"systemjs-module"
|
7628
|
-
]),
|
7629
|
-
chunks: schemas_string().array(),
|
7630
|
-
excludeChunks: schemas_string().array(),
|
7631
|
-
chunksSortMode: schemas_enum([
|
7632
|
-
"auto",
|
7633
|
-
"manual"
|
7634
|
-
]),
|
7635
|
-
sri: schemas_enum([
|
7636
|
-
"sha256",
|
7637
|
-
"sha384",
|
7638
|
-
"sha512"
|
7639
|
-
]),
|
7640
|
-
minify: schemas_boolean(),
|
7641
|
-
title: schemas_string(),
|
7642
|
-
favicon: schemas_string(),
|
7643
|
-
meta: record(schemas_string(), schemas_string().or(record(schemas_string(), schemas_string()))),
|
7644
|
-
hash: schemas_boolean()
|
7645
|
-
}).partial()), getPluginOptions = (compilation, uid)=>{
|
7778
|
+
let compilationOptionsMap = new WeakMap(), getPluginOptions = (compilation, uid)=>{
|
7646
7779
|
if (!(compilation instanceof Compilation)) throw TypeError("The 'compilation' argument must be an instance of Compilation");
|
7647
7780
|
return compilationOptionsMap.get(compilation)?.[uid];
|
7648
7781
|
}, setPluginOptions = (compilation, uid, options)=>{
|
@@ -7653,7 +7786,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
7653
7786
|
delete optionsMap[uid], 0 === Object.keys(optionsMap).length ? compilationOptionsMap.delete(compilation) : compilationOptionsMap.set(compilation, optionsMap);
|
7654
7787
|
}, HTML_PLUGIN_UID = 0, HtmlRspackPluginImpl = base_create(binding_.BuiltinPluginName.HtmlRspackPlugin, function(c = {}) {
|
7655
7788
|
let templateParameters, templateFn, filenames;
|
7656
|
-
validate(c,
|
7789
|
+
validate(c, getHtmlPluginOptionsSchema);
|
7657
7790
|
let uid = HTML_PLUGIN_UID++, meta = {};
|
7658
7791
|
for(let key in c.meta){
|
7659
7792
|
let value = c.meta[key];
|
@@ -7848,15 +7981,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
7848
7981
|
return createBuiltinPlugin(this.name, raw);
|
7849
7982
|
}
|
7850
7983
|
}
|
7851
|
-
let getIgnorePluginOptionsSchema =
|
7852
|
-
schemas_object({
|
7853
|
-
contextRegExp: _instanceof(RegExp).optional(),
|
7854
|
-
resourceRegExp: _instanceof(RegExp)
|
7855
|
-
}),
|
7856
|
-
schemas_object({
|
7857
|
-
checkResource: anyFunction
|
7858
|
-
})
|
7859
|
-
])), IgnorePlugin = base_create(binding_.BuiltinPluginName.IgnorePlugin, (options)=>(validate(options, getIgnorePluginOptionsSchema), options)), InferAsyncModulesPlugin = base_create(binding_.BuiltinPluginName.InferAsyncModulesPlugin, ()=>{}, "compilation"), JavascriptModulesPlugin_compilationHooksMap = new WeakMap();
|
7984
|
+
let IgnorePlugin = base_create(binding_.BuiltinPluginName.IgnorePlugin, (options)=>(validate(options, getIgnorePluginOptionsSchema), options)), InferAsyncModulesPlugin = base_create(binding_.BuiltinPluginName.InferAsyncModulesPlugin, ()=>{}, "compilation"), JavascriptModulesPlugin_compilationHooksMap = new WeakMap();
|
7860
7985
|
class JavascriptModulesPlugin extends RspackBuiltinPlugin {
|
7861
7986
|
name = binding_.BuiltinPluginName.JavascriptModulesPlugin;
|
7862
7987
|
affectedHooks = "compilation";
|
@@ -8195,23 +8320,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
8195
8320
|
context,
|
8196
8321
|
entries,
|
8197
8322
|
name: options.name
|
8198
|
-
})), DllReferenceAgencyPlugin = base_create(binding_.BuiltinPluginName.DllReferenceAgencyPlugin, (options)=>options),
|
8199
|
-
moduleGraphFeatures: union([
|
8200
|
-
schemas_boolean(),
|
8201
|
-
schemas_array(schemas_enum([
|
8202
|
-
"graph",
|
8203
|
-
"ids",
|
8204
|
-
"sources"
|
8205
|
-
]))
|
8206
|
-
]).optional(),
|
8207
|
-
chunkGraphFeatures: union([
|
8208
|
-
schemas_boolean(),
|
8209
|
-
schemas_array(schemas_enum([
|
8210
|
-
"graph",
|
8211
|
-
"assets"
|
8212
|
-
]))
|
8213
|
-
]).optional()
|
8214
|
-
})), RsdoctorPluginImpl = base_create(binding_.BuiltinPluginName.RsdoctorPlugin, function(c = {
|
8323
|
+
})), DllReferenceAgencyPlugin = base_create(binding_.BuiltinPluginName.DllReferenceAgencyPlugin, (options)=>options), RsdoctorPluginImpl = base_create(binding_.BuiltinPluginName.RsdoctorPlugin, function(c = {
|
8215
8324
|
moduleGraphFeatures: !0,
|
8216
8325
|
chunkGraphFeatures: !0
|
8217
8326
|
}) {
|
@@ -8277,20 +8386,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
8277
8386
|
return await queried.promise(data);
|
8278
8387
|
};
|
8279
8388
|
})
|
8280
|
-
}), SubresourceIntegrityPlugin_PLUGIN_NAME = "SubresourceIntegrityPlugin", NATIVE_HTML_PLUGIN = "HtmlRspackPlugin",
|
8281
|
-
let hashFunctionSchema = schemas_enum([
|
8282
|
-
"sha256",
|
8283
|
-
"sha384",
|
8284
|
-
"sha512"
|
8285
|
-
]);
|
8286
|
-
return schemas_object({
|
8287
|
-
hashFuncNames: tuple([
|
8288
|
-
hashFunctionSchema
|
8289
|
-
]).rest(hashFunctionSchema).optional(),
|
8290
|
-
htmlPlugin: schemas_string().or(literal(!1)).optional(),
|
8291
|
-
enabled: literal("auto").or(schemas_boolean()).optional()
|
8292
|
-
});
|
8293
|
-
}), NativeSubresourceIntegrityPlugin = base_create(binding_.BuiltinPluginName.SubresourceIntegrityPlugin, function(options) {
|
8389
|
+
}), SubresourceIntegrityPlugin_PLUGIN_NAME = "SubresourceIntegrityPlugin", NATIVE_HTML_PLUGIN = "HtmlRspackPlugin", NativeSubresourceIntegrityPlugin = base_create(binding_.BuiltinPluginName.SubresourceIntegrityPlugin, function(options) {
|
8294
8390
|
let htmlPlugin = "Disabled";
|
8295
8391
|
return options.htmlPlugin === NATIVE_HTML_PLUGIN ? htmlPlugin = "Native" : "string" == typeof options.htmlPlugin && (htmlPlugin = "JavaScript"), {
|
8296
8392
|
hashFuncNames: options.hashFuncNames,
|
@@ -8307,7 +8403,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
8307
8403
|
if ("object" != typeof options) throw Error("SubResourceIntegrity: argument must be an object");
|
8308
8404
|
try {
|
8309
8405
|
var options1;
|
8310
|
-
options1 = options, validate(options1,
|
8406
|
+
options1 = options, validate(options1, getSRIPluginOptionsSchema);
|
8311
8407
|
} catch (e) {
|
8312
8408
|
validateError = e;
|
8313
8409
|
}
|
@@ -9281,7 +9377,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
9281
9377
|
}, applyExperimentsDefaults = (experiments, { production, development })=>{
|
9282
9378
|
defaults_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, "layers", !1), D(experiments, "topLevelAwait", !0), 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", !0), 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", !0), D(experiments, "parallelLoader", !1), D(experiments, "useInputFileSystem", !1), D(experiments, "inlineConst", !1), D(experiments, "inlineEnum", !1), D(experiments, "typeReexportsPresence", !1);
|
9283
9379
|
}, applybundlerInfoDefaults = (rspackFuture, library)=>{
|
9284
|
-
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.4.
|
9380
|
+
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.4.6"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
|
9285
9381
|
}, applySnapshotDefaults = (_snapshot, _env)=>{}, applyJavascriptParserOptionsDefaults = (parserOptions)=>{
|
9286
9382
|
D(parserOptions, "dynamicImportMode", "lazy"), D(parserOptions, "dynamicImportPrefetch", !1), D(parserOptions, "dynamicImportPreload", !1), D(parserOptions, "url", !0), D(parserOptions, "exprContextCritical", !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, "importDynamic", !0), D(parserOptions, "worker", [
|
9287
9383
|
"..."
|
@@ -9445,7 +9541,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
9445
9541
|
return "function" != typeof chunkFilename ? chunkFilename.replace(/\.[mc]?js(\?|$)/, ".css$1") : "[id].css";
|
9446
9542
|
}), D(output, "hotUpdateChunkFilename", `[id].[fullhash].hot-update.${output.module ? "mjs" : "js"}`), D(output, "hotUpdateMainFilename", "[runtime].[fullhash].hot-update.json");
|
9447
9543
|
let uniqueNameId = Template.toIdentifier(output.uniqueName);
|
9448
|
-
defaults_F(output, "hotUpdateGlobal", ()=>`webpackHotUpdate${uniqueNameId}`), defaults_F(output, "chunkLoadingGlobal", ()=>`webpackChunk${uniqueNameId}`), D(output, "assetModuleFilename", "[hash][ext][query]"), D(output, "webassemblyModuleFilename", "[hash].module.wasm"), D(output, "compareBeforeEmit", !0), defaults_F(output, "path", ()=>external_node_path_default().join(process.cwd(), "dist")), defaults_F(output, "pathinfo", ()=>development), D(output, "
|
9544
|
+
defaults_F(output, "hotUpdateGlobal", ()=>`webpackHotUpdate${uniqueNameId}`), defaults_F(output, "chunkLoadingGlobal", ()=>`webpackChunk${uniqueNameId}`), D(output, "assetModuleFilename", "[hash][ext][query]"), D(output, "webassemblyModuleFilename", "[hash].module.wasm"), D(output, "compareBeforeEmit", !0), defaults_F(output, "path", ()=>external_node_path_default().join(process.cwd(), "dist")), defaults_F(output, "pathinfo", ()=>development), 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 && defaults_F(output.library, "type", ()=>output.module ? "module" : "var"), defaults_F(output, "chunkFormat", ()=>{
|
9449
9545
|
if (tp) {
|
9450
9546
|
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.";
|
9451
9547
|
if (output.module) {
|
@@ -9505,7 +9601,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
9505
9601
|
if (tp.globalThis) return "globalThis";
|
9506
9602
|
}
|
9507
9603
|
return "self";
|
9508
|
-
}), D(output, "importFunctionName", "import"), D(output, "importMetaName", "import.meta"), defaults_F(output, "clean", ()=>!!output.clean), D(output, "workerPublicPath", ""), D(output, "sourceMapFilename", "[file].map[query]"), D(output, "charset", !futureDefaults), D(output, "chunkLoadTimeout", 120000);
|
9604
|
+
}), D(output, "importFunctionName", "import"), D(output, "importMetaName", "import.meta"), defaults_F(output, "clean", ()=>!!output.clean), D(output, "crossOriginLoading", !1), D(output, "workerPublicPath", ""), D(output, "sourceMapFilename", "[file].map[query]"), defaults_F(output, "scriptType", ()=>!!output.module && "module"), D(output, "charset", !futureDefaults), D(output, "chunkLoadTimeout", 120000);
|
9509
9605
|
let { trustedTypes } = output;
|
9510
9606
|
trustedTypes && (defaults_F(trustedTypes, "policyName", ()=>output.uniqueName.replace(/[^a-zA-Z0-9\-#=_/@.%]+/g, "_") || "webpack"), D(trustedTypes, "onPolicyCreationFailure", "stop"));
|
9511
9607
|
let forEachEntry = (fn)=>{
|
@@ -10159,79 +10255,15 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
10159
10255
|
this.suspended && (this.suspended = !1, this.#invalidate());
|
10160
10256
|
}
|
10161
10257
|
}
|
10162
|
-
let
|
10163
|
-
|
10164
|
-
|
10165
|
-
|
10166
|
-
|
10167
|
-
|
10168
|
-
|
10169
|
-
|
10170
|
-
|
10171
|
-
},
|
10172
|
-
darwin: {
|
10173
|
-
x64: "",
|
10174
|
-
arm64: ""
|
10175
|
-
},
|
10176
|
-
freebsd: {
|
10177
|
-
x64: ""
|
10178
|
-
},
|
10179
|
-
linux: {
|
10180
|
-
x64: {
|
10181
|
-
musl: "musl",
|
10182
|
-
gnu: "gnu"
|
10183
|
-
},
|
10184
|
-
arm64: {
|
10185
|
-
musl: "musl",
|
10186
|
-
gnu: "gnu"
|
10187
|
-
},
|
10188
|
-
arm: "gnueabihf"
|
10189
|
-
}
|
10190
|
-
}, BINDING_VERSION = __webpack_require__("@rspack/binding/package.json").version, CORE_VERSION = "1.4.4", getAddonPlatformArchAbi = ()=>{
|
10191
|
-
let { platform, arch } = process, binding = "";
|
10192
|
-
binding += platform;
|
10193
|
-
let abi = NodePlatformArchToAbi[platform][arch];
|
10194
|
-
if (void 0 === abi) return Error(`unsupported cpu arch: ${arch}`);
|
10195
|
-
if (binding += `-${arch}`, "string" == typeof abi) binding += abi.length ? `-${abi}` : "";
|
10196
|
-
else {
|
10197
|
-
if ("object" != typeof abi) return Error(`unsupported abi: ${abi}`);
|
10198
|
-
binding += `-${abi[!function() {
|
10199
|
-
let { glibcVersionRuntime } = process.report.getReport().header;
|
10200
|
-
return !glibcVersionRuntime;
|
10201
|
-
}() ? "gnu" : "musl"]}`;
|
10202
|
-
}
|
10203
|
-
return binding;
|
10204
|
-
}, checkVersion = ()=>{
|
10205
|
-
let ADDON_VERSION;
|
10206
|
-
if (void 0 !== bindingVersionCheck_result) return bindingVersionCheck_result;
|
10207
|
-
let platformArchAbi = getAddonPlatformArchAbi();
|
10208
|
-
if (platformArchAbi instanceof Error) return bindingVersionCheck_result = platformArchAbi;
|
10209
|
-
try {
|
10210
|
-
let BINDING_PKG_DIR = external_node_path_default().dirname(require.resolve("@rspack/binding/package.json"));
|
10211
|
-
if ((0, external_node_fs_namespaceObject.readdirSync)(BINDING_PKG_DIR).some((item)=>item === `rspack.${platformArchAbi}.node` || "rspack.wasm32-wasi.wasm")) ADDON_VERSION = BINDING_VERSION;
|
10212
|
-
else try {
|
10213
|
-
ADDON_VERSION = require(require.resolve(`@rspack/binding-${platformArchAbi}/package.json`, {
|
10214
|
-
paths: [
|
10215
|
-
BINDING_PKG_DIR
|
10216
|
-
]
|
10217
|
-
})).version;
|
10218
|
-
} catch {
|
10219
|
-
ADDON_VERSION = require(require.resolve("@rspack/binding-wasm32-wasi/package.json", {
|
10220
|
-
paths: [
|
10221
|
-
BINDING_PKG_DIR
|
10222
|
-
]
|
10223
|
-
})).version;
|
10224
|
-
}
|
10225
|
-
} catch (error) {
|
10226
|
-
if (error instanceof Error) return bindingVersionCheck_result = Error(`${error.toString()}. Maybe you forget to install the correct addon package @rspack/binding-${platformArchAbi} or forget to build binding locally?`);
|
10227
|
-
return bindingVersionCheck_result = Error(error);
|
10228
|
-
}
|
10229
|
-
return bindingVersionCheck_result = [
|
10230
|
-
CORE_VERSION,
|
10231
|
-
BINDING_VERSION,
|
10232
|
-
ADDON_VERSION
|
10233
|
-
].every((v, _, arr)=>v === arr[0]) ? null : Error(`Unmatched version @rspack/core@${CORE_VERSION}, @rspack/binding@${BINDING_VERSION}, @rspack/binding-${platformArchAbi}@${ADDON_VERSION}.\nRspack requires these versions to be the same or you may have installed the wrong version. Otherwise, Rspack may not work properly.`);
|
10234
|
-
}, createHtmlPluginHooksRegisters = (getCompiler, createTap, createMapTap)=>{
|
10258
|
+
let CORE_VERSION = "1.4.6", checkVersion = ()=>CORE_VERSION === binding_.EXPECTED_RSPACK_CORE_VERSION ? null : Error(bindingVersionCheck_errorMessage(CORE_VERSION, binding_.EXPECTED_RSPACK_CORE_VERSION)), bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
|
10259
|
+
|
10260
|
+
Help:
|
10261
|
+
Looks like you are using a custom binding (via environment variable 'RSPACK_BINDING=${process.env.RSPACK_BINDING}'). The expected version of @rspack/core to the current binding is ${expectedCoreVersion}.
|
10262
|
+
` : `Unmatched version @rspack/core@${coreVersion} and @rspack/binding.
|
10263
|
+
|
10264
|
+
Help:
|
10265
|
+
Please ensure the version of @rspack/binding and @rspack/core is the same.
|
10266
|
+
`, createHtmlPluginHooksRegisters = (getCompiler, createTap, createMapTap)=>{
|
10235
10267
|
let getOptions = (uid)=>getPluginOptions(getCompiler().__internal__get_compilation(), uid);
|
10236
10268
|
return {
|
10237
10269
|
registerHtmlPluginBeforeAssetTagGenerationTaps: createTap(binding_.RegisterJsTapKind.HtmlPluginBeforeAssetTagGeneration, function() {
|
@@ -11486,7 +11518,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
11486
11518
|
obj.children = this.stats.map((stat, idx)=>{
|
11487
11519
|
let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
|
11488
11520
|
return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
|
11489
|
-
}), childOptions.version && (obj.rspackVersion = "1.4.
|
11521
|
+
}), childOptions.version && (obj.rspackVersion = "1.4.6", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
|
11490
11522
|
let mapError = (j, obj)=>({
|
11491
11523
|
...obj,
|
11492
11524
|
compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
|
@@ -11990,9 +12022,6 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
11990
12022
|
errors: result,
|
11991
12023
|
filtered
|
11992
12024
|
};
|
11993
|
-
}, warningFromStatsWarning = (warning)=>{
|
11994
|
-
let res = Error(warning.message);
|
11995
|
-
return res.name = warning.name || "StatsWarning", Object.assign(res, warning), res;
|
11996
12025
|
}, GROUP_EXTENSION_REGEXP = /(\.[^.]+?)(?:\?|(?: \+ \d+ modules?)?$)/, GROUP_PATH_REGEXP = /(.+)[/\\][^/\\]+?(?:\?|(?: \+ \d+ modules?)?$)/, ITEM_NAMES = {
|
11997
12026
|
"compilation.children[]": "compilation",
|
11998
12027
|
"compilation.modules[]": "module",
|
@@ -12276,7 +12305,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12276
12305
|
}
|
12277
12306
|
}, EXTRACT_ERROR = {
|
12278
12307
|
_: (object, error)=>{
|
12279
|
-
object.message = error.message, error.code && (object.code = error.code), error.chunkName && (object.chunkName = error.chunkName), error.chunkEntry && (object.chunkEntry = error.chunkEntry), error.chunkInitial && (object.chunkInitial = error.chunkInitial), error.file && (object.file = error.file), error.moduleDescriptor && (object.moduleIdentifier = error.moduleDescriptor.identifier, object.moduleName = error.moduleDescriptor.name),
|
12308
|
+
object.message = error.message, error.code && (object.code = error.code), error.chunkName && (object.chunkName = error.chunkName), error.chunkEntry && (object.chunkEntry = error.chunkEntry), error.chunkInitial && (object.chunkInitial = error.chunkInitial), error.file && (object.file = error.file), error.moduleDescriptor && (object.moduleIdentifier = error.moduleDescriptor.identifier, object.moduleName = error.moduleDescriptor.name), error.loc && (object.loc = error.loc);
|
12280
12309
|
},
|
12281
12310
|
ids: (object, error)=>{
|
12282
12311
|
error.chunkId && (object.chunkId = error.chunkId), error.moduleDescriptor && (object.moduleId = error.moduleDescriptor.id);
|
@@ -12305,8 +12334,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12305
12334
|
if (!context.cachedGetWarnings) {
|
12306
12335
|
let map = new WeakMap();
|
12307
12336
|
context.cachedGetWarnings = (compilation)=>{
|
12308
|
-
|
12309
|
-
return map.get(compilation) || (warnings = compilation.
|
12337
|
+
let warnings;
|
12338
|
+
return map.get(compilation) || (warnings = compilation.__internal_getInner().createStatsWarnings(compilation.getWarnings(), !!options.colors), map.set(compilation, warnings), warnings);
|
12310
12339
|
};
|
12311
12340
|
}
|
12312
12341
|
compilation.name && (object.name = compilation.name);
|
@@ -12389,7 +12418,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12389
12418
|
object.hash = context.getStatsCompilation(compilation).hash;
|
12390
12419
|
},
|
12391
12420
|
version: (object)=>{
|
12392
|
-
object.version = "5.75.0", object.rspackVersion = "1.4.
|
12421
|
+
object.version = "5.75.0", object.rspackVersion = "1.4.6";
|
12393
12422
|
},
|
12394
12423
|
env: (object, _compilation, _context, { _env })=>{
|
12395
12424
|
object.env = _env;
|
@@ -13105,6 +13134,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
13105
13134
|
"error.moduleName": (moduleName, { bold })=>moduleName.includes("!") ? `${bold(moduleName.replace(/^(\s|\S)*!/, ""))} (${moduleName})` : `${bold(moduleName)}`,
|
13106
13135
|
"error.loc": (loc, { green })=>green(loc),
|
13107
13136
|
"error.message": (message, { bold, formatError })=>message.includes("\u001b[") ? message : bold(formatError(message)),
|
13137
|
+
"error.details": (details, { formatError })=>formatError(details),
|
13138
|
+
"error.stack": (stack)=>stack,
|
13108
13139
|
"error.moduleTrace": (moduleTrace)=>void 0,
|
13109
13140
|
"error.separator!": ()=>"\n",
|
13110
13141
|
"loggingEntry(error).loggingEntry.message": (message, { red })=>mapLines(message, (x)=>`<e> ${red(x)}`),
|
@@ -13728,7 +13759,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
13728
13759
|
moduleFilenameTemplate: options.output.devtoolModuleFilenameTemplate,
|
13729
13760
|
namespace: options.output.devtoolNamespace
|
13730
13761
|
}).apply(compiler);
|
13731
|
-
if (new JavascriptModulesPlugin().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
|
13762
|
+
if (new JavascriptModulesPlugin().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.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);
|
13732
13763
|
options.optimization.splitChunks && new SplitChunksPlugin(options.optimization.splitChunks).apply(compiler), options.optimization.removeEmptyChunks && new RemoveEmptyChunksPlugin().apply(compiler), options.optimization.realContentHash && new RealContentHashPlugin().apply(compiler);
|
13733
13764
|
let moduleIds = options.optimization.moduleIds;
|
13734
13765
|
if (moduleIds) switch(moduleIds){
|
@@ -13837,13 +13868,6 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
13837
13868
|
});
|
13838
13869
|
let asRegExp = (test)=>"string" == typeof test ? RegExp(`^${test.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")}`) : test, matchPart = (str, test)=>!test || (Array.isArray(test) ? test.map(asRegExp).some((regExp)=>regExp.test(str)) : asRegExp(test).test(str)), matchObject = (obj, str)=>!(obj.test && !matchPart(str, obj.test) || obj.include && !matchPart(str, obj.include) || obj.exclude && matchPart(str, obj.exclude)), FlagAllModulesAsUsedPlugin = base_create(binding_.BuiltinPluginName.FlagAllModulesAsUsedPlugin, (explanation)=>({
|
13839
13870
|
explanation
|
13840
|
-
})), getDllPluginOptionsSchema = memoize(()=>schemas_object({
|
13841
|
-
context: schemas_string().optional(),
|
13842
|
-
entryOnly: schemas_boolean().optional(),
|
13843
|
-
format: schemas_boolean().optional(),
|
13844
|
-
name: schemas_string().optional(),
|
13845
|
-
path: schemas_string(),
|
13846
|
-
type: schemas_string().optional()
|
13847
13871
|
}));
|
13848
13872
|
class DllPlugin {
|
13849
13873
|
options;
|
@@ -13866,58 +13890,6 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
13866
13890
|
}), new LibManifestPlugin(this.options).apply(compiler), this.options.entryOnly || new FlagAllModulesAsUsedPlugin("DllPlugin").apply(compiler);
|
13867
13891
|
}
|
13868
13892
|
}
|
13869
|
-
let getDllReferencePluginOptionsSchema = memoize(()=>{
|
13870
|
-
let dllReferencePluginOptionsContentItem = schemas_object({
|
13871
|
-
buildMeta: custom(),
|
13872
|
-
exports: schemas_array(schemas_string()).or(literal(!0)),
|
13873
|
-
id: schemas_string().or(numberOrInfinity)
|
13874
|
-
}).partial(), dllReferencePluginOptionsContent = record(schemas_string(), dllReferencePluginOptionsContentItem), dllReferencePluginOptionsSourceType = schemas_enum([
|
13875
|
-
"var",
|
13876
|
-
"assign",
|
13877
|
-
"this",
|
13878
|
-
"window",
|
13879
|
-
"global",
|
13880
|
-
"commonjs",
|
13881
|
-
"commonjs2",
|
13882
|
-
"commonjs-module",
|
13883
|
-
"amd",
|
13884
|
-
"amd-require",
|
13885
|
-
"umd",
|
13886
|
-
"umd2",
|
13887
|
-
"jsonp",
|
13888
|
-
"system"
|
13889
|
-
]), dllReferencePluginOptionsManifest = schemas_object({
|
13890
|
-
content: dllReferencePluginOptionsContent,
|
13891
|
-
name: schemas_string().optional(),
|
13892
|
-
type: dllReferencePluginOptionsSourceType.optional()
|
13893
|
-
});
|
13894
|
-
return union([
|
13895
|
-
schemas_object({
|
13896
|
-
context: schemas_string().optional(),
|
13897
|
-
extensions: schemas_array(schemas_string()).optional(),
|
13898
|
-
manifest: schemas_string().or(dllReferencePluginOptionsManifest),
|
13899
|
-
name: schemas_string().optional(),
|
13900
|
-
scope: schemas_string().optional(),
|
13901
|
-
sourceType: dllReferencePluginOptionsSourceType.optional(),
|
13902
|
-
type: schemas_enum([
|
13903
|
-
"require",
|
13904
|
-
"object"
|
13905
|
-
]).optional()
|
13906
|
-
}),
|
13907
|
-
schemas_object({
|
13908
|
-
content: dllReferencePluginOptionsContent,
|
13909
|
-
context: schemas_string().optional(),
|
13910
|
-
extensions: schemas_array(schemas_string()).optional(),
|
13911
|
-
name: schemas_string(),
|
13912
|
-
scope: schemas_string().optional(),
|
13913
|
-
sourceType: dllReferencePluginOptionsSourceType.optional(),
|
13914
|
-
type: schemas_enum([
|
13915
|
-
"require",
|
13916
|
-
"object"
|
13917
|
-
]).optional()
|
13918
|
-
})
|
13919
|
-
]);
|
13920
|
-
});
|
13921
13893
|
class DllReferencePlugin {
|
13922
13894
|
options;
|
13923
13895
|
errors;
|
@@ -15869,7 +15841,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
15869
15841
|
let _options = JSON.stringify(options || {});
|
15870
15842
|
return binding_default().transform(source, _options);
|
15871
15843
|
}
|
15872
|
-
let exports_rspackVersion = "1.4.
|
15844
|
+
let exports_rspackVersion = "1.4.6", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
|
15873
15845
|
getNormalizedRspackOptions: getNormalizedRspackOptions,
|
15874
15846
|
applyRspackOptionsDefaults: applyRspackOptionsDefaults,
|
15875
15847
|
getNormalizedWebpackOptions: getNormalizedRspackOptions,
|