@rspack-debug/core 1.4.0 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/compiled/tinypool/README.md +1 -1
- package/compiled/tinypool/dist/entry/worker.js +1 -0
- package/compiled/tinypool/dist/index.js +6 -2
- package/compiled/tinypool/package.json +1 -1
- package/dist/Chunk.d.ts +14 -34
- package/dist/ChunkGraph.d.ts +6 -21
- package/dist/Chunks.d.ts +0 -1
- package/dist/Compilation.d.ts +9 -8
- package/dist/Entrypoint.d.ts +2 -10
- package/dist/ErrorHelpers.d.ts +2 -0
- package/dist/RspackError.d.ts +1 -1
- package/dist/builtin-plugin/APIPlugin.d.ts +1 -2
- package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -2
- package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -2
- package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -2
- package/dist/builtin-plugin/BannerPlugin.d.ts +3 -3
- package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -2
- package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -2
- package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -2
- package/dist/builtin-plugin/ContextReplacementPlugin.d.ts +1 -2
- package/dist/builtin-plugin/CopyRspackPlugin.d.ts +2 -2
- package/dist/builtin-plugin/CssChunkingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -2
- package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -2
- package/dist/builtin-plugin/DefinePlugin.d.ts +1 -2
- package/dist/builtin-plugin/DllEntryPlugin.d.ts +1 -2
- package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +2 -2
- package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -2
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -2
- package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -2
- package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -2
- package/dist/builtin-plugin/EntryPlugin.d.ts +2 -2
- package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +2 -2
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +2 -2
- package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +1 -2
- package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -2
- package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +1 -2
- package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -2
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -2
- package/dist/builtin-plugin/IgnorePlugin.d.ts +2 -2
- package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -2
- package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -2
- package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -2
- package/dist/builtin-plugin/LibManifestPlugin.d.ts +1 -2
- package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +1 -2
- package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -2
- package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -2
- package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -2
- package/dist/builtin-plugin/ModuleInfoHeaderPlugin.d.ts +1 -2
- package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -2
- package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -2
- package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +1 -2
- package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -2
- package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +2 -2
- package/dist/builtin-plugin/ProgressPlugin.d.ts +2 -2
- package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -2
- package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -2
- package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +1 -2
- package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -2
- package/dist/builtin-plugin/RsdoctorPlugin.d.ts +2 -2
- package/dist/builtin-plugin/RslibPlugin.d.ts +2 -2
- package/dist/builtin-plugin/RstestPlugin.d.ts +2 -2
- package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +2 -2
- package/dist/builtin-plugin/RuntimePlugin.d.ts +2 -2
- package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -2
- package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +1 -2
- package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +2 -2
- package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +2 -2
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -2
- package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -2
- package/dist/builtin-plugin/base.d.ts +29 -5
- package/dist/builtin-plugin/html-plugin/plugin.d.ts +2 -2
- package/dist/builtin-plugin/index.d.ts +1 -1
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +1 -2
- package/dist/config/normalization.d.ts +5 -3
- package/dist/config/types.d.ts +24 -5
- package/dist/config/zod.d.ts +7 -6
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -2
- package/dist/exports.d.ts +3 -1
- package/dist/index.js +242 -377
- package/dist/lib/WebpackError.d.ts +2 -4
- package/dist/loader-runner/ModuleError.d.ts +7 -0
- package/dist/loader-runner/ModuleWarning.d.ts +7 -0
- package/dist/stats/StatsFactory.d.ts +2 -2
- package/dist/stats/statsFactoryUtils.d.ts +2 -2
- package/dist/trace/index.d.ts +7 -1
- package/dist/util/index.d.ts +0 -2
- package/dist/worker.js +11 -7
- package/package.json +5 -3
- package/dist/ChunkGroup.d.ts +0 -33
package/dist/index.js
CHANGED
|
@@ -220,10 +220,10 @@ var __webpack_modules__ = {
|
|
|
220
220
|
module.exports = require("./moduleFederationDefaultRuntime.js");
|
|
221
221
|
},
|
|
222
222
|
"@rspack/binding": function(module) {
|
|
223
|
-
module.exports = require("@rspack/binding");
|
|
223
|
+
module.exports = require(process.env.RSPACK_BINDING ? process.env.RSPACK_BINDING : "@rspack/binding");
|
|
224
224
|
},
|
|
225
225
|
"@rspack/binding/package.json": function(module) {
|
|
226
|
-
module.exports = require("@rspack/binding/package.json");
|
|
226
|
+
module.exports = require(process.env.RSPACK_BINDING ? require("node:path").resolve(process.env.RSPACK_BINDING, './package.json') : "@rspack/binding/package.json");
|
|
227
227
|
},
|
|
228
228
|
"node:http": function(module) {
|
|
229
229
|
module.exports = require("node:http");
|
|
@@ -231,6 +231,9 @@ var __webpack_modules__ = {
|
|
|
231
231
|
"node:https": function(module) {
|
|
232
232
|
module.exports = require("node:https");
|
|
233
233
|
},
|
|
234
|
+
"node:inspector": function(module) {
|
|
235
|
+
module.exports = require("node:inspector");
|
|
236
|
+
},
|
|
234
237
|
"node:os": function(module) {
|
|
235
238
|
module.exports = require("node:os");
|
|
236
239
|
},
|
|
@@ -250,11 +253,6 @@ var __webpack_modules__ = {
|
|
|
250
253
|
module.exports = import("../compiled/tinypool/dist/index.js").then(function(module) {
|
|
251
254
|
return module;
|
|
252
255
|
});
|
|
253
|
-
},
|
|
254
|
-
"node:inspector": function(module) {
|
|
255
|
-
module.exports = import("node:inspector").then(function(module) {
|
|
256
|
-
return module;
|
|
257
|
-
});
|
|
258
256
|
}
|
|
259
257
|
}, __webpack_module_cache__ = {};
|
|
260
258
|
function __webpack_require__(moduleId) {
|
|
@@ -356,7 +354,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
356
354
|
Compiler: ()=>Compiler,
|
|
357
355
|
wasm: ()=>exports_wasm
|
|
358
356
|
});
|
|
359
|
-
var RequestType, StatsErrorCode, _computedKey,
|
|
357
|
+
var RequestType, StatsErrorCode, _computedKey, _computedKey1, _computedKey2, ArrayQueue_computedKey, browserslistTargetHandler_namespaceObject = {};
|
|
360
358
|
__webpack_require__.r(browserslistTargetHandler_namespaceObject), __webpack_require__.d(browserslistTargetHandler_namespaceObject, {
|
|
361
359
|
resolve: ()=>browserslistTargetHandler_resolve
|
|
362
360
|
});
|
|
@@ -437,240 +435,20 @@ for(var __webpack_i__ in (()=>{
|
|
|
437
435
|
webworker: ()=>webworker
|
|
438
436
|
});
|
|
439
437
|
var binding_ = __webpack_require__("@rspack/binding"), binding_default = __webpack_require__.n(binding_);
|
|
440
|
-
let lite_tapable_namespaceObject = require("@rspack/lite-tapable"),
|
|
441
|
-
class ChunkGroup {
|
|
442
|
-
#inner;
|
|
443
|
-
static __from_binding(binding) {
|
|
444
|
-
let chunkGroup = CHUNK_GROUP_MAPPINGS.get(binding);
|
|
445
|
-
return chunkGroup || (chunkGroup = new ChunkGroup(binding), CHUNK_GROUP_MAPPINGS.set(binding, chunkGroup)), chunkGroup;
|
|
446
|
-
}
|
|
447
|
-
constructor(inner){
|
|
448
|
-
this.#inner = inner, Object.defineProperties(this, {
|
|
449
|
-
chunks: {
|
|
450
|
-
enumerable: !0,
|
|
451
|
-
get: ()=>this.#inner.chunks.map((binding)=>Chunk.__from_binding(binding))
|
|
452
|
-
},
|
|
453
|
-
index: {
|
|
454
|
-
enumerable: !0,
|
|
455
|
-
get: ()=>this.#inner.index
|
|
456
|
-
},
|
|
457
|
-
name: {
|
|
458
|
-
enumerable: !0,
|
|
459
|
-
get: ()=>this.#inner.name
|
|
460
|
-
},
|
|
461
|
-
origins: {
|
|
462
|
-
enumerable: !0,
|
|
463
|
-
get: ()=>this.#inner.origins.map((origin)=>({
|
|
464
|
-
module: origin.module ? origin.module : void 0,
|
|
465
|
-
request: origin.request,
|
|
466
|
-
loc: origin.loc
|
|
467
|
-
}))
|
|
468
|
-
},
|
|
469
|
-
childrenIterable: {
|
|
470
|
-
enumerable: !0,
|
|
471
|
-
get: ()=>this.#inner.childrenIterable.map((child)=>ChunkGroup.__from_binding(child))
|
|
472
|
-
}
|
|
473
|
-
});
|
|
474
|
-
}
|
|
475
|
-
getFiles() {
|
|
476
|
-
return this.#inner.getFiles();
|
|
477
|
-
}
|
|
478
|
-
getParents() {
|
|
479
|
-
return this.#inner.getParents().map((binding)=>ChunkGroup.__from_binding(binding));
|
|
480
|
-
}
|
|
481
|
-
isInitial() {
|
|
482
|
-
return this.#inner.isInitial();
|
|
483
|
-
}
|
|
484
|
-
getModulePreOrderIndex(module) {
|
|
485
|
-
return this.#inner.getModulePreOrderIndex(module);
|
|
486
|
-
}
|
|
487
|
-
getModulePostOrderIndex(module) {
|
|
488
|
-
return this.#inner.getModulePostOrderIndex(module);
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
let CHUNK_MAPPINGS = new WeakMap();
|
|
492
|
-
class Chunk {
|
|
493
|
-
#inner;
|
|
494
|
-
static __from_binding(binding) {
|
|
495
|
-
let chunk = CHUNK_MAPPINGS.get(binding);
|
|
496
|
-
return chunk || (chunk = new Chunk(binding), CHUNK_MAPPINGS.set(binding, chunk)), chunk;
|
|
497
|
-
}
|
|
498
|
-
static __to_binding(chunk) {
|
|
499
|
-
return chunk.#inner;
|
|
500
|
-
}
|
|
501
|
-
constructor(binding){
|
|
502
|
-
this.#inner = binding, Object.defineProperties(this, {
|
|
503
|
-
name: {
|
|
504
|
-
enumerable: !0,
|
|
505
|
-
get: ()=>binding.name
|
|
506
|
-
},
|
|
507
|
-
id: {
|
|
508
|
-
enumerable: !0,
|
|
509
|
-
get: ()=>binding.id
|
|
510
|
-
},
|
|
511
|
-
ids: {
|
|
512
|
-
enumerable: !0,
|
|
513
|
-
get: ()=>binding.ids
|
|
514
|
-
},
|
|
515
|
-
idNameHints: {
|
|
516
|
-
enumerable: !0,
|
|
517
|
-
get: ()=>binding.idNameHints
|
|
518
|
-
},
|
|
519
|
-
filenameTemplate: {
|
|
520
|
-
enumerable: !0,
|
|
521
|
-
get: ()=>binding.filenameTemplate
|
|
522
|
-
},
|
|
523
|
-
cssFilenameTemplate: {
|
|
524
|
-
enumerable: !0,
|
|
525
|
-
get: ()=>binding.cssFilenameTemplate
|
|
526
|
-
},
|
|
527
|
-
files: {
|
|
528
|
-
enumerable: !0,
|
|
529
|
-
get: ()=>new Set(binding.files)
|
|
530
|
-
},
|
|
531
|
-
runtime: {
|
|
532
|
-
enumerable: !0,
|
|
533
|
-
get: ()=>new Set(binding.runtime)
|
|
534
|
-
},
|
|
535
|
-
hash: {
|
|
536
|
-
enumerable: !0,
|
|
537
|
-
get: ()=>binding.hash
|
|
538
|
-
},
|
|
539
|
-
contentHash: {
|
|
540
|
-
enumerable: !0,
|
|
541
|
-
get: ()=>binding.contentHash
|
|
542
|
-
},
|
|
543
|
-
renderedHash: {
|
|
544
|
-
enumerable: !0,
|
|
545
|
-
get: ()=>binding.renderedHash
|
|
546
|
-
},
|
|
547
|
-
chunkReason: {
|
|
548
|
-
enumerable: !0,
|
|
549
|
-
get: ()=>binding.chunkReason
|
|
550
|
-
},
|
|
551
|
-
auxiliaryFiles: {
|
|
552
|
-
enumerable: !0,
|
|
553
|
-
get: ()=>new Set(binding.auxiliaryFiles)
|
|
554
|
-
}
|
|
555
|
-
});
|
|
556
|
-
}
|
|
557
|
-
isOnlyInitial() {
|
|
558
|
-
return this.#inner.isOnlyInitial();
|
|
559
|
-
}
|
|
560
|
-
canBeInitial() {
|
|
561
|
-
return this.#inner.canBeInitial();
|
|
562
|
-
}
|
|
563
|
-
hasRuntime() {
|
|
564
|
-
return this.#inner.hasRuntime();
|
|
565
|
-
}
|
|
566
|
-
get groupsIterable() {
|
|
567
|
-
return new Set(this.#inner.groups().map((binding)=>ChunkGroup.__from_binding(binding)));
|
|
568
|
-
}
|
|
569
|
-
getChunkMaps(realHash) {
|
|
570
|
-
let chunkHashMap = {}, chunkContentHashMap = {}, chunkNameMap = {};
|
|
571
|
-
for (let chunk of this.getAllAsyncChunks()){
|
|
572
|
-
let id = chunk.id;
|
|
573
|
-
if (!id) continue;
|
|
574
|
-
let chunkHash = realHash ? chunk.hash : chunk.renderedHash;
|
|
575
|
-
for (let key of (chunkHash && (chunkHashMap[id] = chunkHash), Object.keys(chunk.contentHash)))chunkContentHashMap[key] || (chunkContentHashMap[key] = {}), chunkContentHashMap[key][id] = chunk.contentHash[key];
|
|
576
|
-
chunk.name && (chunkNameMap[id] = chunk.name);
|
|
577
|
-
}
|
|
578
|
-
return {
|
|
579
|
-
hash: chunkHashMap,
|
|
580
|
-
contentHash: chunkContentHashMap,
|
|
581
|
-
name: chunkNameMap
|
|
582
|
-
};
|
|
583
|
-
}
|
|
584
|
-
getAllAsyncChunks() {
|
|
585
|
-
return new Set(this.#inner.getAllAsyncChunks().map((binding)=>Chunk.__from_binding(binding)));
|
|
586
|
-
}
|
|
587
|
-
getAllInitialChunks() {
|
|
588
|
-
return new Set(this.#inner.getAllInitialChunks().map((binding)=>Chunk.__from_binding(binding)));
|
|
589
|
-
}
|
|
590
|
-
getAllReferencedChunks() {
|
|
591
|
-
return new Set(this.#inner.getAllReferencedChunks().map((binding)=>Chunk.__from_binding(binding)));
|
|
592
|
-
}
|
|
593
|
-
getEntryOptions() {
|
|
594
|
-
return this.#inner.getEntryOptions();
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
function toJsRuntimeSpec(runtime) {
|
|
598
|
-
return runtime instanceof Set ? Array.from(runtime) : runtime;
|
|
599
|
-
}
|
|
600
|
-
class ChunkGraph {
|
|
601
|
-
#inner;
|
|
602
|
-
static __from_binding(binding) {
|
|
603
|
-
return new ChunkGraph(binding);
|
|
604
|
-
}
|
|
605
|
-
constructor(binding){
|
|
606
|
-
this.#inner = binding;
|
|
607
|
-
}
|
|
608
|
-
hasChunkEntryDependentChunks(chunk) {
|
|
609
|
-
return this.#inner.hasChunkEntryDependentChunks(Chunk.__to_binding(chunk));
|
|
610
|
-
}
|
|
611
|
-
getChunkModules(chunk) {
|
|
612
|
-
return this.#inner.getChunkModules(Chunk.__to_binding(chunk));
|
|
613
|
-
}
|
|
614
|
-
getChunkModulesIterable(chunk) {
|
|
615
|
-
return this.#inner.getChunkModules(Chunk.__to_binding(chunk));
|
|
616
|
-
}
|
|
617
|
-
getOrderedChunkModulesIterable(chunk, compareFn) {
|
|
618
|
-
let res = this.#inner.getChunkModules(Chunk.__to_binding(chunk));
|
|
619
|
-
return res.sort(compareFn), res;
|
|
620
|
-
}
|
|
621
|
-
getChunkEntryModulesIterable(chunk) {
|
|
622
|
-
return this.#inner.getChunkEntryModules(Chunk.__to_binding(chunk));
|
|
623
|
-
}
|
|
624
|
-
getNumberOfEntryModules(chunk) {
|
|
625
|
-
return this.#inner.getNumberOfEntryModules(Chunk.__to_binding(chunk));
|
|
626
|
-
}
|
|
627
|
-
getChunkEntryDependentChunksIterable(chunk) {
|
|
628
|
-
return this.#inner.getChunkEntryDependentChunksIterable(Chunk.__to_binding(chunk)).map((binding)=>Chunk.__from_binding(binding));
|
|
629
|
-
}
|
|
630
|
-
getChunkModulesIterableBySourceType(chunk, sourceType) {
|
|
631
|
-
return this.#inner.getChunkModulesIterableBySourceType(Chunk.__to_binding(chunk), sourceType);
|
|
632
|
-
}
|
|
633
|
-
getModuleChunks(module) {
|
|
634
|
-
return this.#inner.getModuleChunks(module).map((binding)=>Chunk.__from_binding(binding));
|
|
635
|
-
}
|
|
636
|
-
getModuleChunksIterable(module) {
|
|
637
|
-
return this.#inner.getModuleChunks(module).map((binding)=>Chunk.__from_binding(binding));
|
|
638
|
-
}
|
|
639
|
-
getModuleId(module) {
|
|
640
|
-
return this.#inner.getModuleId(module);
|
|
641
|
-
}
|
|
642
|
-
getModuleHash(module, runtime) {
|
|
643
|
-
return this.#inner.getModuleHash(module, toJsRuntimeSpec(runtime));
|
|
644
|
-
}
|
|
645
|
-
getBlockChunkGroup(depBlock) {
|
|
646
|
-
let binding = this.#inner.getBlockChunkGroup(depBlock);
|
|
647
|
-
return binding ? ChunkGroup.__from_binding(binding) : null;
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
let ENTRYPOINT_MAPPINGS = new WeakMap();
|
|
651
|
-
class Entrypoint extends ChunkGroup {
|
|
652
|
-
#inner;
|
|
653
|
-
static __from_binding(binding) {
|
|
654
|
-
let entrypoint = ENTRYPOINT_MAPPINGS.get(binding);
|
|
655
|
-
return entrypoint || (entrypoint = new Entrypoint(binding), ENTRYPOINT_MAPPINGS.set(binding, entrypoint)), entrypoint;
|
|
656
|
-
}
|
|
657
|
-
constructor(binding){
|
|
658
|
-
super(binding), this.#inner = binding;
|
|
659
|
-
}
|
|
660
|
-
getRuntimeChunk() {
|
|
661
|
-
let chunkBinding = this.#inner.getRuntimeChunk();
|
|
662
|
-
return chunkBinding ? Chunk.__from_binding(chunkBinding) : null;
|
|
663
|
-
}
|
|
664
|
-
getEntrypointChunk() {
|
|
665
|
-
let chunkBinding = this.#inner.getEntrypointChunk();
|
|
666
|
-
return chunkBinding ? Chunk.__from_binding(chunkBinding) : null;
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
let cutOffByFlag = (stack, flag)=>{
|
|
438
|
+
let lite_tapable_namespaceObject = require("@rspack/lite-tapable"), cutOffByFlag = (stack, flag)=>{
|
|
670
439
|
let stacks = stack.split("\n");
|
|
671
440
|
for(let i = 0; i < stacks.length; i++)stacks[i].includes(flag) && (stacks.length = i);
|
|
672
441
|
return stacks.join("\n");
|
|
673
|
-
}, cutOffLoaderExecution = (stack)=>cutOffByFlag(stack, "LOADER_EXECUTION")
|
|
442
|
+
}, cutOffLoaderExecution = (stack)=>cutOffByFlag(stack, "LOADER_EXECUTION"), cleanUp = (stack, name, message)=>{
|
|
443
|
+
let details = cutOffLoaderExecution(stack);
|
|
444
|
+
return cutOffMessage(stack, name, message);
|
|
445
|
+
}, cutOffMessage = (stack, name, message)=>{
|
|
446
|
+
let nextLine = stack.indexOf("\n");
|
|
447
|
+
return -1 === nextLine ? stack === message ? "" : stack : stack.slice(0, nextLine) === `${name}: ${message}` ? stack.slice(nextLine + 1) : stack;
|
|
448
|
+
};
|
|
449
|
+
function toJsRuntimeSpec(runtime) {
|
|
450
|
+
return runtime instanceof Set ? Array.from(runtime) : runtime;
|
|
451
|
+
}
|
|
674
452
|
class ExportsInfo {
|
|
675
453
|
#inner;
|
|
676
454
|
static __from_binding(binding) {
|
|
@@ -880,18 +658,22 @@ for(var __webpack_i__ in (()=>{
|
|
|
880
658
|
}
|
|
881
659
|
let external_node_util_namespaceObject = require("node:util");
|
|
882
660
|
var external_node_util_default = __webpack_require__.n(external_node_util_namespaceObject);
|
|
883
|
-
|
|
884
|
-
let WebpackError = class extends Error {
|
|
661
|
+
class WebpackError_WebpackError extends Error {
|
|
885
662
|
loc;
|
|
886
663
|
file;
|
|
887
664
|
chunk;
|
|
888
665
|
module;
|
|
889
666
|
details;
|
|
890
667
|
hideStack;
|
|
891
|
-
|
|
668
|
+
}
|
|
669
|
+
Object.defineProperty(WebpackError_WebpackError.prototype, external_node_util_namespaceObject.inspect.custom, {
|
|
670
|
+
value: function() {
|
|
892
671
|
return this.stack + (this.details ? `\n${this.details}` : "");
|
|
893
|
-
}
|
|
894
|
-
|
|
672
|
+
},
|
|
673
|
+
enumerable: !1,
|
|
674
|
+
configurable: !0
|
|
675
|
+
});
|
|
676
|
+
let WebpackError = WebpackError_WebpackError, LogType = Object.freeze({
|
|
895
677
|
error: "error",
|
|
896
678
|
warn: "warn",
|
|
897
679
|
info: "info",
|
|
@@ -1452,14 +1234,61 @@ for(var __webpack_i__ in (()=>{
|
|
|
1452
1234
|
};
|
|
1453
1235
|
}
|
|
1454
1236
|
}
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1237
|
+
Object.defineProperty(binding_.Chunk.prototype, "files", {
|
|
1238
|
+
enumerable: !0,
|
|
1239
|
+
configurable: !0,
|
|
1240
|
+
get () {
|
|
1241
|
+
return new Set(this._files);
|
|
1242
|
+
}
|
|
1243
|
+
}), Object.defineProperty(binding_.Chunk.prototype, "runtime", {
|
|
1244
|
+
enumerable: !0,
|
|
1245
|
+
configurable: !0,
|
|
1246
|
+
get () {
|
|
1247
|
+
return new Set(this._runtime);
|
|
1248
|
+
}
|
|
1249
|
+
}), Object.defineProperty(binding_.Chunk.prototype, "auxiliaryFiles", {
|
|
1250
|
+
enumerable: !0,
|
|
1251
|
+
configurable: !0,
|
|
1252
|
+
get () {
|
|
1253
|
+
return new Set(this._auxiliaryFiles);
|
|
1254
|
+
}
|
|
1255
|
+
}), Object.defineProperty(binding_.Chunk.prototype, "groupsIterable", {
|
|
1256
|
+
enumerable: !0,
|
|
1257
|
+
configurable: !0,
|
|
1258
|
+
get () {
|
|
1259
|
+
return new Set(this._groupsIterable);
|
|
1260
|
+
}
|
|
1261
|
+
}), Object.defineProperty(binding_.Chunk.prototype, "getChunkMaps", {
|
|
1262
|
+
enumerable: !0,
|
|
1263
|
+
configurable: !0,
|
|
1264
|
+
value (realHash) {
|
|
1265
|
+
let chunkHashMap = {}, chunkContentHashMap = {}, chunkNameMap = {};
|
|
1266
|
+
for (let chunk of this.getAllAsyncChunks()){
|
|
1267
|
+
let id = chunk.id;
|
|
1268
|
+
if (!id) continue;
|
|
1269
|
+
let chunkHash = realHash ? chunk.hash : chunk.renderedHash;
|
|
1270
|
+
for (let key of (chunkHash && (chunkHashMap[id] = chunkHash), Object.keys(chunk.contentHash)))chunkContentHashMap[key] || (chunkContentHashMap[key] = {}), chunkContentHashMap[key][id] = chunk.contentHash[key];
|
|
1271
|
+
chunk.name && (chunkNameMap[id] = chunk.name);
|
|
1272
|
+
}
|
|
1273
|
+
return {
|
|
1274
|
+
hash: chunkHashMap,
|
|
1275
|
+
contentHash: chunkContentHashMap,
|
|
1276
|
+
name: chunkNameMap
|
|
1277
|
+
};
|
|
1278
|
+
}
|
|
1279
|
+
}), Object.defineProperty(binding_.Chunk.prototype, external_node_util_default().inspect.custom, {
|
|
1280
|
+
enumerable: !0,
|
|
1281
|
+
configurable: !0,
|
|
1282
|
+
value () {
|
|
1283
|
+
return {
|
|
1284
|
+
...this
|
|
1285
|
+
};
|
|
1286
|
+
}
|
|
1287
|
+
}), Object.defineProperty(binding_.Chunks.prototype, "values", {
|
|
1459
1288
|
enumerable: !0,
|
|
1460
1289
|
configurable: !0,
|
|
1461
1290
|
value () {
|
|
1462
|
-
return this._values().
|
|
1291
|
+
return this._values().values();
|
|
1463
1292
|
}
|
|
1464
1293
|
}), Object.defineProperty(binding_.Chunks.prototype, Symbol.iterator, {
|
|
1465
1294
|
enumerable: !0,
|
|
@@ -1477,16 +1306,26 @@ for(var __webpack_i__ in (()=>{
|
|
|
1477
1306
|
enumerable: !0,
|
|
1478
1307
|
configurable: !0,
|
|
1479
1308
|
value (callbackfn, thisArg) {
|
|
1480
|
-
for (let
|
|
1481
|
-
let chunk = Chunk.__from_binding(binding);
|
|
1482
|
-
callbackfn.call(thisArg, chunk, chunk, this);
|
|
1483
|
-
}
|
|
1309
|
+
for (let chunk of this._values())callbackfn.call(thisArg, chunk, chunk, this);
|
|
1484
1310
|
}
|
|
1485
1311
|
}), Object.defineProperty(binding_.Chunks.prototype, "has", {
|
|
1486
1312
|
enumerable: !0,
|
|
1487
1313
|
configurable: !0,
|
|
1488
1314
|
value (value) {
|
|
1489
|
-
return this._has(
|
|
1315
|
+
return this._has(value);
|
|
1316
|
+
}
|
|
1317
|
+
}), Object.defineProperty(binding_.ChunkGraph.prototype, "getOrderedChunkModulesIterable", {
|
|
1318
|
+
enumerable: !0,
|
|
1319
|
+
configurable: !0,
|
|
1320
|
+
value (chunk, compareFn) {
|
|
1321
|
+
let modules = this.getChunkModules(chunk);
|
|
1322
|
+
return modules.sort(compareFn), modules;
|
|
1323
|
+
}
|
|
1324
|
+
}), Object.defineProperty(binding_.ChunkGraph.prototype, "getModuleHash", {
|
|
1325
|
+
enumerable: !0,
|
|
1326
|
+
configurable: !0,
|
|
1327
|
+
value (module, runtime) {
|
|
1328
|
+
return this._getModuleHash(module, toJsRuntimeSpec(runtime));
|
|
1490
1329
|
}
|
|
1491
1330
|
}), Object.defineProperty(binding_.Sources.prototype, "get", {
|
|
1492
1331
|
enumerable: !0,
|
|
@@ -1496,32 +1335,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
1496
1335
|
return originalSource ? JsSource.__from_binding(originalSource) : null;
|
|
1497
1336
|
}
|
|
1498
1337
|
});
|
|
1499
|
-
let
|
|
1500
|
-
if (Buffer.isBuffer(bufLike)) return bufLike;
|
|
1501
|
-
if ("string" == typeof bufLike) return Buffer.from(bufLike);
|
|
1502
|
-
if (bufLike instanceof Uint8Array) return Buffer.from(bufLike.buffer);
|
|
1503
|
-
throw Error("Buffer, Uint8Array or string expected");
|
|
1504
|
-
}, toObject = (input)=>{
|
|
1505
|
-
let s;
|
|
1506
|
-
if (Buffer.isBuffer(input)) s = input.toString("utf8");
|
|
1507
|
-
else if (input && "object" == typeof input) return input;
|
|
1508
|
-
else if ("string" == typeof input) s = input;
|
|
1509
|
-
else throw Error("Buffer or string or object expected");
|
|
1510
|
-
return JSON.parse(s);
|
|
1511
|
-
};
|
|
1512
|
-
function serializeObject(map) {
|
|
1513
|
-
if (!isNil(map)) return "string" == typeof map ? map ? toBuffer(map) : void 0 : toBuffer(JSON.stringify(map));
|
|
1514
|
-
}
|
|
1515
|
-
function concatErrorMsgAndStack(err) {
|
|
1516
|
-
return "string" == typeof err ? Error(err) : (!("hideStack" in err && err.hideStack) && "stack" in err ? err.message = err.stack || err.toString() : err.message = err.toString(), err.stack = err.stack || void 0, err);
|
|
1517
|
-
}
|
|
1518
|
-
function stringifyLoaderObject(o) {
|
|
1519
|
-
return o.path + o.query + o.fragment;
|
|
1520
|
-
}
|
|
1521
|
-
let unsupported = (name, issue)=>{
|
|
1522
|
-
let s = `${name} is not supported by rspack.`;
|
|
1523
|
-
throw issue && (s += ` Please refer to issue ${issue} for more information.`), Error(s);
|
|
1524
|
-
}, $proxy = Symbol.for("proxy");
|
|
1338
|
+
let $proxy = Symbol.for("proxy");
|
|
1525
1339
|
function createDiagnosticArray(adm) {
|
|
1526
1340
|
if ($proxy in adm) return adm[$proxy];
|
|
1527
1341
|
let array = [];
|
|
@@ -1535,14 +1349,14 @@ for(var __webpack_i__ in (()=>{
|
|
|
1535
1349
|
case 2:
|
|
1536
1350
|
return adm.spliceWithArray(index, deleteCount);
|
|
1537
1351
|
}
|
|
1538
|
-
return adm.spliceWithArray(index, deleteCount, newItems
|
|
1352
|
+
return adm.spliceWithArray(index, deleteCount, newItems);
|
|
1539
1353
|
}, arrayExtensions = {
|
|
1540
1354
|
[Symbol.iterator]: ()=>adm.values().values(),
|
|
1541
1355
|
splice,
|
|
1542
|
-
push: (...newItems)=>(adm.spliceWithArray(adm.length, 0, newItems
|
|
1356
|
+
push: (...newItems)=>(adm.spliceWithArray(adm.length, 0, newItems), adm.length),
|
|
1543
1357
|
pop: ()=>splice(Math.max(adm.length - 1, 0), 1)[0],
|
|
1544
1358
|
shift: ()=>splice(0, 1)[0],
|
|
1545
|
-
unshift: (...newItems)=>(adm.spliceWithArray(0, 0, newItems
|
|
1359
|
+
unshift: (...newItems)=>(adm.spliceWithArray(0, 0, newItems), adm.length),
|
|
1546
1360
|
reverse: ()=>adm.values().reverse(),
|
|
1547
1361
|
sort (compareFn) {
|
|
1548
1362
|
let copy = adm.values();
|
|
@@ -1560,13 +1374,14 @@ for(var __webpack_i__ in (()=>{
|
|
|
1560
1374
|
adm.values().forEach(callbackfn, thisArg);
|
|
1561
1375
|
},
|
|
1562
1376
|
map: (callbackfn, thisArg)=>adm.values().map(callbackfn, thisArg),
|
|
1377
|
+
slice: (start, end)=>adm.values().slice(start, end),
|
|
1563
1378
|
reduce: (callbackfn, initialValue)=>adm.values().reduce(callbackfn, initialValue),
|
|
1564
1379
|
reduceRight: (callbackfn, initialValue)=>adm.values().reduceRight(callbackfn, initialValue)
|
|
1565
1380
|
}, proxy = new Proxy(array, {
|
|
1566
1381
|
get: (target, name)=>"length" === name ? adm.length : "string" != typeof name || Number.isNaN(Number.parseInt(name)) ? Object.prototype.hasOwnProperty.call(arrayExtensions, name) ? arrayExtensions[name] : target[name] : adm.get(Number.parseInt(name)),
|
|
1567
1382
|
set (target, name, value) {
|
|
1568
1383
|
if ("length" === name) throw Error("The 'length' property is read-only and cannot be assigned a new value.");
|
|
1569
|
-
return "symbol" == typeof name || Number.isNaN(Number.parseInt(name)) ? target[name] = value : adm.set(Number.parseInt(name),
|
|
1384
|
+
return "symbol" == typeof name || Number.isNaN(Number.parseInt(name)) ? target[name] = value : adm.set(Number.parseInt(name), value), !0;
|
|
1570
1385
|
}
|
|
1571
1386
|
});
|
|
1572
1387
|
return adm[$proxy] = proxy, proxy;
|
|
@@ -1574,7 +1389,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
1574
1389
|
let checkCompilation = (compilation)=>{
|
|
1575
1390
|
if (!(compilation instanceof Compilation)) throw TypeError('The \'compilation\' argument must be an instance of Compilation. This usually occurs when multiple versions of "@rspack/core" are used, or when the code in "@rspack/core" is executed multiple times.');
|
|
1576
1391
|
};
|
|
1577
|
-
|
|
1392
|
+
_computedKey = binding_.COMPILATION_HOOKS_MAP_SYMBOL;
|
|
1578
1393
|
class Compilation {
|
|
1579
1394
|
#inner;
|
|
1580
1395
|
#shutdown;
|
|
@@ -1601,7 +1416,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
1601
1416
|
needAdditionalPass;
|
|
1602
1417
|
#addIncludeDispatcher;
|
|
1603
1418
|
#addEntryDispatcher;
|
|
1604
|
-
[
|
|
1419
|
+
[_computedKey];
|
|
1605
1420
|
constructor(compiler, inner){
|
|
1606
1421
|
this.#inner = inner, this.#shutdown = !1;
|
|
1607
1422
|
let processAssetsHook = new lite_tapable_namespaceObject.AsyncSeriesHook([
|
|
@@ -1722,7 +1537,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
1722
1537
|
seal: new lite_tapable_namespaceObject.SyncHook([]),
|
|
1723
1538
|
afterSeal: new lite_tapable_namespaceObject.AsyncSeriesHook([]),
|
|
1724
1539
|
needAdditionalPass: new lite_tapable_namespaceObject.SyncBailHook([])
|
|
1725
|
-
}, this.compiler = compiler, this.resolverFactory = compiler.resolverFactory, this.inputFileSystem = compiler.inputFileSystem, this.options = compiler.options, this.outputOptions = compiler.options.output, this.logging = new Map(), this.childrenCounters = {}, this.children = [], this.needAdditionalPass = !1, this.chunkGraph =
|
|
1540
|
+
}, this.compiler = compiler, this.resolverFactory = compiler.resolverFactory, this.inputFileSystem = compiler.inputFileSystem, this.options = compiler.options, this.outputOptions = compiler.options.output, this.logging = new Map(), this.childrenCounters = {}, this.children = [], this.needAdditionalPass = !1, this.chunkGraph = inner.chunkGraph, this.moduleGraph = ModuleGraph.__from_binding(inner.moduleGraph), this.#addIncludeDispatcher = new AddEntryItemDispatcher(inner.addInclude.bind(inner)), this.#addEntryDispatcher = new AddEntryItemDispatcher(inner.addEntry.bind(inner)), this[binding_.COMPILATION_HOOKS_MAP_SYMBOL] = new WeakMap();
|
|
1726
1541
|
}
|
|
1727
1542
|
get hash() {
|
|
1728
1543
|
return this.#inner.hash;
|
|
@@ -1734,25 +1549,19 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
1734
1549
|
return this.#createCachedAssets();
|
|
1735
1550
|
}
|
|
1736
1551
|
get entrypoints() {
|
|
1737
|
-
return new Map(this.#inner.entrypoints.map((
|
|
1738
|
-
let entrypoint = Entrypoint.__from_binding(binding);
|
|
1739
|
-
return [
|
|
1552
|
+
return new Map(this.#inner.entrypoints.map((entrypoint)=>[
|
|
1740
1553
|
entrypoint.name,
|
|
1741
1554
|
entrypoint
|
|
1742
|
-
];
|
|
1743
|
-
}));
|
|
1555
|
+
]));
|
|
1744
1556
|
}
|
|
1745
1557
|
get chunkGroups() {
|
|
1746
|
-
return this.#inner.chunkGroups
|
|
1558
|
+
return this.#inner.chunkGroups;
|
|
1747
1559
|
}
|
|
1748
1560
|
get namedChunkGroups() {
|
|
1749
1561
|
return createReadonlyMap({
|
|
1750
1562
|
keys: ()=>this.#inner.getNamedChunkGroupKeys()[Symbol.iterator](),
|
|
1751
1563
|
get: (property)=>{
|
|
1752
|
-
if ("string" == typeof property)
|
|
1753
|
-
let binding = this.#inner.getNamedChunkGroup(property);
|
|
1754
|
-
return ChunkGroup.__from_binding(binding);
|
|
1755
|
-
}
|
|
1564
|
+
if ("string" == typeof property) return this.#inner.getNamedChunkGroup(property);
|
|
1756
1565
|
}
|
|
1757
1566
|
});
|
|
1758
1567
|
}
|
|
@@ -1769,10 +1578,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
1769
1578
|
return createReadonlyMap({
|
|
1770
1579
|
keys: ()=>this.#inner.getNamedChunkKeys()[Symbol.iterator](),
|
|
1771
1580
|
get: (property)=>{
|
|
1772
|
-
if ("string" == typeof property)
|
|
1773
|
-
let binding = this.#inner.getNamedChunk(property);
|
|
1774
|
-
return binding ? Chunk.__from_binding(binding) : void 0;
|
|
1775
|
-
}
|
|
1581
|
+
if ("string" == typeof property) return this.#inner.getNamedChunk(property);
|
|
1776
1582
|
}
|
|
1777
1583
|
});
|
|
1778
1584
|
}
|
|
@@ -1964,7 +1770,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
1964
1770
|
this.#rebuildModuleTask.exec(module.identifier(), f);
|
|
1965
1771
|
}
|
|
1966
1772
|
addRuntimeModule(chunk, runtimeModule) {
|
|
1967
|
-
runtimeModule.attach(this, chunk, this.chunkGraph), this.#inner.addRuntimeModule(
|
|
1773
|
+
runtimeModule.attach(this, chunk, this.chunkGraph), this.#inner.addRuntimeModule(chunk, RuntimeModule.__to_binding(this, runtimeModule));
|
|
1968
1774
|
}
|
|
1969
1775
|
addInclude(context, dependency, options, callback) {
|
|
1970
1776
|
this.#addIncludeDispatcher.call(context, dependency, options, callback);
|
|
@@ -2842,7 +2648,32 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
2842
2648
|
return this.resolverFactory.get(type, resolveOptions);
|
|
2843
2649
|
}
|
|
2844
2650
|
}
|
|
2845
|
-
|
|
2651
|
+
function isNil(value) {
|
|
2652
|
+
return null == value;
|
|
2653
|
+
}
|
|
2654
|
+
let toBuffer = (bufLike)=>{
|
|
2655
|
+
if (Buffer.isBuffer(bufLike)) return bufLike;
|
|
2656
|
+
if ("string" == typeof bufLike) return Buffer.from(bufLike);
|
|
2657
|
+
if (bufLike instanceof Uint8Array) return Buffer.from(bufLike.buffer);
|
|
2658
|
+
throw Error("Buffer, Uint8Array or string expected");
|
|
2659
|
+
}, toObject = (input)=>{
|
|
2660
|
+
let s;
|
|
2661
|
+
if (Buffer.isBuffer(input)) s = input.toString("utf8");
|
|
2662
|
+
else if (input && "object" == typeof input) return input;
|
|
2663
|
+
else if ("string" == typeof input) s = input;
|
|
2664
|
+
else throw Error("Buffer or string or object expected");
|
|
2665
|
+
return JSON.parse(s);
|
|
2666
|
+
};
|
|
2667
|
+
function serializeObject(map) {
|
|
2668
|
+
if (!isNil(map)) return "string" == typeof map ? map ? toBuffer(map) : void 0 : toBuffer(JSON.stringify(map));
|
|
2669
|
+
}
|
|
2670
|
+
function stringifyLoaderObject(o) {
|
|
2671
|
+
return o.path + o.query + o.fragment;
|
|
2672
|
+
}
|
|
2673
|
+
let unsupported = (name, issue)=>{
|
|
2674
|
+
let s = `${name} is not supported by rspack.`;
|
|
2675
|
+
throw issue && (s += ` Please refer to issue ${issue} for more information.`), Error(s);
|
|
2676
|
+
}, WINDOWS_ABS_PATH_REGEXP = /^[a-zA-Z]:[\\/]/, SEGMENTS_SPLIT_REGEXP = /([|!])/, WINDOWS_PATH_SEPARATOR_REGEXP = /\\/g, relativePathToRequest = (relativePath)=>"" === relativePath ? "./." : ".." === relativePath ? "../." : relativePath.startsWith("../") ? relativePath : `./${relativePath}`, absoluteToRequest = (context, maybeAbsolutePath)=>{
|
|
2846
2677
|
if ("/" === maybeAbsolutePath[0]) {
|
|
2847
2678
|
if (maybeAbsolutePath.length > 1 && "/" === maybeAbsolutePath[maybeAbsolutePath.length - 1]) return maybeAbsolutePath;
|
|
2848
2679
|
let querySplitPos = maybeAbsolutePath.indexOf("?"), resource = -1 === querySplitPos ? maybeAbsolutePath : maybeAbsolutePath.slice(0, querySplitPos);
|
|
@@ -3148,6 +2979,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
3148
2979
|
}
|
|
3149
2980
|
}
|
|
3150
2981
|
class JavaScriptTracer {
|
|
2982
|
+
static state = "uninitialized";
|
|
3151
2983
|
static startTime;
|
|
3152
2984
|
static events;
|
|
3153
2985
|
static layer;
|
|
@@ -3155,8 +2987,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
3155
2987
|
static session;
|
|
3156
2988
|
static counter = 10000;
|
|
3157
2989
|
static async initJavaScriptTrace(layer, output) {
|
|
3158
|
-
let { Session } =
|
|
3159
|
-
this.session = new Session(), this.layer = layer, this.output = output, this.events = [], this.startTime = process.hrtime.bigint();
|
|
2990
|
+
let { Session } = __webpack_require__("node:inspector");
|
|
2991
|
+
this.session = new Session(), this.layer = layer, this.output = output, this.events = [], this.state = "on", this.startTime = process.hrtime.bigint();
|
|
3160
2992
|
}
|
|
3161
2993
|
static uuid() {
|
|
3162
2994
|
return this.counter++;
|
|
@@ -3165,7 +2997,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
3165
2997
|
this.layer && (this.session.connect(), this.session.post("Profiler.enable"), this.session.post("Profiler.start"));
|
|
3166
2998
|
}
|
|
3167
2999
|
static async cleanupJavaScriptTrace() {
|
|
3168
|
-
if (
|
|
3000
|
+
if ("uninitialized" === this.state) throw Error("JavaScriptTracer is not initialized, please call initJavaScriptTrace first");
|
|
3001
|
+
if (!this.layer || "off" === this.state) return;
|
|
3169
3002
|
let profileHandler = (err, param)=>{
|
|
3170
3003
|
let cpu_profile;
|
|
3171
3004
|
if (err ? console.error("Error stopping profiler:", err) : cpu_profile = param.profile, cpu_profile) {
|
|
@@ -3204,7 +3037,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
3204
3037
|
});
|
|
3205
3038
|
}
|
|
3206
3039
|
};
|
|
3207
|
-
|
|
3040
|
+
await new Promise((resolve, reject)=>{
|
|
3208
3041
|
this.session.post("Profiler.stop", (err, params)=>{
|
|
3209
3042
|
if (err) reject(err);
|
|
3210
3043
|
else try {
|
|
@@ -3213,7 +3046,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
3213
3046
|
reject(err);
|
|
3214
3047
|
}
|
|
3215
3048
|
});
|
|
3216
|
-
});
|
|
3049
|
+
}), this.state = "off";
|
|
3217
3050
|
}
|
|
3218
3051
|
static getTs() {
|
|
3219
3052
|
return process.hrtime.bigint() - this.startTime;
|
|
@@ -3246,6 +3079,20 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
3246
3079
|
});
|
|
3247
3080
|
}
|
|
3248
3081
|
}
|
|
3082
|
+
class ModuleError extends WebpackError {
|
|
3083
|
+
error;
|
|
3084
|
+
constructor(err, { from } = {}){
|
|
3085
|
+
let message = "Module Error";
|
|
3086
|
+
from ? message += ` (from ${from}):\n` : message += ": ", err && "object" == typeof err && err.message ? message += err.message : err && (message += err), super(message), this.name = "ModuleError", this.error = err, this.details = err && "object" == typeof err && err.stack ? cleanUp(err.stack, err.name, err.message) : void 0;
|
|
3087
|
+
}
|
|
3088
|
+
}
|
|
3089
|
+
class ModuleWarning extends WebpackError {
|
|
3090
|
+
error;
|
|
3091
|
+
constructor(err, { from } = {}){
|
|
3092
|
+
let message = "Module Warning";
|
|
3093
|
+
from ? message += ` (from ${from}):\n` : message += ": ", err && "object" == typeof err && err.message ? message += err.message : err && (message += err), super(message), this.name = "ModuleWarning", this.error = err, this.details = err && "object" == typeof err && err.stack ? cleanUp(err.stack, err.name, err.message) : void 0;
|
|
3094
|
+
}
|
|
3095
|
+
}
|
|
3249
3096
|
let external_node_worker_threads_namespaceObject = require("node:worker_threads"), ensureLoaderWorkerPool = async ()=>service_pool || (service_pool = Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "tinypool")).then(({ Tinypool })=>{
|
|
3250
3097
|
let availableThreads = Math.max(__webpack_require__("node:os").cpus().length - 1, 1);
|
|
3251
3098
|
return new Tinypool({
|
|
@@ -3614,15 +3461,21 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
3614
3461
|
name,
|
|
3615
3462
|
resource
|
|
3616
3463
|
].filter(Boolean).join("|"));
|
|
3617
|
-
}, loaderContext.rootContext = compiler.context, loaderContext.emitError = function(
|
|
3618
|
-
|
|
3619
|
-
|
|
3464
|
+
}, loaderContext.rootContext = compiler.context, loaderContext.emitError = function(e) {
|
|
3465
|
+
e instanceof Error || (e = new NonErrorEmittedError(e));
|
|
3466
|
+
let error = new ModuleError(e, {
|
|
3467
|
+
from: stringifyLoaderObject(loaderContext.loaders[loaderContext.loaderIndex])
|
|
3468
|
+
});
|
|
3469
|
+
error.module = loaderContext._module, compiler._lastCompilation.__internal__pushRspackDiagnostic({
|
|
3620
3470
|
error,
|
|
3621
3471
|
severity: binding_.JsRspackSeverity.Error
|
|
3622
3472
|
});
|
|
3623
|
-
}, loaderContext.emitWarning = function(
|
|
3624
|
-
|
|
3625
|
-
|
|
3473
|
+
}, loaderContext.emitWarning = function(e) {
|
|
3474
|
+
e instanceof Error || (e = new NonErrorEmittedError(e));
|
|
3475
|
+
let warning = new ModuleWarning(e, {
|
|
3476
|
+
from: stringifyLoaderObject(loaderContext.loaders[loaderContext.loaderIndex])
|
|
3477
|
+
});
|
|
3478
|
+
warning.module = loaderContext._module, compiler._lastCompilation.__internal__pushRspackDiagnostic({
|
|
3626
3479
|
error: warning,
|
|
3627
3480
|
severity: binding_.JsRspackSeverity.Warn
|
|
3628
3481
|
});
|
|
@@ -3930,15 +3783,10 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
3930
3783
|
}
|
|
3931
3784
|
context.loaderItems = loaderContext.loaders.map((item)=>LoaderObject.__to_binding(item));
|
|
3932
3785
|
} catch (e) {
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
}
|
|
3937
|
-
name: "ModuleBuildError",
|
|
3938
|
-
message: e.message,
|
|
3939
|
-
stack: "string" == typeof e.stack ? e.stack : void 0,
|
|
3940
|
-
hideStack: "hideStack" in e ? !0 === e.hideStack || "true" === e.hideStack : void 0
|
|
3941
|
-
};
|
|
3786
|
+
if ("object" != typeof e || null === e) {
|
|
3787
|
+
let error = Error(`(Emitted value instead of an instance of Error) ${e}`);
|
|
3788
|
+
error.name = "NonErrorEmittedError", context.__internal__error = error;
|
|
3789
|
+
} else context.__internal__error = e;
|
|
3942
3790
|
}
|
|
3943
3791
|
return JavaScriptTracer.endAsync({
|
|
3944
3792
|
name: "run_js_loaders",
|
|
@@ -4509,7 +4357,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
4509
4357
|
value: name
|
|
4510
4358
|
}), Plugin;
|
|
4511
4359
|
}
|
|
4512
|
-
let APIPlugin = base_create(binding_.BuiltinPluginName.APIPlugin, ()=>{}), ArrayPushCallbackChunkFormatPlugin = base_create(binding_.BuiltinPluginName.ArrayPushCallbackChunkFormatPlugin, ()=>{}), AssetModulesPlugin = base_create(binding_.BuiltinPluginName.AssetModulesPlugin, ()=>{}, "compilation"), AsyncWebAssemblyModulesPlugin = base_create(binding_.BuiltinPluginName.AsyncWebAssemblyModulesPlugin, ()=>{}, "compilation"), BannerPlugin = base_create(binding_.BuiltinPluginName.BannerPlugin, (args)=>"string" == typeof args || "function" == typeof args ? {
|
|
4360
|
+
let INTERNAL_PLUGIN_NAMES = Object.keys(binding_.BuiltinPluginName), APIPlugin = base_create(binding_.BuiltinPluginName.APIPlugin, ()=>{}), ArrayPushCallbackChunkFormatPlugin = base_create(binding_.BuiltinPluginName.ArrayPushCallbackChunkFormatPlugin, ()=>{}), AssetModulesPlugin = base_create(binding_.BuiltinPluginName.AssetModulesPlugin, ()=>{}, "compilation"), AsyncWebAssemblyModulesPlugin = base_create(binding_.BuiltinPluginName.AsyncWebAssemblyModulesPlugin, ()=>{}, "compilation"), BannerPlugin = base_create(binding_.BuiltinPluginName.BannerPlugin, (args)=>"string" == typeof args || "function" == typeof args ? {
|
|
4513
4361
|
banner: args
|
|
4514
4362
|
} : {
|
|
4515
4363
|
banner: args.banner,
|
|
@@ -8038,27 +7886,29 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
8038
7886
|
let lazyCompilationPrefix = prefix || LAZY_COMPILATION_PREFIX;
|
|
8039
7887
|
return serverUrl ? serverUrl + (serverUrl.endsWith("/") ? lazyCompilationPrefix.slice(1) : lazyCompilationPrefix) : lazyCompilationPrefix;
|
|
8040
7888
|
};
|
|
8041
|
-
function applyPlugin(compiler, options, activeModules, filesByKey) {
|
|
7889
|
+
function applyPlugin(compiler, moduleToIndex, indexToModule, options, activeModules, filesByKey) {
|
|
8042
7890
|
new BuiltinLazyCompilationPlugin(({ module, path })=>{
|
|
8043
|
-
let
|
|
7891
|
+
let index = moduleToIndex.get(module);
|
|
7892
|
+
void 0 === index && (index = moduleToIndex.size.toString(), moduleToIndex.set(module, index), indexToModule.set(index, module));
|
|
7893
|
+
let key = indexToModule.get(index);
|
|
8044
7894
|
filesByKey.set(key, path);
|
|
8045
7895
|
let active = !0 === activeModules.get(key);
|
|
8046
7896
|
return {
|
|
8047
7897
|
client: `${options.client || getDefaultClient(compiler)}?${encodeURIComponent(getFullServerUrl(options))}`,
|
|
8048
|
-
data:
|
|
7898
|
+
data: index,
|
|
8049
7899
|
active
|
|
8050
7900
|
};
|
|
8051
7901
|
}, options.cacheable ?? !0, options.entries ?? !0, options.imports ?? !0, options.test).apply(compiler);
|
|
8052
7902
|
}
|
|
8053
|
-
let lazyCompilationMiddlewareInternal = (compiler, activeModules, filesByKey, lazyCompilationPrefix)=>{
|
|
7903
|
+
let lazyCompilationMiddlewareInternal = (compiler, indexToModule, activeModules, filesByKey, lazyCompilationPrefix)=>{
|
|
8054
7904
|
let logger = compiler.getInfrastructureLogger("LazyCompilation");
|
|
8055
7905
|
return (req, res, next)=>{
|
|
8056
7906
|
if (!req.url?.startsWith(lazyCompilationPrefix)) return next?.();
|
|
8057
|
-
let
|
|
7907
|
+
let indices = req.url.slice(lazyCompilationPrefix.length).split("@");
|
|
8058
7908
|
req.socket.setNoDelay(!0), res.setHeader("content-type", "text/event-stream"), res.writeHead(200), res.write("\n");
|
|
8059
7909
|
let moduleActivated = [];
|
|
8060
|
-
for (let
|
|
8061
|
-
let oldValue = activeModules.get(key) ?? !1;
|
|
7910
|
+
for (let index of indices){
|
|
7911
|
+
let key = indexToModule.get(index), oldValue = activeModules.get(key) ?? !1;
|
|
8062
7912
|
activeModules.set(key, !0), oldValue || (logger.log(`${key} is now in use and will be compiled.`), moduleActivated.push(key));
|
|
8063
7913
|
}
|
|
8064
7914
|
if (moduleActivated.length && compiler.watching) {
|
|
@@ -8139,21 +7989,21 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
8139
7989
|
return RuntimePlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).createScript;
|
|
8140
7990
|
}, function(queried) {
|
|
8141
7991
|
return function(data) {
|
|
8142
|
-
return queried.call(data.code,
|
|
7992
|
+
return queried.call(data.code, data.chunk);
|
|
8143
7993
|
};
|
|
8144
7994
|
}),
|
|
8145
7995
|
registerRuntimePluginLinkPreloadTaps: createTap(binding_.RegisterJsTapKind.RuntimePluginLinkPreload, function() {
|
|
8146
7996
|
return RuntimePlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).linkPreload;
|
|
8147
7997
|
}, function(queried) {
|
|
8148
7998
|
return function(data) {
|
|
8149
|
-
return queried.call(data.code,
|
|
7999
|
+
return queried.call(data.code, data.chunk);
|
|
8150
8000
|
};
|
|
8151
8001
|
}),
|
|
8152
8002
|
registerRuntimePluginLinkPrefetchTaps: createTap(binding_.RegisterJsTapKind.RuntimePluginLinkPrefetch, function() {
|
|
8153
8003
|
return RuntimePlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).linkPrefetch;
|
|
8154
8004
|
}, function(queried) {
|
|
8155
8005
|
return function(data) {
|
|
8156
|
-
return queried.call(data.code,
|
|
8006
|
+
return queried.call(data.code, data.chunk);
|
|
8157
8007
|
};
|
|
8158
8008
|
})
|
|
8159
8009
|
}), SideEffectsFlagPlugin = base_create(binding_.BuiltinPluginName.SideEffectsFlagPlugin, ()=>{}, "compilation"), SizeLimitsPlugin = base_create(binding_.BuiltinPluginName.SizeLimitsPlugin, (options)=>{
|
|
@@ -8184,7 +8034,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
8184
8034
|
return "function" == typeof name ? (ctx)=>void 0 === ctx.module ? name(void 0) : name(ctx.module, getChunks(ctx.chunks), ctx.cacheGroupKey) : name;
|
|
8185
8035
|
}
|
|
8186
8036
|
function getChunks(chunks) {
|
|
8187
|
-
return "function" == typeof chunks ? (chunk)=>chunks(
|
|
8037
|
+
return "function" == typeof chunks ? (chunk)=>chunks(chunk) : chunks;
|
|
8188
8038
|
}
|
|
8189
8039
|
let { name, chunks, defaultSizeTypes, cacheGroups = {}, fallbackCacheGroup, minSize, minSizeReduction, maxSize, maxAsyncSize, maxInitialSize, ...passThrough } = sc;
|
|
8190
8040
|
return {
|
|
@@ -8506,12 +8356,13 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
8506
8356
|
var hashFuncNames, source;
|
|
8507
8357
|
if (tag.attributes && "integrity" in tag.attributes) return;
|
|
8508
8358
|
let tagSrc = function(tag) {
|
|
8509
|
-
if (
|
|
8510
|
-
"script"
|
|
8511
|
-
"link"
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
|
|
8359
|
+
if (tag.attributes) {
|
|
8360
|
+
if ("script" === tag.tagName && "string" == typeof tag.attributes.src) return tag.attributes.src;
|
|
8361
|
+
if ("link" === tag.tagName && "string" == typeof tag.attributes.href) {
|
|
8362
|
+
let rel = tag.attributes.rel;
|
|
8363
|
+
if ("string" != typeof rel) return;
|
|
8364
|
+
return "stylesheet" === rel || "modulepreload" === rel || "preload" === rel && ("script" === tag.attributes.as || "style" === tag.attributes.as) ? tag.attributes.href : void 0;
|
|
8365
|
+
}
|
|
8515
8366
|
}
|
|
8516
8367
|
}(tag);
|
|
8517
8368
|
if (!tagSrc) return;
|
|
@@ -9172,6 +9023,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
9172
9023
|
See https://github.com/browserslist/browserslist#queries for possible ways to provide a config.
|
|
9173
9024
|
The recommended way is to add a 'browserslist' key to your package.json and list supported browsers (resp. node.js versions).
|
|
9174
9025
|
You can also more options via the 'target' option: 'browserslist' / 'browserslist:env' / 'browserslist:query' / 'browserslist:path-to-config' / 'browserslist:path-to-config:env'`);
|
|
9026
|
+
if (Array.isArray(browsers) && 0 === browsers.length) throw Error("Rspack cannot parse the browserslist query. This may happen when the query contains version requirements that exceed the supported range in the browserslist-rs database. Check your browserslist configuration for invalid version numbers.");
|
|
9175
9027
|
return getBrowserslistTargetHandler().resolve(browsers);
|
|
9176
9028
|
}
|
|
9177
9029
|
],
|
|
@@ -9390,9 +9242,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
9390
9242
|
css: options.experiments.css,
|
|
9391
9243
|
targetProperties,
|
|
9392
9244
|
mode: options.mode,
|
|
9393
|
-
uniqueName: options.output.uniqueName
|
|
9394
|
-
inlineConst: options.experiments.inlineConst,
|
|
9395
|
-
typeReexportsPresence: options.experiments.typeReexportsPresence
|
|
9245
|
+
uniqueName: options.output.uniqueName
|
|
9396
9246
|
}), applyOutputDefaults(options.output, {
|
|
9397
9247
|
context: options.context,
|
|
9398
9248
|
targetProperties,
|
|
@@ -9429,17 +9279,17 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
9429
9279
|
let tty = infrastructureLogging.stream.isTTY && "dumb" !== process.env.TERM;
|
|
9430
9280
|
D(infrastructureLogging, "level", "info"), D(infrastructureLogging, "debug", !1), D(infrastructureLogging, "colors", tty), D(infrastructureLogging, "appendOnly", !tty);
|
|
9431
9281
|
}, applyExperimentsDefaults = (experiments, { production, development })=>{
|
|
9432
|
-
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, "
|
|
9282
|
+
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);
|
|
9433
9283
|
}, applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
9434
|
-
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.4.
|
|
9435
|
-
}, applySnapshotDefaults = (_snapshot, _env)=>{}, applyJavascriptParserOptionsDefaults = (parserOptions
|
|
9284
|
+
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.4.3"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
|
|
9285
|
+
}, applySnapshotDefaults = (_snapshot, _env)=>{}, applyJavascriptParserOptionsDefaults = (parserOptions)=>{
|
|
9436
9286
|
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", [
|
|
9437
9287
|
"..."
|
|
9438
|
-
]), D(parserOptions, "importMeta", !0), D(parserOptions, "inlineConst",
|
|
9288
|
+
]), D(parserOptions, "importMeta", !0), D(parserOptions, "inlineConst", !1), D(parserOptions, "typeReexportsPresence", "no-tolerant");
|
|
9439
9289
|
}, applyJsonGeneratorOptionsDefaults = (generatorOptions)=>{
|
|
9440
9290
|
D(generatorOptions, "JSONParse", !0);
|
|
9441
|
-
}, applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties, mode, uniqueName
|
|
9442
|
-
if (assertNotNill(module.parser), assertNotNill(module.generator), defaults_F(module.parser, "asset", ()=>({})), assertNotNill(module.parser.asset), defaults_F(module.parser.asset, "dataUrlCondition", ()=>({})), "object" == typeof module.parser.asset.dataUrlCondition && D(module.parser.asset.dataUrlCondition, "maxSize", 8096), defaults_F(module.parser, "javascript", ()=>({})), assertNotNill(module.parser.javascript), applyJavascriptParserOptionsDefaults(module.parser.javascript
|
|
9291
|
+
}, applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties, mode, uniqueName })=>{
|
|
9292
|
+
if (assertNotNill(module.parser), assertNotNill(module.generator), defaults_F(module.parser, "asset", ()=>({})), assertNotNill(module.parser.asset), defaults_F(module.parser.asset, "dataUrlCondition", ()=>({})), "object" == typeof module.parser.asset.dataUrlCondition && D(module.parser.asset.dataUrlCondition, "maxSize", 8096), defaults_F(module.parser, "javascript", ()=>({})), assertNotNill(module.parser.javascript), applyJavascriptParserOptionsDefaults(module.parser.javascript), defaults_F(module.parser, JSON_MODULE_TYPE, ()=>({})), assertNotNill(module.parser[JSON_MODULE_TYPE]), D(module.parser[JSON_MODULE_TYPE], "exportsDepth", "development" === mode ? 1 : Number.MAX_SAFE_INTEGER), defaults_F(module.generator, "json", ()=>({})), assertNotNill(module.generator.json), applyJsonGeneratorOptionsDefaults(module.generator.json), css) {
|
|
9443
9293
|
defaults_F(module.parser, "css", ()=>({})), assertNotNill(module.parser.css), D(module.parser.css, "namedExports", !0), D(module.parser.css, "url", !0), defaults_F(module.parser, "css/auto", ()=>({})), assertNotNill(module.parser["css/auto"]), D(module.parser["css/auto"], "namedExports", !0), D(module.parser["css/auto"], "url", !0), defaults_F(module.parser, "css/module", ()=>({})), assertNotNill(module.parser["css/module"]), D(module.parser["css/module"], "namedExports", !0), D(module.parser["css/module"], "url", !0), defaults_F(module.generator, "css", ()=>({})), assertNotNill(module.generator.css), D(module.generator.css, "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator.css, "esModule", !0), defaults_F(module.generator, "css/auto", ()=>({})), assertNotNill(module.generator["css/auto"]), D(module.generator["css/auto"], "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator["css/auto"], "exportsConvention", "as-is");
|
|
9444
9294
|
let localIdentName = uniqueName && uniqueName.length > 0 ? "[uniqueName]-[id]-[local]" : "[id]-[local]";
|
|
9445
9295
|
D(module.generator["css/auto"], "localIdentName", localIdentName), D(module.generator["css/auto"], "esModule", !0), defaults_F(module.generator, "css/module", ()=>({})), assertNotNill(module.generator["css/module"]), D(module.generator["css/module"], "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator["css/module"], "exportsConvention", "as-is"), D(module.generator["css/module"], "localIdentName", localIdentName), D(module.generator["css/module"], "esModule", !0);
|
|
@@ -9595,7 +9445,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
9595
9445
|
return "function" != typeof chunkFilename ? chunkFilename.replace(/\.[mc]?js(\?|$)/, ".css$1") : "[id].css";
|
|
9596
9446
|
}), D(output, "hotUpdateChunkFilename", `[id].[fullhash].hot-update.${output.module ? "mjs" : "js"}`), D(output, "hotUpdateMainFilename", "[runtime].[fullhash].hot-update.json");
|
|
9597
9447
|
let uniqueNameId = Template.toIdentifier(output.uniqueName);
|
|
9598
|
-
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", ()=>{
|
|
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, "crossOriginLoading", !1), defaults_F(output, "scriptType", ()=>!!output.module && "module"), D(output, "publicPath", tp && (tp.document || tp.importScripts) || "module" === output.scriptType ? "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", ()=>{
|
|
9599
9449
|
if (tp) {
|
|
9600
9450
|
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.";
|
|
9601
9451
|
if (output.module) {
|
|
@@ -9655,7 +9505,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
9655
9505
|
if (tp.globalThis) return "globalThis";
|
|
9656
9506
|
}
|
|
9657
9507
|
return "self";
|
|
9658
|
-
}), D(output, "importFunctionName", "import"), D(output, "importMetaName", "import.meta"), defaults_F(output, "clean", ()=>!!output.clean), D(output, "
|
|
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);
|
|
9659
9509
|
let { trustedTypes } = output;
|
|
9660
9510
|
trustedTypes && (defaults_F(trustedTypes, "policyName", ()=>output.uniqueName.replace(/[^a-zA-Z0-9\-#=_/@.%]+/g, "_") || "webpack"), D(trustedTypes, "onPolicyCreationFailure", "stop"));
|
|
9661
9511
|
let forEachEntry = (fn)=>{
|
|
@@ -9854,7 +9704,13 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
9854
9704
|
}, getPnpDefault = ()=>!!process.versions.pnp, getNormalizedRspackOptions = (config)=>{
|
|
9855
9705
|
let fn;
|
|
9856
9706
|
return {
|
|
9857
|
-
ignoreWarnings:
|
|
9707
|
+
ignoreWarnings: config.ignoreWarnings ? config.ignoreWarnings.map((ignore)=>{
|
|
9708
|
+
if ("function" == typeof ignore) return ignore;
|
|
9709
|
+
let i = ignore instanceof RegExp ? {
|
|
9710
|
+
message: ignore
|
|
9711
|
+
} : ignore;
|
|
9712
|
+
return (warning)=>(!!i.message || !!i.module || !!i.file) && (!i.message || !!i.message.test(warning.message)) && (!i.module || !!warning.module && !!i.module.test(warning.module.readableIdentifier())) && (!i.file || !!warning.file && !!i.file.test(warning.file));
|
|
9713
|
+
}) : void 0,
|
|
9858
9714
|
name: config.name,
|
|
9859
9715
|
dependencies: config.dependencies,
|
|
9860
9716
|
context: config.context,
|
|
@@ -10331,7 +10187,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
10331
10187
|
},
|
|
10332
10188
|
arm: "gnueabihf"
|
|
10333
10189
|
}
|
|
10334
|
-
}, BINDING_VERSION = __webpack_require__("@rspack/binding/package.json").version, CORE_VERSION = "1.4.
|
|
10190
|
+
}, BINDING_VERSION = __webpack_require__("@rspack/binding/package.json").version, CORE_VERSION = "1.4.3", getAddonPlatformArchAbi = ()=>{
|
|
10335
10191
|
let { platform, arch } = process, binding = "";
|
|
10336
10192
|
binding += platform;
|
|
10337
10193
|
let abi = NodePlatformArchToAbi[platform][arch];
|
|
@@ -10562,7 +10418,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
10562
10418
|
}, function(queried) {
|
|
10563
10419
|
return function({ chunk, runtimeRequirements }) {
|
|
10564
10420
|
let set = __from_binding_runtime_globals(runtimeRequirements);
|
|
10565
|
-
return queried.call(
|
|
10421
|
+
return queried.call(chunk, set), {
|
|
10566
10422
|
runtimeRequirements: __to_binding_runtime_globals(set)
|
|
10567
10423
|
};
|
|
10568
10424
|
};
|
|
@@ -10570,8 +10426,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
10570
10426
|
registerCompilationRuntimeRequirementInTreeTaps: createMapTap(binding_.RegisterJsTapKind.CompilationRuntimeRequirementInTree, function() {
|
|
10571
10427
|
return getCompiler().__internal__get_compilation().hooks.runtimeRequirementInTree;
|
|
10572
10428
|
}, function(queried) {
|
|
10573
|
-
return function({ chunk
|
|
10574
|
-
let set = __from_binding_runtime_globals(runtimeRequirements), all = __from_binding_runtime_globals(allRuntimeRequirements),
|
|
10429
|
+
return function({ chunk, allRuntimeRequirements, runtimeRequirements }) {
|
|
10430
|
+
let set = __from_binding_runtime_globals(runtimeRequirements), all = __from_binding_runtime_globals(allRuntimeRequirements), customRuntimeGlobals = new Set(), originalAdd = all.add.bind(all), add = function(r) {
|
|
10575
10431
|
return all.has(r) ? all : (isReservedRuntimeGlobal(r) || customRuntimeGlobals.add(r), originalAdd(r));
|
|
10576
10432
|
};
|
|
10577
10433
|
for (let r of (all.add = add.bind(add), set))queried.for(r).call(chunk, all);
|
|
@@ -10586,7 +10442,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
10586
10442
|
}, function(queried) {
|
|
10587
10443
|
return function({ module, chunk }) {
|
|
10588
10444
|
let originSource = module.source?.source;
|
|
10589
|
-
queried.call(module,
|
|
10445
|
+
queried.call(module, chunk);
|
|
10590
10446
|
let newSource = module.source?.source;
|
|
10591
10447
|
if (newSource && newSource !== originSource) return module;
|
|
10592
10448
|
};
|
|
@@ -10617,7 +10473,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
10617
10473
|
}, function(queried) {
|
|
10618
10474
|
return function({ entry, id, codegenResults, runtimeModules }) {
|
|
10619
10475
|
try {
|
|
10620
|
-
let
|
|
10476
|
+
let __nested_webpack_require_4786_4805__ = (id)=>{
|
|
10621
10477
|
let cached = moduleCache[id];
|
|
10622
10478
|
if (void 0 !== cached) {
|
|
10623
10479
|
if (cached.error) throw cached.error;
|
|
@@ -10631,7 +10487,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
10631
10487
|
loaded: !1,
|
|
10632
10488
|
error: void 0
|
|
10633
10489
|
},
|
|
10634
|
-
require:
|
|
10490
|
+
require: __nested_webpack_require_4786_4805__
|
|
10635
10491
|
};
|
|
10636
10492
|
for (let handler of interceptModuleExecution)handler(execOptions);
|
|
10637
10493
|
let result = codegenResults.map[id]["build time"], moduleObject = execOptions.module;
|
|
@@ -10639,11 +10495,11 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
10639
10495
|
codeGenerationResult: new CodeGenerationResult(result),
|
|
10640
10496
|
moduleObject
|
|
10641
10497
|
}, {
|
|
10642
|
-
__webpack_require__:
|
|
10498
|
+
__webpack_require__: __nested_webpack_require_4786_4805__
|
|
10643
10499
|
}), "Compilation.hooks.executeModule"), moduleObject.loaded = !0, moduleObject.exports;
|
|
10644
|
-
}, moduleCache =
|
|
10645
|
-
for (let runtimeModule of runtimeModules)
|
|
10646
|
-
let executeResult =
|
|
10500
|
+
}, moduleCache = __nested_webpack_require_4786_4805__[RuntimeGlobals.moduleCache.replace(`${RuntimeGlobals.require}.`, "")] = {}, interceptModuleExecution = __nested_webpack_require_4786_4805__[RuntimeGlobals.interceptModuleExecution.replace(`${RuntimeGlobals.require}.`, "")] = [];
|
|
10501
|
+
for (let runtimeModule of runtimeModules)__nested_webpack_require_4786_4805__(runtimeModule);
|
|
10502
|
+
let executeResult = __nested_webpack_require_4786_4805__(entry);
|
|
10647
10503
|
getCompiler().__internal__get_module_execution_results_map().set(id, executeResult);
|
|
10648
10504
|
} catch (e) {
|
|
10649
10505
|
throw getCompiler().__internal__get_module_execution_results_map().set(id, e), e;
|
|
@@ -10692,14 +10548,14 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
10692
10548
|
let digestResult;
|
|
10693
10549
|
if (!getCompiler().options.output.hashFunction) throw Error("'output.hashFunction' cannot be undefined");
|
|
10694
10550
|
let hash = createHash(getCompiler().options.output.hashFunction);
|
|
10695
|
-
return queried.call(
|
|
10551
|
+
return queried.call(chunk, hash), "string" == typeof (digestResult = getCompiler().options.output.hashDigest ? hash.digest(getCompiler().options.output.hashDigest) : hash.digest()) ? Buffer.from(digestResult) : digestResult;
|
|
10696
10552
|
};
|
|
10697
10553
|
}),
|
|
10698
10554
|
registerCompilationChunkAssetTaps: createTap(binding_.RegisterJsTapKind.CompilationChunkAsset, function() {
|
|
10699
10555
|
return getCompiler().__internal__get_compilation().hooks.chunkAsset;
|
|
10700
10556
|
}, function(queried) {
|
|
10701
10557
|
return function({ chunk, filename }) {
|
|
10702
|
-
return queried.call(
|
|
10558
|
+
return queried.call(chunk, filename);
|
|
10703
10559
|
};
|
|
10704
10560
|
}),
|
|
10705
10561
|
registerCompilationProcessAssetsTaps: createTap(binding_.RegisterJsTapKind.CompilationProcessAssets, function() {
|
|
@@ -10936,7 +10792,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
10936
10792
|
let digestResult;
|
|
10937
10793
|
if (!getCompiler().options.output.hashFunction) throw Error("'output.hashFunction' cannot be undefined");
|
|
10938
10794
|
let hash = createHash(getCompiler().options.output.hashFunction);
|
|
10939
|
-
return queried.call(
|
|
10795
|
+
return queried.call(chunk, hash), "string" == typeof (digestResult = getCompiler().options.output.hashDigest ? hash.digest(getCompiler().options.output.hashDigest) : hash.digest()) ? Buffer.from(digestResult) : digestResult;
|
|
10940
10796
|
};
|
|
10941
10797
|
})
|
|
10942
10798
|
}), createNormalModuleFactoryHooksRegisters = (getCompiler, createTap, createMapTap)=>({
|
|
@@ -11630,7 +11486,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
11630
11486
|
obj.children = this.stats.map((stat, idx)=>{
|
|
11631
11487
|
let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
|
|
11632
11488
|
return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
|
|
11633
|
-
}), childOptions.version && (obj.rspackVersion = "1.4.
|
|
11489
|
+
}), childOptions.version && (obj.rspackVersion = "1.4.3", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
|
|
11634
11490
|
let mapError = (j, obj)=>({
|
|
11635
11491
|
...obj,
|
|
11636
11492
|
compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
|
|
@@ -12533,7 +12389,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
12533
12389
|
object.hash = context.getStatsCompilation(compilation).hash;
|
|
12534
12390
|
},
|
|
12535
12391
|
version: (object)=>{
|
|
12536
|
-
object.version = "5.75.0", object.rspackVersion = "1.4.
|
|
12392
|
+
object.version = "5.75.0", object.rspackVersion = "1.4.3";
|
|
12537
12393
|
},
|
|
12538
12394
|
env: (object, _compilation, _context, { _env })=>{
|
|
12539
12395
|
object.env = _env;
|
|
@@ -15563,14 +15419,19 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
15563
15419
|
parallelLoader: schemas_boolean(),
|
|
15564
15420
|
useInputFileSystem: useInputFileSystem,
|
|
15565
15421
|
inlineConst: schemas_boolean(),
|
|
15566
|
-
|
|
15422
|
+
inlineEnum: schemas_boolean(),
|
|
15423
|
+
typeReexportsPresence: schemas_boolean()
|
|
15567
15424
|
}).partial(), watch = schemas_boolean(), watchOptions = strictObject({
|
|
15568
15425
|
aggregateTimeout: numberOrInfinity,
|
|
15569
15426
|
followSymlinks: schemas_boolean(),
|
|
15570
15427
|
ignored: schemas_string().array().or(_instanceof(RegExp)).or(schemas_string()),
|
|
15571
15428
|
poll: numberOrInfinity.or(schemas_boolean()),
|
|
15572
15429
|
stdin: schemas_boolean()
|
|
15573
|
-
}).partial(), devServer = custom(), ignoreWarnings = _instanceof(RegExp).or(anyFunction).
|
|
15430
|
+
}).partial(), devServer = custom(), ignoreWarnings = _instanceof(RegExp).or(anyFunction).or(schemas_object({
|
|
15431
|
+
file: _instanceof(RegExp).optional(),
|
|
15432
|
+
message: _instanceof(RegExp).optional(),
|
|
15433
|
+
module: _instanceof(RegExp).optional()
|
|
15434
|
+
})).array(), profile = schemas_boolean(), amd = literal(!1).or(record(schemas_string(), any())), bail = schemas_boolean(), performance = strictObject({
|
|
15574
15435
|
assetFilter: anyFunction,
|
|
15575
15436
|
hints: schemas_enum([
|
|
15576
15437
|
"error",
|
|
@@ -16008,7 +15869,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
16008
15869
|
let _options = JSON.stringify(options || {});
|
|
16009
15870
|
return binding_default().transform(source, _options);
|
|
16010
15871
|
}
|
|
16011
|
-
let exports_rspackVersion = "1.4.
|
|
15872
|
+
let exports_rspackVersion = "1.4.3", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
|
|
16012
15873
|
getNormalizedRspackOptions: getNormalizedRspackOptions,
|
|
16013
15874
|
applyRspackOptionsDefaults: applyRspackOptionsDefaults,
|
|
16014
15875
|
getNormalizedWebpackOptions: getNormalizedRspackOptions,
|
|
@@ -16109,8 +15970,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
16109
15970
|
...c.options.experiments.lazyCompilation
|
|
16110
15971
|
}, prefix = options.prefix || LAZY_COMPILATION_PREFIX;
|
|
16111
15972
|
options.prefix = `${prefix}__${i++}`;
|
|
16112
|
-
let activeModules = new Map(), filesByKey = new Map();
|
|
16113
|
-
middlewareByCompiler.set(options.prefix, lazyCompilationMiddlewareInternal(compiler, activeModules, filesByKey, options.prefix)), applyPlugin(c, options, activeModules, filesByKey);
|
|
15973
|
+
let activeModules = new Map(), filesByKey = new Map(), indexToModule = new Map(), moduleToIndex = new Map();
|
|
15974
|
+
middlewareByCompiler.set(options.prefix, lazyCompilationMiddlewareInternal(compiler, indexToModule, activeModules, filesByKey, options.prefix)), applyPlugin(c, moduleToIndex, indexToModule, options, activeModules, filesByKey);
|
|
16114
15975
|
}
|
|
16115
15976
|
let keys = [
|
|
16116
15977
|
...middlewareByCompiler.keys()
|
|
@@ -16123,10 +15984,10 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
16123
15984
|
};
|
|
16124
15985
|
}
|
|
16125
15986
|
if (!compiler.options.experiments.lazyCompilation) return noop;
|
|
16126
|
-
let activeModules = new Map(), filesByKey = new Map(), options = {
|
|
15987
|
+
let activeModules = new Map(), filesByKey = new Map(), indexToMap = new Map(), moduleToIndex = new Map(), options = {
|
|
16127
15988
|
...compiler.options.experiments.lazyCompilation
|
|
16128
15989
|
};
|
|
16129
|
-
return applyPlugin(compiler, options, activeModules, filesByKey), lazyCompilationMiddlewareInternal(compiler, activeModules, filesByKey, options.prefix || LAZY_COMPILATION_PREFIX);
|
|
15990
|
+
return applyPlugin(compiler, moduleToIndex, indexToMap, options, activeModules, filesByKey), lazyCompilationMiddlewareInternal(compiler, indexToMap, activeModules, filesByKey, options.prefix || LAZY_COMPILATION_PREFIX);
|
|
16130
15991
|
},
|
|
16131
15992
|
swc: {
|
|
16132
15993
|
minify: minify,
|
|
@@ -16140,7 +16001,11 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
16140
16001
|
return binding_default().transformSync(source, _options);
|
|
16141
16002
|
}
|
|
16142
16003
|
},
|
|
16143
|
-
CssChunkingPlugin: CssChunkingPlugin
|
|
16004
|
+
CssChunkingPlugin: CssChunkingPlugin,
|
|
16005
|
+
createNativePlugin: function(name, resolve, affectedHooks) {
|
|
16006
|
+
if (INTERNAL_PLUGIN_NAMES.includes(name)) throw Error(`Cannot register native plugin with name '${name}', it conflicts with internal plugin names.`);
|
|
16007
|
+
return base_create(name, resolve, affectedHooks);
|
|
16008
|
+
}
|
|
16144
16009
|
};
|
|
16145
16010
|
function createCompiler(userOptions) {
|
|
16146
16011
|
let options = getNormalizedRspackOptions(userOptions);
|