@rspack/core 2.0.2 → 2.0.4
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/http-proxy-middleware/index.d.ts +4 -4
- package/compiled/http-proxy-middleware/package.json +1 -1
- package/dist/Compilation.d.ts +1 -1
- package/dist/MultiCompiler.d.ts +1 -1
- package/dist/RuntimeGlobals.d.ts +1 -1
- package/dist/builtin-plugin/CircularModulesInfoPlugin.d.ts +7 -0
- package/dist/builtin-plugin/CssHttpExternalsRspackPlugin.d.ts +9 -0
- package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +1 -1
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +2 -2
- package/dist/builtin-plugin/HttpUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +2 -2
- package/dist/builtin-plugin/SplitChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/WorkerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/index.d.ts +2 -0
- package/dist/builtin-plugin/rsc/RscServerPlugin.d.ts +7 -0
- package/dist/builtin-plugin/rsc/index.d.ts +3 -3
- package/dist/config/target.d.ts +1 -1
- package/dist/config/types.d.ts +33 -29
- package/dist/exports.d.ts +1 -1
- package/dist/index.js +121 -96
- package/dist/lib/CacheFacade.d.ts +1 -1
- package/dist/runtime/cssExtractHmr.d.ts +2 -2
- package/dist/runtime/moduleFederationDefaultRuntime.d.ts +1 -1
- package/dist/sharing/ConsumeSharedPlugin.d.ts +2 -2
- package/dist/sharing/ProvideSharedPlugin.d.ts +4 -4
- package/dist/sharing/SharePlugin.d.ts +4 -4
- package/dist/util/comparators.d.ts +1 -1
- package/dist/util/createHash.d.ts +1 -1
- package/dist/util/identifier.d.ts +35 -8
- package/module.d.ts +6 -0
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -34,7 +34,7 @@ __webpack_require__.m = __webpack_modules__, __webpack_require__.n = (module)=>{
|
|
|
34
34
|
value: !0
|
|
35
35
|
});
|
|
36
36
|
}, __webpack_require__.add({
|
|
37
|
-
"../../node_modules/.pnpm/enhanced-resolve@5.21.
|
|
37
|
+
"../../node_modules/.pnpm/enhanced-resolve@5.21.3/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
38
38
|
let { nextTick } = __webpack_require__("process"), dirname = (path)=>{
|
|
39
39
|
let idx = path.length - 1;
|
|
40
40
|
for(; idx >= 0;){
|
|
@@ -2439,21 +2439,21 @@ let HOOKS_CAN_NOT_INHERENT_FROM_PARENT = [
|
|
|
2439
2439
|
function canInherentFromParent(affectedHooks) {
|
|
2440
2440
|
return void 0 !== affectedHooks && !HOOKS_CAN_NOT_INHERENT_FROM_PARENT.includes(affectedHooks);
|
|
2441
2441
|
}
|
|
2442
|
-
class
|
|
2442
|
+
class base_RspackBuiltinPlugin {
|
|
2443
2443
|
affectedHooks;
|
|
2444
2444
|
apply(compiler) {
|
|
2445
2445
|
let raw = this.raw(compiler);
|
|
2446
2446
|
raw && (raw.canInherentFromParent = canInherentFromParent(this.affectedHooks), compiler.__internal__registerBuiltinPlugin(raw));
|
|
2447
2447
|
}
|
|
2448
2448
|
}
|
|
2449
|
-
function
|
|
2449
|
+
function base_createBuiltinPlugin(name, options) {
|
|
2450
2450
|
return {
|
|
2451
2451
|
name: name,
|
|
2452
2452
|
options: options ?? !1
|
|
2453
2453
|
};
|
|
2454
2454
|
}
|
|
2455
2455
|
function base_create(name, resolve, affectedHooks) {
|
|
2456
|
-
class Plugin extends
|
|
2456
|
+
class Plugin extends base_RspackBuiltinPlugin {
|
|
2457
2457
|
name = name;
|
|
2458
2458
|
_args;
|
|
2459
2459
|
affectedHooks = affectedHooks;
|
|
@@ -2461,7 +2461,7 @@ function base_create(name, resolve, affectedHooks) {
|
|
|
2461
2461
|
super(), this._args = args;
|
|
2462
2462
|
}
|
|
2463
2463
|
raw(compiler) {
|
|
2464
|
-
return
|
|
2464
|
+
return base_createBuiltinPlugin(name, resolve.apply(compiler, this._args));
|
|
2465
2465
|
}
|
|
2466
2466
|
}
|
|
2467
2467
|
return Object.defineProperty(Plugin, 'name', {
|
|
@@ -2484,7 +2484,7 @@ let INTERNAL_PLUGIN_NAMES = Object.keys(binding_default().BuiltinPluginName), AP
|
|
|
2484
2484
|
bundler: options.bundler || 'rspack',
|
|
2485
2485
|
force: options.force ?? !1
|
|
2486
2486
|
})), CaseSensitivePlugin = base_create(binding_namespaceObject.BuiltinPluginName.CaseSensitivePlugin, ()=>{}, 'compilation'), ChunkPrefetchPreloadPlugin = base_create(binding_namespaceObject.BuiltinPluginName.ChunkPrefetchPreloadPlugin, ()=>{});
|
|
2487
|
-
class CircularDependencyRspackPlugin extends
|
|
2487
|
+
class CircularDependencyRspackPlugin extends base_RspackBuiltinPlugin {
|
|
2488
2488
|
name = binding_namespaceObject.BuiltinPluginName.CircularDependencyRspackPlugin;
|
|
2489
2489
|
_options;
|
|
2490
2490
|
constructor(options){
|
|
@@ -2512,7 +2512,7 @@ class CircularDependencyRspackPlugin extends RspackBuiltinPlugin {
|
|
|
2512
2512
|
this._options.onEnd(compilation);
|
|
2513
2513
|
} : void 0
|
|
2514
2514
|
};
|
|
2515
|
-
return
|
|
2515
|
+
return base_createBuiltinPlugin(this.name, rawOptions);
|
|
2516
2516
|
}
|
|
2517
2517
|
}
|
|
2518
2518
|
let CommonJsChunkFormatPlugin = base_create(binding_namespaceObject.BuiltinPluginName.CommonJsChunkFormatPlugin, ()=>{}), ContextReplacementPlugin = base_create(binding_namespaceObject.BuiltinPluginName.ContextReplacementPlugin, (resourceRegExp, newContentResource, newContentRecursive, newContentRegExp)=>{
|
|
@@ -2546,7 +2546,7 @@ let CommonJsChunkFormatPlugin = base_create(binding_namespaceObject.BuiltinPlugi
|
|
|
2546
2546
|
cssIndex && splitChunks.defaultSizeTypes.splice(cssIndex, 1);
|
|
2547
2547
|
}
|
|
2548
2548
|
return options;
|
|
2549
|
-
}), CssModulesPlugin = base_create(binding_namespaceObject.BuiltinPluginName.CssModulesPlugin, ()=>{}, 'compilation'), DEFAULT_FILENAME = '[name].css', LOADER_PATH = join(import.meta.dirname, 'cssExtractLoader.js');
|
|
2549
|
+
}), CssHttpExternalsRspackPlugin = base_create(binding_namespaceObject.BuiltinPluginName.CssHttpExternalsRspackPlugin, ()=>void 0), CssModulesPlugin = base_create(binding_namespaceObject.BuiltinPluginName.CssModulesPlugin, ()=>{}, 'compilation'), DEFAULT_FILENAME = '[name].css', LOADER_PATH = join(import.meta.dirname, 'cssExtractLoader.js');
|
|
2550
2550
|
class CssExtractRspackPlugin {
|
|
2551
2551
|
static pluginName = 'css-extract-rspack-plugin';
|
|
2552
2552
|
static loader = LOADER_PATH;
|
|
@@ -2595,26 +2595,25 @@ let DataUriPlugin = base_create(binding_namespaceObject.BuiltinPluginName.DataUr
|
|
|
2595
2595
|
])) : normalizePrimitive(define);
|
|
2596
2596
|
return normalizeObject(define);
|
|
2597
2597
|
};
|
|
2598
|
-
class DeterministicChunkIdsPlugin extends
|
|
2598
|
+
class DeterministicChunkIdsPlugin extends base_RspackBuiltinPlugin {
|
|
2599
2599
|
name = binding_namespaceObject.BuiltinPluginName.DeterministicChunkIdsPlugin;
|
|
2600
2600
|
affectedHooks = 'compilation';
|
|
2601
2601
|
raw() {
|
|
2602
|
-
return
|
|
2602
|
+
return base_createBuiltinPlugin(this.name, void 0);
|
|
2603
2603
|
}
|
|
2604
2604
|
}
|
|
2605
|
-
class DeterministicModuleIdsPlugin extends
|
|
2605
|
+
class DeterministicModuleIdsPlugin extends base_RspackBuiltinPlugin {
|
|
2606
2606
|
name = binding_namespaceObject.BuiltinPluginName.DeterministicModuleIdsPlugin;
|
|
2607
2607
|
affectedHooks = 'compilation';
|
|
2608
2608
|
raw() {
|
|
2609
|
-
return
|
|
2609
|
+
return base_createBuiltinPlugin(this.name, void 0);
|
|
2610
2610
|
}
|
|
2611
2611
|
}
|
|
2612
2612
|
let DllEntryPlugin = base_create(binding_namespaceObject.BuiltinPluginName.DllEntryPlugin, (context, entries, options)=>({
|
|
2613
2613
|
context,
|
|
2614
2614
|
entries,
|
|
2615
2615
|
name: options.name
|
|
2616
|
-
})), DllReferenceAgencyPlugin = base_create(binding_namespaceObject.BuiltinPluginName.DllReferenceAgencyPlugin, (options)=>options)
|
|
2617
|
-
class EntryOptionPlugin {
|
|
2616
|
+
})), DllReferenceAgencyPlugin = base_create(binding_namespaceObject.BuiltinPluginName.DllReferenceAgencyPlugin, (options)=>options), lib_EntryOptionPlugin = class EntryOptionPlugin {
|
|
2618
2617
|
apply(compiler) {
|
|
2619
2618
|
compiler.hooks.entryOption.tap('EntryOptionPlugin', (context, entry)=>(EntryOptionPlugin.applyEntryOption(compiler, context, entry), !0));
|
|
2620
2619
|
}
|
|
@@ -2640,8 +2639,7 @@ class EntryOptionPlugin {
|
|
|
2640
2639
|
library: desc.library
|
|
2641
2640
|
};
|
|
2642
2641
|
}
|
|
2643
|
-
}
|
|
2644
|
-
let lib_EntryOptionPlugin = EntryOptionPlugin, EntryPlugin = base_create(binding_namespaceObject.BuiltinPluginName.EntryPlugin, (context, entry, options = '')=>({
|
|
2642
|
+
}, EntryPlugin = base_create(binding_namespaceObject.BuiltinPluginName.EntryPlugin, (context, entry, options = '')=>({
|
|
2645
2643
|
context,
|
|
2646
2644
|
entry,
|
|
2647
2645
|
options: getRawEntryOptions('string' == typeof options ? {
|
|
@@ -2664,7 +2662,7 @@ function getRawEntryOptions(entry) {
|
|
|
2664
2662
|
};
|
|
2665
2663
|
}
|
|
2666
2664
|
EntryPlugin.createDependency = (request)=>new binding_namespaceObject.EntryDependency(request);
|
|
2667
|
-
class DynamicEntryPlugin extends
|
|
2665
|
+
class DynamicEntryPlugin extends base_RspackBuiltinPlugin {
|
|
2668
2666
|
context;
|
|
2669
2667
|
entry;
|
|
2670
2668
|
name = binding_namespaceObject.BuiltinPluginName.DynamicEntryPlugin;
|
|
@@ -2683,7 +2681,7 @@ class DynamicEntryPlugin extends RspackBuiltinPlugin {
|
|
|
2683
2681
|
};
|
|
2684
2682
|
})
|
|
2685
2683
|
};
|
|
2686
|
-
return
|
|
2684
|
+
return base_createBuiltinPlugin(this.name, raw);
|
|
2687
2685
|
}
|
|
2688
2686
|
}
|
|
2689
2687
|
let ElectronTargetPlugin = base_create(binding_namespaceObject.BuiltinPluginName.ElectronTargetPlugin, (context)=>context ?? 'none'), EnableChunkLoadingPluginInner = base_create(binding_namespaceObject.BuiltinPluginName.EnableChunkLoadingPlugin, (type)=>type), enabledTypes = new WeakMap(), getEnabledTypes = (compiler)=>{
|
|
@@ -2719,7 +2717,7 @@ class JsSplitChunkSizes {
|
|
|
2719
2717
|
} : sizes;
|
|
2720
2718
|
}
|
|
2721
2719
|
}
|
|
2722
|
-
class SplitChunksPlugin extends
|
|
2720
|
+
class SplitChunksPlugin extends base_RspackBuiltinPlugin {
|
|
2723
2721
|
options;
|
|
2724
2722
|
name = binding_namespaceObject.BuiltinPluginName.SplitChunksPlugin;
|
|
2725
2723
|
affectedHooks = 'thisCompilation';
|
|
@@ -2729,7 +2727,7 @@ class SplitChunksPlugin extends RspackBuiltinPlugin {
|
|
|
2729
2727
|
raw(compiler) {
|
|
2730
2728
|
let rawOptions = SplitChunksPlugin_toRawSplitChunksOptions(this.options, compiler);
|
|
2731
2729
|
if (void 0 === rawOptions) throw Error('rawOptions should not be undefined');
|
|
2732
|
-
return
|
|
2730
|
+
return base_createBuiltinPlugin(this.name, rawOptions);
|
|
2733
2731
|
}
|
|
2734
2732
|
}
|
|
2735
2733
|
function SplitChunksPlugin_toRawSplitChunksOptions(sc, compiler) {
|
|
@@ -2787,7 +2785,7 @@ let EnableLibraryPlugin_enabledTypes = new WeakMap(), EnableLibraryPlugin_getEna
|
|
|
2787
2785
|
let set = EnableLibraryPlugin_enabledTypes.get(compiler);
|
|
2788
2786
|
return void 0 === set && (set = new Set(), EnableLibraryPlugin_enabledTypes.set(compiler, set)), set;
|
|
2789
2787
|
};
|
|
2790
|
-
class EnableLibraryPlugin extends
|
|
2788
|
+
class EnableLibraryPlugin extends base_RspackBuiltinPlugin {
|
|
2791
2789
|
type;
|
|
2792
2790
|
name = binding_namespaceObject.BuiltinPluginName.EnableLibraryPlugin;
|
|
2793
2791
|
constructor(type){
|
|
@@ -2801,7 +2799,7 @@ class EnableLibraryPlugin extends RspackBuiltinPlugin {
|
|
|
2801
2799
|
}
|
|
2802
2800
|
raw(compiler) {
|
|
2803
2801
|
let type = this.type, enabled = EnableLibraryPlugin_getEnabledTypes(compiler);
|
|
2804
|
-
if (!enabled.has(type)) return enabled.add(type),
|
|
2802
|
+
if (!enabled.has(type)) return enabled.add(type), base_createBuiltinPlugin(this.name, {
|
|
2805
2803
|
libraryType: type,
|
|
2806
2804
|
preserveModules: compiler.options.output.library?.preserveModules,
|
|
2807
2805
|
splitChunks: SplitChunksPlugin_toRawSplitChunksOptions(compiler.options.optimization.splitChunks ?? !1, compiler)
|
|
@@ -4446,6 +4444,10 @@ function getRawParserOptions(parser, type) {
|
|
|
4446
4444
|
type: 'css/auto',
|
|
4447
4445
|
cssAuto: getRawCssParserOptions(parser)
|
|
4448
4446
|
};
|
|
4447
|
+
if ('css/global' === type) return {
|
|
4448
|
+
type: 'css/global',
|
|
4449
|
+
cssGlobal: getRawCssParserOptions(parser)
|
|
4450
|
+
};
|
|
4449
4451
|
if ('css/module' === type) return {
|
|
4450
4452
|
type: 'css/module',
|
|
4451
4453
|
cssModule: getRawCssParserOptions(parser)
|
|
@@ -4534,6 +4536,10 @@ function getRawGeneratorOptions(generator, type) {
|
|
|
4534
4536
|
type: 'css/auto',
|
|
4535
4537
|
cssAuto: getRawCssAutoOrModuleGeneratorOptions(generator)
|
|
4536
4538
|
};
|
|
4539
|
+
if ('css/global' === type) return {
|
|
4540
|
+
type: 'css/global',
|
|
4541
|
+
cssGlobal: getRawCssAutoOrModuleGeneratorOptions(generator)
|
|
4542
|
+
};
|
|
4537
4543
|
if ('css/module' === type) return {
|
|
4538
4544
|
type: 'css/module',
|
|
4539
4545
|
cssModule: getRawCssAutoOrModuleGeneratorOptions(generator)
|
|
@@ -4579,12 +4585,16 @@ function getRawAssetResourceGeneratorOptions(options) {
|
|
|
4579
4585
|
function getRawCssAutoOrModuleGeneratorOptions(options) {
|
|
4580
4586
|
return {
|
|
4581
4587
|
localIdentName: options.localIdentName,
|
|
4588
|
+
localIdentHashDigest: options.localIdentHashDigest,
|
|
4589
|
+
localIdentHashDigestLength: options.localIdentHashDigestLength,
|
|
4590
|
+
localIdentHashFunction: options.localIdentHashFunction,
|
|
4591
|
+
localIdentHashSalt: options.localIdentHashSalt,
|
|
4582
4592
|
exportsConvention: options.exportsConvention,
|
|
4583
4593
|
exportsOnly: options.exportsOnly,
|
|
4584
4594
|
esModule: options.esModule
|
|
4585
4595
|
};
|
|
4586
4596
|
}
|
|
4587
|
-
class ExternalsPlugin extends
|
|
4597
|
+
class ExternalsPlugin extends base_RspackBuiltinPlugin {
|
|
4588
4598
|
type;
|
|
4589
4599
|
externals;
|
|
4590
4600
|
placeInInitial;
|
|
@@ -4601,7 +4611,7 @@ class ExternalsPlugin extends RspackBuiltinPlugin {
|
|
|
4601
4611
|
]).filter(Boolean).map((item)=>this.#getRawExternalItem(item)),
|
|
4602
4612
|
placeInInitial: this.placeInInitial ?? !1
|
|
4603
4613
|
};
|
|
4604
|
-
return
|
|
4614
|
+
return base_createBuiltinPlugin(this.name, raw);
|
|
4605
4615
|
}
|
|
4606
4616
|
#processResolveResult = (text)=>{
|
|
4607
4617
|
if (!text) return;
|
|
@@ -4679,7 +4689,7 @@ function getRawExternalItemValue(value) {
|
|
|
4679
4689
|
])) : value;
|
|
4680
4690
|
}
|
|
4681
4691
|
let FetchCompileAsyncWasmPlugin = base_create(binding_namespaceObject.BuiltinPluginName.FetchCompileAsyncWasmPlugin, ()=>{}, 'thisCompilation'), FileUriPlugin = base_create(binding_namespaceObject.BuiltinPluginName.FileUriPlugin, ()=>{}, 'compilation'), FlagDependencyExportsPlugin = base_create(binding_namespaceObject.BuiltinPluginName.FlagDependencyExportsPlugin, ()=>{}, 'compilation');
|
|
4682
|
-
class FlagDependencyUsagePlugin extends
|
|
4692
|
+
class FlagDependencyUsagePlugin extends base_RspackBuiltinPlugin {
|
|
4683
4693
|
global;
|
|
4684
4694
|
name = binding_namespaceObject.BuiltinPluginName.FlagDependencyUsagePlugin;
|
|
4685
4695
|
affectedHooks = 'compilation';
|
|
@@ -4687,20 +4697,19 @@ class FlagDependencyUsagePlugin extends RspackBuiltinPlugin {
|
|
|
4687
4697
|
super(), this.global = global;
|
|
4688
4698
|
}
|
|
4689
4699
|
raw() {
|
|
4690
|
-
return
|
|
4700
|
+
return base_createBuiltinPlugin(this.name, this.global);
|
|
4691
4701
|
}
|
|
4692
4702
|
}
|
|
4693
4703
|
let HashedModuleIdsPlugin = base_create(binding_namespaceObject.BuiltinPluginName.HashedModuleIdsPlugin, (options)=>({
|
|
4694
4704
|
...options
|
|
4695
4705
|
}), 'compilation');
|
|
4696
|
-
class HotModuleReplacementPlugin extends
|
|
4706
|
+
class HotModuleReplacementPlugin extends base_RspackBuiltinPlugin {
|
|
4697
4707
|
name = binding_namespaceObject.BuiltinPluginName.HotModuleReplacementPlugin;
|
|
4698
4708
|
raw(compiler) {
|
|
4699
|
-
return void 0 === compiler.options.output.strictModuleErrorHandling && (compiler.options.output.strictModuleErrorHandling = !0),
|
|
4709
|
+
return void 0 === compiler.options.output.strictModuleErrorHandling && (compiler.options.output.strictModuleErrorHandling = !0), base_createBuiltinPlugin(this.name, void 0);
|
|
4700
4710
|
}
|
|
4701
4711
|
}
|
|
4702
|
-
let HttpExternalsRspackPlugin = base_create(binding_namespaceObject.BuiltinPluginName.HttpExternalsRspackPlugin, (
|
|
4703
|
-
css,
|
|
4712
|
+
let HttpExternalsRspackPlugin = base_create(binding_namespaceObject.BuiltinPluginName.HttpExternalsRspackPlugin, (webAsync)=>({
|
|
4704
4713
|
webAsync
|
|
4705
4714
|
})), HttpUriPlugin_require = createRequire(import.meta.url), getHttp = memoize(()=>HttpUriPlugin_require('node:http')), getHttps = memoize(()=>HttpUriPlugin_require('node:https')), defaultHttpClientForNode = async (url, headers)=>{
|
|
4706
4715
|
let { res, body } = await function(url, options) {
|
|
@@ -4731,7 +4740,7 @@ let HttpExternalsRspackPlugin = base_create(binding_namespaceObject.BuiltinPlugi
|
|
|
4731
4740
|
body: Buffer.from(body)
|
|
4732
4741
|
};
|
|
4733
4742
|
};
|
|
4734
|
-
class HttpUriPlugin extends
|
|
4743
|
+
class HttpUriPlugin extends base_RspackBuiltinPlugin {
|
|
4735
4744
|
options;
|
|
4736
4745
|
name = binding_namespaceObject.BuiltinPluginName.HttpUriPlugin;
|
|
4737
4746
|
affectedHooks = 'compilation';
|
|
@@ -4746,7 +4755,7 @@ class HttpUriPlugin extends RspackBuiltinPlugin {
|
|
|
4746
4755
|
upgrade: options.upgrade ?? !1,
|
|
4747
4756
|
httpClient: options.httpClient ?? defaultHttpClientForNode
|
|
4748
4757
|
};
|
|
4749
|
-
return
|
|
4758
|
+
return base_createBuiltinPlugin(this.name, raw);
|
|
4750
4759
|
}
|
|
4751
4760
|
}
|
|
4752
4761
|
let compilationOptionsMap = new WeakMap(), hooks_compilationHooksMap = new WeakMap(), plugin_require = createRequire(import.meta.url), HTML_PLUGIN_UID = 0, HtmlRspackPlugin = base_create(binding_namespaceObject.BuiltinPluginName.HtmlRspackPlugin, function(c = {}) {
|
|
@@ -4897,11 +4906,11 @@ HtmlRspackPlugin.createHtmlTagObject = (tagName, attributes, innerHTML)=>({
|
|
|
4897
4906
|
}, hooks_compilationHooksMap.set(compilation, hooks)), hooks;
|
|
4898
4907
|
}, HtmlRspackPlugin.version = 5;
|
|
4899
4908
|
let IgnorePlugin = base_create(binding_namespaceObject.BuiltinPluginName.IgnorePlugin, (options)=>options), InferAsyncModulesPlugin = base_create(binding_namespaceObject.BuiltinPluginName.InferAsyncModulesPlugin, ()=>{}, 'compilation'), InlineExportsPlugin = base_create(binding_namespaceObject.BuiltinPluginName.InlineExportsPlugin, ()=>{}, 'compilation'), JavascriptModulesPlugin_compilationHooksMap = new WeakMap();
|
|
4900
|
-
class JavascriptModulesPlugin extends
|
|
4909
|
+
class JavascriptModulesPlugin extends base_RspackBuiltinPlugin {
|
|
4901
4910
|
name = binding_namespaceObject.BuiltinPluginName.JavascriptModulesPlugin;
|
|
4902
4911
|
affectedHooks = 'compilation';
|
|
4903
4912
|
raw() {
|
|
4904
|
-
return
|
|
4913
|
+
return base_createBuiltinPlugin(this.name, void 0);
|
|
4905
4914
|
}
|
|
4906
4915
|
static getCompilationHooks(compilation) {
|
|
4907
4916
|
checkCompilation(compilation);
|
|
@@ -5037,7 +5046,7 @@ let lazyCompilationMiddlewareInternal = (compiler, activeModules, lazyCompilatio
|
|
|
5037
5046
|
moduleActivated.length && compiler.watching && compiler.watching.invalidate(), res.writeHead(200), res.write('\n'), res.end();
|
|
5038
5047
|
};
|
|
5039
5048
|
};
|
|
5040
|
-
class MangleExportsPlugin extends
|
|
5049
|
+
class MangleExportsPlugin extends base_RspackBuiltinPlugin {
|
|
5041
5050
|
deterministic;
|
|
5042
5051
|
name = binding_namespaceObject.BuiltinPluginName.MangleExportsPlugin;
|
|
5043
5052
|
affectedHooks = 'compilation';
|
|
@@ -5045,30 +5054,30 @@ class MangleExportsPlugin extends RspackBuiltinPlugin {
|
|
|
5045
5054
|
super(), this.deterministic = deterministic;
|
|
5046
5055
|
}
|
|
5047
5056
|
raw() {
|
|
5048
|
-
return
|
|
5057
|
+
return base_createBuiltinPlugin(this.name, this.deterministic);
|
|
5049
5058
|
}
|
|
5050
5059
|
}
|
|
5051
5060
|
let MergeDuplicateChunksPlugin = base_create(binding_namespaceObject.BuiltinPluginName.MergeDuplicateChunksPlugin, ()=>{}), ModuleChunkFormatPlugin = base_create(binding_namespaceObject.BuiltinPluginName.ModuleChunkFormatPlugin, ()=>{});
|
|
5052
|
-
class ModuleConcatenationPlugin extends
|
|
5061
|
+
class ModuleConcatenationPlugin extends base_RspackBuiltinPlugin {
|
|
5053
5062
|
name = binding_namespaceObject.BuiltinPluginName.ModuleConcatenationPlugin;
|
|
5054
5063
|
affectedHooks = 'compilation';
|
|
5055
5064
|
raw() {
|
|
5056
|
-
return
|
|
5065
|
+
return base_createBuiltinPlugin(this.name, void 0);
|
|
5057
5066
|
}
|
|
5058
5067
|
}
|
|
5059
5068
|
let ModuleInfoHeaderPlugin = base_create(binding_namespaceObject.BuiltinPluginName.ModuleInfoHeaderPlugin, (verbose)=>verbose, 'compilation'), NamedChunkIdsPlugin = base_create(binding_namespaceObject.BuiltinPluginName.NamedChunkIdsPlugin, ()=>{}, 'compilation'), NamedModuleIdsPlugin = base_create(binding_namespaceObject.BuiltinPluginName.NamedModuleIdsPlugin, ()=>{}, 'compilation');
|
|
5060
|
-
class NaturalChunkIdsPlugin extends
|
|
5069
|
+
class NaturalChunkIdsPlugin extends base_RspackBuiltinPlugin {
|
|
5061
5070
|
name = binding_namespaceObject.BuiltinPluginName.NaturalChunkIdsPlugin;
|
|
5062
5071
|
affectedHooks = 'compilation';
|
|
5063
5072
|
raw() {
|
|
5064
|
-
return
|
|
5073
|
+
return base_createBuiltinPlugin(this.name, void 0);
|
|
5065
5074
|
}
|
|
5066
5075
|
}
|
|
5067
|
-
class NaturalModuleIdsPlugin extends
|
|
5076
|
+
class NaturalModuleIdsPlugin extends base_RspackBuiltinPlugin {
|
|
5068
5077
|
name = binding_namespaceObject.BuiltinPluginName.NaturalModuleIdsPlugin;
|
|
5069
5078
|
affectedHooks = 'compilation';
|
|
5070
5079
|
raw() {
|
|
5071
|
-
return
|
|
5080
|
+
return base_createBuiltinPlugin(this.name, void 0);
|
|
5072
5081
|
}
|
|
5073
5082
|
}
|
|
5074
5083
|
let NodeTargetPlugin = base_create(binding_namespaceObject.BuiltinPluginName.NodeTargetPlugin, ()=>void 0), NoEmitOnErrorsPlugin = base_create(binding_namespaceObject.BuiltinPluginName.NoEmitOnErrorsPlugin, ()=>void 0), NormalModuleReplacementPlugin = base_create(binding_namespaceObject.BuiltinPluginName.NormalModuleReplacementPlugin, (resourceRegExp, newResource)=>({
|
|
@@ -5174,19 +5183,19 @@ class Coordinator {
|
|
|
5174
5183
|
});
|
|
5175
5184
|
}
|
|
5176
5185
|
}
|
|
5177
|
-
class RscClientPlugin extends
|
|
5186
|
+
class RscClientPlugin extends base_RspackBuiltinPlugin {
|
|
5178
5187
|
name = 'RscClientPlugin';
|
|
5179
5188
|
#options;
|
|
5180
5189
|
constructor(options){
|
|
5181
5190
|
super(), this.#options = options;
|
|
5182
5191
|
}
|
|
5183
5192
|
raw(compiler) {
|
|
5184
|
-
return this.#options.coordinator.applyClientCompiler(compiler),
|
|
5193
|
+
return this.#options.coordinator.applyClientCompiler(compiler), base_createBuiltinPlugin(this.name, {
|
|
5185
5194
|
coordinator: this.#options.coordinator[GET_OR_INIT_BINDING]()
|
|
5186
5195
|
});
|
|
5187
5196
|
}
|
|
5188
5197
|
}
|
|
5189
|
-
class RscServerPlugin extends
|
|
5198
|
+
class RscServerPlugin extends base_RspackBuiltinPlugin {
|
|
5190
5199
|
name = 'RscServerPlugin';
|
|
5191
5200
|
#options;
|
|
5192
5201
|
constructor(options){
|
|
@@ -5196,14 +5205,15 @@ class RscServerPlugin extends RspackBuiltinPlugin {
|
|
|
5196
5205
|
let onManifest;
|
|
5197
5206
|
this.#options.coordinator.applyServerCompiler(compiler);
|
|
5198
5207
|
let { coordinator, onServerComponentChanges } = this.#options;
|
|
5199
|
-
return this.#options.onManifest && (onManifest = (json)=>Promise.resolve(this.#options.onManifest(JSON.parse(json)))),
|
|
5208
|
+
return this.#options.onManifest && (onManifest = (json)=>Promise.resolve(this.#options.onManifest(JSON.parse(json)))), base_createBuiltinPlugin(this.name, {
|
|
5200
5209
|
coordinator: coordinator[GET_OR_INIT_BINDING](),
|
|
5210
|
+
cssLink: this.#options.cssLink,
|
|
5201
5211
|
onServerComponentChanges,
|
|
5202
5212
|
onManifest
|
|
5203
5213
|
});
|
|
5204
5214
|
}
|
|
5205
5215
|
}
|
|
5206
|
-
class SideEffectsFlagPlugin extends
|
|
5216
|
+
class SideEffectsFlagPlugin extends base_RspackBuiltinPlugin {
|
|
5207
5217
|
analyzeSideEffectsFree;
|
|
5208
5218
|
name = binding_namespaceObject.BuiltinPluginName.SideEffectsFlagPlugin;
|
|
5209
5219
|
affectedHooks = 'compilation';
|
|
@@ -5211,7 +5221,7 @@ class SideEffectsFlagPlugin extends RspackBuiltinPlugin {
|
|
|
5211
5221
|
super(), this.analyzeSideEffectsFree = analyzeSideEffectsFree;
|
|
5212
5222
|
}
|
|
5213
5223
|
raw() {
|
|
5214
|
-
return
|
|
5224
|
+
return base_createBuiltinPlugin(this.name, this.analyzeSideEffectsFree);
|
|
5215
5225
|
}
|
|
5216
5226
|
}
|
|
5217
5227
|
let SizeLimitsPlugin = base_create(binding_namespaceObject.BuiltinPluginName.SizeLimitsPlugin, (options)=>{
|
|
@@ -5403,7 +5413,7 @@ let SwcJsMinimizerRspackPlugin = base_create(binding_namespaceObject.BuiltinPlug
|
|
|
5403
5413
|
}
|
|
5404
5414
|
};
|
|
5405
5415
|
}, 'compilation'), URLPlugin = base_create(binding_namespaceObject.BuiltinPluginName.URLPlugin, ()=>{}, 'compilation');
|
|
5406
|
-
class WorkerPlugin extends
|
|
5416
|
+
class WorkerPlugin extends base_RspackBuiltinPlugin {
|
|
5407
5417
|
chunkLoading;
|
|
5408
5418
|
wasmLoading;
|
|
5409
5419
|
module;
|
|
@@ -5414,7 +5424,7 @@ class WorkerPlugin extends RspackBuiltinPlugin {
|
|
|
5414
5424
|
super(), this.chunkLoading = chunkLoading, this.wasmLoading = wasmLoading, this.module = module, this.workerPublicPath = workerPublicPath;
|
|
5415
5425
|
}
|
|
5416
5426
|
raw(compiler) {
|
|
5417
|
-
return this.chunkLoading && new EnableChunkLoadingPlugin(this.chunkLoading).apply(compiler), this.wasmLoading && new EnableWasmLoadingPlugin(this.wasmLoading).apply(compiler),
|
|
5427
|
+
return this.chunkLoading && new EnableChunkLoadingPlugin(this.chunkLoading).apply(compiler), this.wasmLoading && new EnableWasmLoadingPlugin(this.wasmLoading).apply(compiler), base_createBuiltinPlugin(this.name, void 0);
|
|
5418
5428
|
}
|
|
5419
5429
|
}
|
|
5420
5430
|
class ContextModuleFactory {
|
|
@@ -6464,7 +6474,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6464
6474
|
],
|
|
6465
6475
|
[
|
|
6466
6476
|
'esX',
|
|
6467
|
-
'
|
|
6477
|
+
'ECMAScript in this version. Examples: es2020, es5.',
|
|
6468
6478
|
/^es(\d+)$/,
|
|
6469
6479
|
(version)=>{
|
|
6470
6480
|
let v = +version;
|
|
@@ -6543,23 +6553,25 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6543
6553
|
development
|
|
6544
6554
|
}), applySnapshotDefaults(options.snapshot, {
|
|
6545
6555
|
production
|
|
6556
|
+
}), applyOutputDefaults(options, {
|
|
6557
|
+
context: options.context,
|
|
6558
|
+
targetProperties,
|
|
6559
|
+
isAffectedByBrowserslist: void 0 === target || 'string' == typeof target && target.startsWith('browserslist') || Array.isArray(target) && target.some((target)=>target.startsWith('browserslist')),
|
|
6560
|
+
entry: options.entry
|
|
6546
6561
|
}), applyModuleDefaults(options.module, {
|
|
6547
6562
|
asyncWebAssembly: options.experiments.asyncWebAssembly,
|
|
6548
6563
|
targetProperties,
|
|
6549
6564
|
mode: options.mode,
|
|
6550
6565
|
uniqueName: options.output.uniqueName,
|
|
6551
6566
|
deferImport: options.experiments.deferImport,
|
|
6552
|
-
outputModule: options.output.module
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
targetProperties,
|
|
6556
|
-
isAffectedByBrowserslist: void 0 === target || 'string' == typeof target && target.startsWith('browserslist') || Array.isArray(target) && target.some((target)=>target.startsWith('browserslist')),
|
|
6557
|
-
entry: options.entry
|
|
6567
|
+
outputModule: options.output.module,
|
|
6568
|
+
hashFunction: options.output.hashFunction,
|
|
6569
|
+
hashSalt: options.output.hashSalt
|
|
6558
6570
|
}), applyExternalsPresetsDefaults(options.externalsPresets, {
|
|
6559
6571
|
targetProperties,
|
|
6560
6572
|
buildHttp: !!options.experiments.buildHttp,
|
|
6561
6573
|
outputModule: options.output.module
|
|
6562
|
-
}), F(options, 'externalsType', ()=>options.output.library ? options.output.library.type : options.output.module ? 'module-import' : 'var'), applyNodeDefaults(options.node, {
|
|
6574
|
+
}), F(options, 'externalsType', ()=>options.output.library?.type && 'modern-module' !== options.output.library.type ? options.output.library.type : options.output.module ? 'module-import' : 'var'), applyNodeDefaults(options.node, {
|
|
6563
6575
|
targetProperties,
|
|
6564
6576
|
outputModule: options.output.module
|
|
6565
6577
|
}), applyLoaderDefaults(options.loader, {
|
|
@@ -6586,9 +6598,9 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6586
6598
|
D(experiments, 'futureDefaults', !1), D(experiments, 'asyncWebAssembly', !0), D(experiments, 'deferImport', !1), D(experiments, 'buildHttp', void 0), experiments.buildHttp && 'object' == typeof experiments.buildHttp && D(experiments.buildHttp, 'upgrade', !1), D(experiments, 'useInputFileSystem', !1), D(experiments, 'pureFunctions', !1);
|
|
6587
6599
|
}, applyIncrementalDefaults = (options)=>{
|
|
6588
6600
|
D(options, 'incremental', {}), 'object' == typeof options.incremental && (D(options.incremental, 'silent', !0), D(options.incremental, 'buildModuleGraph', !0), D(options.incremental, 'finishModules', !0), D(options.incremental, 'optimizeDependencies', !0), D(options.incremental, 'buildChunkGraph', !0), D(options.incremental, 'optimizeChunkModules', !0), D(options.incremental, 'moduleIds', !0), D(options.incremental, 'chunkIds', !0), D(options.incremental, 'modulesHashes', !0), D(options.incremental, 'modulesCodegen', !0), D(options.incremental, 'modulesRuntimeRequirements', !0), D(options.incremental, 'chunksRuntimeRequirements', !0), D(options.incremental, 'chunksHashes', !0), D(options.incremental, 'chunkAsset', !0), D(options.incremental, 'emitAssets', !0));
|
|
6589
|
-
}, applySnapshotDefaults = (_snapshot, _env)=>{},
|
|
6590
|
-
D(generatorOptions, 'exportsOnly', !targetProperties || !1 === targetProperties.document), D(generatorOptions, 'esModule', !0);
|
|
6591
|
-
}, applyModuleDefaults = (module, { asyncWebAssembly, targetProperties, mode, uniqueName, deferImport, outputModule })=>{
|
|
6601
|
+
}, applySnapshotDefaults = (_snapshot, _env)=>{}, applyCssModuleGeneratorOptionsDefaults = (generatorOptions, { hashFunction, hashSalt, localIdentName, targetProperties })=>{
|
|
6602
|
+
D(generatorOptions, 'exportsOnly', !targetProperties || !1 === targetProperties.document), D(generatorOptions, 'esModule', !0), D(generatorOptions, 'exportsConvention', 'as-is'), D(generatorOptions, 'localIdentName', localIdentName), D(generatorOptions, 'localIdentHashSalt', hashSalt), D(generatorOptions, 'localIdentHashFunction', hashFunction), D(generatorOptions, 'localIdentHashDigest', 'base64url'), D(generatorOptions, 'localIdentHashDigestLength', 6);
|
|
6603
|
+
}, applyModuleDefaults = (module, { asyncWebAssembly, targetProperties, mode, uniqueName, deferImport, outputModule, hashFunction, hashSalt })=>{
|
|
6592
6604
|
assertNotNill(module.parser), assertNotNill(module.generator), F(module.parser, "asset", ()=>({})), assertNotNill(module.parser.asset), F(module.parser.asset, 'dataUrlCondition', ()=>({})), 'object' == typeof module.parser.asset.dataUrlCondition && D(module.parser.asset.dataUrlCondition, 'maxSize', 8096), F(module.parser, "javascript", ()=>({})), assertNotNill(module.parser.javascript), ((parserOptions, { deferImport, outputModule })=>{
|
|
6593
6605
|
D(parserOptions, 'dynamicImportMode', 'lazy'), D(parserOptions, 'dynamicImportPrefetch', !1), D(parserOptions, 'dynamicImportPreload', !1), D(parserOptions, 'url', !0), D(parserOptions, 'exprContextCritical', !0), D(parserOptions, 'unknownContextCritical', !0), D(parserOptions, 'wrappedContextCritical', !1), D(parserOptions, 'strictThisContextOnImports', !1), D(parserOptions, 'wrappedContextRegExp', /.*/), D(parserOptions, 'exportsPresence', 'error'), D(parserOptions, 'requireAsExpression', !0), D(parserOptions, 'requireAlias', !1), D(parserOptions, 'requireDynamic', !0), D(parserOptions, 'requireResolve', !0), D(parserOptions, 'commonjs', !0), D(parserOptions, 'importDynamic', !0), D(parserOptions, 'worker', [
|
|
6594
6606
|
'...'
|
|
@@ -6596,15 +6608,28 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6596
6608
|
})(module.parser.javascript, {
|
|
6597
6609
|
deferImport,
|
|
6598
6610
|
outputModule
|
|
6599
|
-
}), F(module.parser, "json", ()=>({})), assertNotNill(module.parser.json), D(module.parser.json, 'exportsDepth', 'development' === mode ? 1 : Number.MAX_SAFE_INTEGER), F(module.generator, 'json', ()=>({})), assertNotNill(module.generator.json), D(module.generator.json, 'JSONParse', !0), F(module.parser, 'css', ()=>({})), assertNotNill(module.parser.css), D(module.parser.css, 'namedExports', !0), D(module.parser.css, 'url', !0), F(module.parser, 'css/auto', ()=>({})), assertNotNill(module.parser['css/auto']), D(module.parser['css/auto'], 'namedExports', !0), D(module.parser['css/auto'], 'url', !0), F(module.parser, 'css/module', ()=>({})), assertNotNill(module.parser['css/module']), D(module.parser['css/module'], 'namedExports', !0), D(module.parser['css/module'], 'url', !0), F(module.generator, 'css', ()=>({})), assertNotNill(module.generator.css),
|
|
6600
|
-
targetProperties
|
|
6601
|
-
})
|
|
6611
|
+
}), F(module.parser, "json", ()=>({})), assertNotNill(module.parser.json), D(module.parser.json, 'exportsDepth', 'development' === mode ? 1 : Number.MAX_SAFE_INTEGER), F(module.generator, 'json', ()=>({})), assertNotNill(module.generator.json), D(module.generator.json, 'JSONParse', !0), F(module.parser, 'css', ()=>({})), assertNotNill(module.parser.css), D(module.parser.css, 'namedExports', !0), D(module.parser.css, 'url', !0), F(module.parser, 'css/auto', ()=>({})), assertNotNill(module.parser['css/auto']), D(module.parser['css/auto'], 'namedExports', !0), D(module.parser['css/auto'], 'url', !0), F(module.parser, 'css/global', ()=>({})), assertNotNill(module.parser['css/global']), D(module.parser['css/global'], 'namedExports', !0), D(module.parser['css/global'], 'url', !0), F(module.parser, 'css/module', ()=>({})), assertNotNill(module.parser['css/module']), D(module.parser['css/module'], 'namedExports', !0), D(module.parser['css/module'], 'url', !0), F(module.generator, 'css', ()=>({})), assertNotNill(module.generator.css), ((generatorOptions, { targetProperties })=>{
|
|
6612
|
+
D(generatorOptions, 'exportsOnly', !targetProperties || !1 === targetProperties.document), D(generatorOptions, 'esModule', !0);
|
|
6613
|
+
})(module.generator.css, {
|
|
6602
6614
|
targetProperties
|
|
6603
|
-
}),
|
|
6615
|
+
}), F(module.generator, 'css/auto', ()=>({})), assertNotNill(module.generator['css/auto']);
|
|
6604
6616
|
let localIdentName = 'development' === mode ? uniqueName && uniqueName.length > 0 ? '[uniqueName]-[id]-[local]' : '[id]-[local]' : '[fullhash]';
|
|
6605
|
-
|
|
6617
|
+
applyCssModuleGeneratorOptionsDefaults(module.generator['css/auto'], {
|
|
6618
|
+
hashFunction,
|
|
6619
|
+
hashSalt,
|
|
6620
|
+
localIdentName,
|
|
6606
6621
|
targetProperties
|
|
6607
|
-
}),
|
|
6622
|
+
}), F(module.generator, 'css/module', ()=>({})), assertNotNill(module.generator['css/module']), applyCssModuleGeneratorOptionsDefaults(module.generator['css/module'], {
|
|
6623
|
+
hashFunction,
|
|
6624
|
+
hashSalt,
|
|
6625
|
+
localIdentName,
|
|
6626
|
+
targetProperties
|
|
6627
|
+
}), F(module.generator, 'css/global', ()=>({})), assertNotNill(module.generator['css/global']), applyCssModuleGeneratorOptionsDefaults(module.generator['css/global'], {
|
|
6628
|
+
hashFunction,
|
|
6629
|
+
hashSalt,
|
|
6630
|
+
localIdentName,
|
|
6631
|
+
targetProperties
|
|
6632
|
+
}), A(module, 'defaultRules', ()=>{
|
|
6608
6633
|
let esm = {
|
|
6609
6634
|
type: "javascript/esm",
|
|
6610
6635
|
resolve: {
|
|
@@ -6871,7 +6896,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6871
6896
|
return output.wasmLoading && enabledWasmLoadingTypes.add(output.wasmLoading), output.workerWasmLoading && enabledWasmLoadingTypes.add(output.workerWasmLoading), forEachEntry((desc)=>{
|
|
6872
6897
|
desc.wasmLoading && enabledWasmLoadingTypes.add(desc.wasmLoading);
|
|
6873
6898
|
}), Array.from(enabledWasmLoadingTypes);
|
|
6874
|
-
}), D(output, 'bundlerInfo', {}), 'object' == typeof output.bundlerInfo && (D(output.bundlerInfo, 'version', "2.0.
|
|
6899
|
+
}), D(output, 'bundlerInfo', {}), 'object' == typeof output.bundlerInfo && (D(output.bundlerInfo, 'version', "2.0.4"), D(output.bundlerInfo, 'bundler', 'rspack'), D(output.bundlerInfo, 'force', !1));
|
|
6875
6900
|
}, applyExternalsPresetsDefaults = (externalsPresets, { targetProperties, buildHttp, outputModule })=>{
|
|
6876
6901
|
let isUniversal = (key)=>!!(outputModule && targetProperties && null === targetProperties[key]);
|
|
6877
6902
|
D(externalsPresets, 'web', !buildHttp && targetProperties && (targetProperties.web || isUniversal('node'))), D(externalsPresets, 'node', targetProperties && (targetProperties.node || isUniversal('node'))), D(externalsPresets, 'electron', targetProperties && targetProperties.electron || isUniversal('electron')), D(externalsPresets, 'electronMain', targetProperties && !!targetProperties.electron && (targetProperties.electronMain || isUniversal('electronMain'))), D(externalsPresets, 'electronPreload', targetProperties && !!targetProperties.electron && (targetProperties.electronPreload || isUniversal('electronPreload'))), D(externalsPresets, 'electronRenderer', targetProperties && !!targetProperties.electron && (targetProperties.electronRenderer || isUniversal('electronRenderer'))), D(externalsPresets, 'nwjs', targetProperties && (targetProperties.nwjs || isUniversal('nwjs')));
|
|
@@ -7893,7 +7918,7 @@ class ItemCacheFacade {
|
|
|
7893
7918
|
return await this.storePromise(result), result;
|
|
7894
7919
|
}
|
|
7895
7920
|
}
|
|
7896
|
-
class CacheFacade {
|
|
7921
|
+
let lib_CacheFacade = class CacheFacade {
|
|
7897
7922
|
_name;
|
|
7898
7923
|
_cache;
|
|
7899
7924
|
_hashFunction;
|
|
@@ -7986,7 +8011,7 @@ class CacheFacade {
|
|
|
7986
8011
|
let result = await computer();
|
|
7987
8012
|
return await this.storePromise(identifier, etag, result), result;
|
|
7988
8013
|
}
|
|
7989
|
-
}
|
|
8014
|
+
};
|
|
7990
8015
|
class NormalModuleFactory {
|
|
7991
8016
|
hooks;
|
|
7992
8017
|
resolverFactory;
|
|
@@ -8125,7 +8150,7 @@ class MultiStats {
|
|
|
8125
8150
|
obj.children = this.stats.map((stat, idx)=>{
|
|
8126
8151
|
let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
|
|
8127
8152
|
return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
|
|
8128
|
-
}), childOptions.version && (obj.rspackVersion = "2.0.
|
|
8153
|
+
}), childOptions.version && (obj.rspackVersion = "2.0.4", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(''));
|
|
8129
8154
|
let mapError = (j, obj)=>({
|
|
8130
8155
|
...obj,
|
|
8131
8156
|
compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
|
|
@@ -8634,7 +8659,7 @@ let arraySum = (array)=>{
|
|
|
8634
8659
|
let str = `${a}`, length = lengths[i];
|
|
8635
8660
|
return str.length === length ? str : length > 5 ? `...${str.slice(-length + 3)}` : length > 0 ? str.slice(-length) : '';
|
|
8636
8661
|
});
|
|
8637
|
-
}, CachedInputFileSystem = __webpack_require__("../../node_modules/.pnpm/enhanced-resolve@5.21.
|
|
8662
|
+
}, CachedInputFileSystem = __webpack_require__("../../node_modules/.pnpm/enhanced-resolve@5.21.3/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js");
|
|
8638
8663
|
var CachedInputFileSystem_default = __webpack_require__.n(CachedInputFileSystem);
|
|
8639
8664
|
class NodeEnvironmentPlugin {
|
|
8640
8665
|
options;
|
|
@@ -9399,7 +9424,7 @@ let iterateConfig = (config, options, fn)=>{
|
|
|
9399
9424
|
object.hash = context.getStatsCompilation(compilation).hash;
|
|
9400
9425
|
},
|
|
9401
9426
|
version: (object)=>{
|
|
9402
|
-
object.version = "5.75.0", object.rspackVersion = "2.0.
|
|
9427
|
+
object.version = "5.75.0", object.rspackVersion = "2.0.4";
|
|
9403
9428
|
},
|
|
9404
9429
|
env: (object, _compilation, _context, { _env })=>{
|
|
9405
9430
|
object.env = _env;
|
|
@@ -10628,7 +10653,7 @@ class RspackOptionsApply {
|
|
|
10628
10653
|
if (!options.externalsType) throw Error('options.externalsType should have a value after `applyRspackOptionsDefaults`');
|
|
10629
10654
|
new ExternalsPlugin(options.externalsType, options.externals, !1).apply(compiler);
|
|
10630
10655
|
}
|
|
10631
|
-
if (options.externalsPresets.node && new NodeTargetPlugin().apply(compiler), options.externalsPresets.electronMain && new ElectronTargetPlugin('main').apply(compiler), options.externalsPresets.electronPreload && new ElectronTargetPlugin('preload').apply(compiler), options.externalsPresets.electronRenderer && new ElectronTargetPlugin('renderer').apply(compiler), !options.externalsPresets.electron || options.externalsPresets.electronMain || options.externalsPresets.electronPreload || options.externalsPresets.electronRenderer || new ElectronTargetPlugin().apply(compiler), options.externalsPresets.nwjs && new ExternalsPlugin('node-commonjs', 'nw.gui', !1).apply(compiler), (options.externalsPresets.web || options.externalsPresets.webAsync
|
|
10656
|
+
if (options.externalsPresets.node && (new NodeTargetPlugin().apply(compiler), new CssHttpExternalsRspackPlugin().apply(compiler)), options.externalsPresets.electronMain && new ElectronTargetPlugin('main').apply(compiler), options.externalsPresets.electronPreload && new ElectronTargetPlugin('preload').apply(compiler), options.externalsPresets.electronRenderer && new ElectronTargetPlugin('renderer').apply(compiler), !options.externalsPresets.electron || options.externalsPresets.electronMain || options.externalsPresets.electronPreload || options.externalsPresets.electronRenderer || new ElectronTargetPlugin().apply(compiler), options.externalsPresets.nwjs && new ExternalsPlugin('node-commonjs', 'nw.gui', !1).apply(compiler), (options.externalsPresets.web || options.externalsPresets.webAsync) && new HttpExternalsRspackPlugin(!!options.externalsPresets.webAsync).apply(compiler), new ChunkPrefetchPreloadPlugin().apply(compiler), options.output.pathinfo && new ModuleInfoHeaderPlugin('verbose' === options.output.pathinfo).apply(compiler), 'string' == typeof options.output.chunkFormat) switch(options.output.chunkFormat){
|
|
10632
10657
|
case 'array-push':
|
|
10633
10658
|
new ArrayPushCallbackChunkFormatPlugin().apply(compiler);
|
|
10634
10659
|
break;
|
|
@@ -11057,7 +11082,7 @@ class TraceHookPlugin {
|
|
|
11057
11082
|
});
|
|
11058
11083
|
}
|
|
11059
11084
|
}
|
|
11060
|
-
let CORE_VERSION = "2.0.
|
|
11085
|
+
let CORE_VERSION = "2.0.4", VFILES_BY_COMPILER = new WeakMap();
|
|
11061
11086
|
class VirtualModulesPlugin {
|
|
11062
11087
|
#staticModules;
|
|
11063
11088
|
#compiler;
|
|
@@ -11435,7 +11460,7 @@ class Compiler {
|
|
|
11435
11460
|
return this.#ruleSet;
|
|
11436
11461
|
}
|
|
11437
11462
|
getCache(name) {
|
|
11438
|
-
return new
|
|
11463
|
+
return new lib_CacheFacade(this.cache, `${this.compilerPath}${name}`, this.options.output.hashFunction);
|
|
11439
11464
|
}
|
|
11440
11465
|
getInfrastructureLogger(name) {
|
|
11441
11466
|
if (!name) throw TypeError('Compiler.getInfrastructureLogger(name) called without a name');
|
|
@@ -12534,14 +12559,14 @@ let parseOptions = (options, normalizeSimple, normalizeOptions)=>{
|
|
|
12534
12559
|
else throw Error('Unexpected options format');
|
|
12535
12560
|
return items;
|
|
12536
12561
|
}, compilerSet = new WeakSet();
|
|
12537
|
-
class ShareRuntimePlugin extends
|
|
12562
|
+
class ShareRuntimePlugin extends base_RspackBuiltinPlugin {
|
|
12538
12563
|
enhanced;
|
|
12539
12564
|
name = binding_namespaceObject.BuiltinPluginName.ShareRuntimePlugin;
|
|
12540
12565
|
constructor(enhanced = !1){
|
|
12541
12566
|
super(), this.enhanced = enhanced;
|
|
12542
12567
|
}
|
|
12543
12568
|
raw(compiler) {
|
|
12544
|
-
if (!compilerSet.has(compiler)) return compilerSet.add(compiler),
|
|
12569
|
+
if (!compilerSet.has(compiler)) return compilerSet.add(compiler), base_createBuiltinPlugin(this.name, this.enhanced);
|
|
12545
12570
|
}
|
|
12546
12571
|
}
|
|
12547
12572
|
let VERSION_PATTERN_REGEXP = /^([\d^=v<>~]|[*xX]$)/;
|
|
@@ -12587,7 +12612,7 @@ function normalizeConsumeShareOptions(consumes, shareScope) {
|
|
|
12587
12612
|
treeShakingMode: item.treeShakingMode
|
|
12588
12613
|
}));
|
|
12589
12614
|
}
|
|
12590
|
-
class ConsumeSharedPlugin extends
|
|
12615
|
+
class ConsumeSharedPlugin extends base_RspackBuiltinPlugin {
|
|
12591
12616
|
name = binding_namespaceObject.BuiltinPluginName.ConsumeSharedPlugin;
|
|
12592
12617
|
_options;
|
|
12593
12618
|
constructor(options){
|
|
@@ -12605,10 +12630,10 @@ class ConsumeSharedPlugin extends RspackBuiltinPlugin {
|
|
|
12605
12630
|
})),
|
|
12606
12631
|
enhanced: this._options.enhanced
|
|
12607
12632
|
};
|
|
12608
|
-
return
|
|
12633
|
+
return base_createBuiltinPlugin(this.name, rawOptions);
|
|
12609
12634
|
}
|
|
12610
12635
|
}
|
|
12611
|
-
class ProvideSharedPlugin extends
|
|
12636
|
+
class ProvideSharedPlugin extends base_RspackBuiltinPlugin {
|
|
12612
12637
|
name = binding_namespaceObject.BuiltinPluginName.ProvideSharedPlugin;
|
|
12613
12638
|
_provides;
|
|
12614
12639
|
_enhanced;
|
|
@@ -12644,7 +12669,7 @@ class ProvideSharedPlugin extends RspackBuiltinPlugin {
|
|
|
12644
12669
|
key,
|
|
12645
12670
|
...v
|
|
12646
12671
|
}));
|
|
12647
|
-
return
|
|
12672
|
+
return base_createBuiltinPlugin(this.name, rawOptions);
|
|
12648
12673
|
}
|
|
12649
12674
|
}
|
|
12650
12675
|
function validateShareScope(shareScope, enhanced, pluginName) {
|
|
@@ -12728,7 +12753,7 @@ function getFileName(manifestOptions) {
|
|
|
12728
12753
|
manifestFileName: join(filePath, manifestFileName)
|
|
12729
12754
|
};
|
|
12730
12755
|
}
|
|
12731
|
-
class ModuleFederationManifestPlugin extends
|
|
12756
|
+
class ModuleFederationManifestPlugin extends base_RspackBuiltinPlugin {
|
|
12732
12757
|
name = binding_namespaceObject.BuiltinPluginName.ModuleFederationManifestPlugin;
|
|
12733
12758
|
rawOpts;
|
|
12734
12759
|
constructor(opts){
|
|
@@ -12830,11 +12855,11 @@ class ModuleFederationManifestPlugin extends RspackBuiltinPlugin {
|
|
|
12830
12855
|
buildName: process.env.MF_BUILD_NAME || pkg?.name || 'UNKNOWN'
|
|
12831
12856
|
}, Object.values(normalizeSharedOptions(mfConfig1.shared || {})).some((config)=>config[1].treeShaking) && (statsBuildInfo.target = Array.isArray(compiler.options.target) ? compiler.options.target : [], statsBuildInfo.plugins = mfConfig1.treeShakingSharedPlugins || [], statsBuildInfo.excludePlugins = mfConfig1.treeShakingSharedExcludePlugins || []), statsBuildInfo)
|
|
12832
12857
|
};
|
|
12833
|
-
return
|
|
12858
|
+
return base_createBuiltinPlugin(this.name, rawOptions);
|
|
12834
12859
|
}
|
|
12835
12860
|
}
|
|
12836
12861
|
let SHARE_ENTRY_ASSET = 'collect-shared-entries.json';
|
|
12837
|
-
class CollectSharedEntryPlugin extends
|
|
12862
|
+
class CollectSharedEntryPlugin extends base_RspackBuiltinPlugin {
|
|
12838
12863
|
name = binding_namespaceObject.BuiltinPluginName.CollectSharedEntryPlugin;
|
|
12839
12864
|
sharedOptions;
|
|
12840
12865
|
_collectedEntries;
|
|
@@ -12869,13 +12894,13 @@ class CollectSharedEntryPlugin extends RspackBuiltinPlugin {
|
|
|
12869
12894
|
})),
|
|
12870
12895
|
filename: this.getFilename()
|
|
12871
12896
|
};
|
|
12872
|
-
return
|
|
12897
|
+
return base_createBuiltinPlugin(this.name, rawOptions);
|
|
12873
12898
|
}
|
|
12874
12899
|
}
|
|
12875
12900
|
function assert(condition, msg) {
|
|
12876
12901
|
if (!condition) throw Error(msg);
|
|
12877
12902
|
}
|
|
12878
|
-
class SharedContainerPlugin extends
|
|
12903
|
+
class SharedContainerPlugin extends base_RspackBuiltinPlugin {
|
|
12879
12904
|
name = binding_namespaceObject.BuiltinPluginName.SharedContainerPlugin;
|
|
12880
12905
|
filename = '';
|
|
12881
12906
|
_options;
|
|
@@ -12909,7 +12934,7 @@ class SharedContainerPlugin extends RspackBuiltinPlugin {
|
|
|
12909
12934
|
}
|
|
12910
12935
|
raw(compiler) {
|
|
12911
12936
|
let { library } = this._options;
|
|
12912
|
-
return compiler.options.output.enabledLibraryTypes.includes(library.type) || compiler.options.output.enabledLibraryTypes.push(library.type),
|
|
12937
|
+
return compiler.options.output.enabledLibraryTypes.includes(library.type) || compiler.options.output.enabledLibraryTypes.push(library.type), base_createBuiltinPlugin(this.name, this._options);
|
|
12913
12938
|
}
|
|
12914
12939
|
apply(compiler) {
|
|
12915
12940
|
super.apply(compiler);
|
|
@@ -12927,7 +12952,7 @@ class SharedContainerPlugin extends RspackBuiltinPlugin {
|
|
|
12927
12952
|
});
|
|
12928
12953
|
}
|
|
12929
12954
|
}
|
|
12930
|
-
class SharedUsedExportsOptimizerPlugin extends
|
|
12955
|
+
class SharedUsedExportsOptimizerPlugin extends base_RspackBuiltinPlugin {
|
|
12931
12956
|
name = binding_namespaceObject.BuiltinPluginName.SharedUsedExportsOptimizerPlugin;
|
|
12932
12957
|
sharedOptions;
|
|
12933
12958
|
injectTreeShakingUsedExports;
|
|
@@ -12949,7 +12974,7 @@ class SharedUsedExportsOptimizerPlugin extends RspackBuiltinPlugin {
|
|
|
12949
12974
|
};
|
|
12950
12975
|
}
|
|
12951
12976
|
raw() {
|
|
12952
|
-
if (this.sharedOptions.length) return
|
|
12977
|
+
if (this.sharedOptions.length) return base_createBuiltinPlugin(this.name, this.buildOptions());
|
|
12953
12978
|
}
|
|
12954
12979
|
}
|
|
12955
12980
|
let VIRTUAL_ENTRY = './virtual-entry.js', VIRTUAL_ENTRY_NAME = 'virtual-entry';
|
|
@@ -13258,7 +13283,7 @@ function getDefaultEntryRuntime(paths, options, compiler, treeShakingShareFallba
|
|
|
13258
13283
|
].join(';');
|
|
13259
13284
|
return `@module-federation/runtime/rspack.js!=!data:text/javascript,${encodeURIComponent(content)}`;
|
|
13260
13285
|
}
|
|
13261
|
-
class ContainerPlugin extends
|
|
13286
|
+
class ContainerPlugin extends base_RspackBuiltinPlugin {
|
|
13262
13287
|
name = binding_namespaceObject.BuiltinPluginName.ContainerPlugin;
|
|
13263
13288
|
_options;
|
|
13264
13289
|
constructor(options){
|
|
@@ -13302,10 +13327,10 @@ class ContainerPlugin extends RspackBuiltinPlugin {
|
|
|
13302
13327
|
})),
|
|
13303
13328
|
enhanced
|
|
13304
13329
|
};
|
|
13305
|
-
return
|
|
13330
|
+
return base_createBuiltinPlugin(this.name, rawOptions);
|
|
13306
13331
|
}
|
|
13307
13332
|
}
|
|
13308
|
-
class ContainerReferencePlugin extends
|
|
13333
|
+
class ContainerReferencePlugin extends base_RspackBuiltinPlugin {
|
|
13309
13334
|
name = binding_namespaceObject.BuiltinPluginName.ContainerReferencePlugin;
|
|
13310
13335
|
_options;
|
|
13311
13336
|
constructor(options){
|
|
@@ -13337,7 +13362,7 @@ class ContainerReferencePlugin extends RspackBuiltinPlugin {
|
|
|
13337
13362
|
for (let external of config.external){
|
|
13338
13363
|
if (external.startsWith('internal ')) continue;
|
|
13339
13364
|
let request = `webpack/container/reference/${key}${i ? `/fallback-${i}` : ''}`;
|
|
13340
|
-
('module' === remoteType || 'module-import' === remoteType) && external.startsWith('.') ? importExternals[request] = external : remoteExternals[request] = external, i++;
|
|
13365
|
+
('module' === remoteType || 'module-import' === remoteType || 'modern-module' === remoteType) && external.startsWith('.') ? importExternals[request] = external : remoteExternals[request] = external, i++;
|
|
13341
13366
|
}
|
|
13342
13367
|
}
|
|
13343
13368
|
new ExternalsPlugin(remoteType, remoteExternals, !0).apply(compiler), Object.keys(importExternals).length > 0 && new ExternalsPlugin('import', importExternals, !0).apply(compiler), new ShareRuntimePlugin(this._options.enhanced).apply(compiler);
|
|
@@ -13349,7 +13374,7 @@ class ContainerReferencePlugin extends RspackBuiltinPlugin {
|
|
|
13349
13374
|
})),
|
|
13350
13375
|
enhanced: this._options.enhanced
|
|
13351
13376
|
};
|
|
13352
|
-
return
|
|
13377
|
+
return base_createBuiltinPlugin(this.name, rawOptions);
|
|
13353
13378
|
}
|
|
13354
13379
|
}
|
|
13355
13380
|
async function minify(source, options) {
|
|
@@ -13360,7 +13385,7 @@ async function transform(source, options) {
|
|
|
13360
13385
|
let _options = JSON.stringify(options || {});
|
|
13361
13386
|
return binding_default().transform(source, _options);
|
|
13362
13387
|
}
|
|
13363
|
-
let exports_rspackVersion = "2.0.
|
|
13388
|
+
let exports_rspackVersion = "2.0.4", exports_version = "5.75.0", exports_WebpackError = Error, exports_config = {
|
|
13364
13389
|
getNormalizedRspackOptions: getNormalizedRspackOptions,
|
|
13365
13390
|
applyRspackOptionsDefaults: applyRspackOptionsDefaults,
|
|
13366
13391
|
getNormalizedWebpackOptions: getNormalizedRspackOptions,
|