@rspack/core 1.3.0-beta.0 → 1.3.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ChunkGraph.d.ts +1 -1
- package/dist/Watching.d.ts +1 -1
- package/dist/builtin-plugin/CircularDependencyRspackPlugin.d.ts +59 -0
- package/dist/builtin-plugin/index.d.ts +2 -1
- package/dist/builtin-plugin/lazy-compilation/middleware.d.ts +4 -0
- package/dist/config/types.d.ts +8 -5
- package/dist/config/zod.d.ts +18 -155
- package/dist/cssExtractLoader.js +1 -1
- package/dist/exports.d.ts +4 -1
- package/dist/index.js +281 -393
- package/dist/stats/statsFactoryUtils.d.ts +8 -8
- package/dist/util/MergeCaller.d.ts +1 -0
- package/hot/lazy-compilation-node.js +5 -1
- package/hot/lazy-compilation-web.js +6 -10
- package/package.json +6 -6
- package/dist/builtin-plugin/lazy-compilation/backend.d.ts +0 -52
- package/dist/builtin-plugin/lazy-compilation/plugin.d.ts +0 -13
package/dist/index.js
CHANGED
@@ -689,27 +689,28 @@ var require_CachedInputFileSystem = __commonJS({
|
|
689
689
|
// src/index.ts
|
690
690
|
var index_exports = {};
|
691
691
|
__export(index_exports, {
|
692
|
-
AsyncDependenciesBlock: () =>
|
692
|
+
AsyncDependenciesBlock: () => import_binding89.AsyncDependenciesBlock,
|
693
693
|
BannerPlugin: () => BannerPlugin,
|
694
|
+
CircularDependencyRspackPlugin: () => CircularDependencyRspackPlugin,
|
694
695
|
Compilation: () => Compilation,
|
695
696
|
Compiler: () => Compiler,
|
696
|
-
ConcatenatedModule: () =>
|
697
|
-
ContextModule: () =>
|
697
|
+
ConcatenatedModule: () => import_binding80.ConcatenatedModule,
|
698
|
+
ContextModule: () => import_binding79.ContextModule,
|
698
699
|
ContextReplacementPlugin: () => ContextReplacementPlugin,
|
699
700
|
CopyRspackPlugin: () => CopyRspackPlugin,
|
700
701
|
CssExtractRspackPlugin: () => CssExtractRspackPlugin,
|
701
702
|
DefinePlugin: () => DefinePlugin,
|
702
|
-
Dependency: () =>
|
703
|
+
Dependency: () => import_binding89.Dependency,
|
703
704
|
DllPlugin: () => DllPlugin,
|
704
705
|
DllReferencePlugin: () => DllReferencePlugin,
|
705
706
|
DynamicEntryPlugin: () => DynamicEntryPlugin,
|
706
|
-
EntryDependency: () =>
|
707
|
+
EntryDependency: () => import_binding89.EntryDependency,
|
707
708
|
EntryOptionPlugin: () => EntryOptionPlugin_default,
|
708
709
|
EntryPlugin: () => EntryPlugin,
|
709
710
|
EnvironmentPlugin: () => EnvironmentPlugin,
|
710
711
|
EvalDevToolModulePlugin: () => EvalDevToolModulePlugin,
|
711
712
|
EvalSourceMapDevToolPlugin: () => EvalSourceMapDevToolPlugin,
|
712
|
-
ExternalModule: () =>
|
713
|
+
ExternalModule: () => import_binding81.ExternalModule,
|
713
714
|
ExternalsPlugin: () => ExternalsPlugin,
|
714
715
|
HotModuleReplacementPlugin: () => HotModuleReplacementPlugin,
|
715
716
|
HtmlRspackPlugin: () => HtmlRspackPlugin,
|
@@ -761,27 +762,28 @@ module.exports = __toCommonJS(index_exports);
|
|
761
762
|
// src/exports.ts
|
762
763
|
var exports_exports = {};
|
763
764
|
__export(exports_exports, {
|
764
|
-
AsyncDependenciesBlock: () =>
|
765
|
+
AsyncDependenciesBlock: () => import_binding89.AsyncDependenciesBlock,
|
765
766
|
BannerPlugin: () => BannerPlugin,
|
767
|
+
CircularDependencyRspackPlugin: () => CircularDependencyRspackPlugin,
|
766
768
|
Compilation: () => Compilation,
|
767
769
|
Compiler: () => Compiler,
|
768
|
-
ConcatenatedModule: () =>
|
769
|
-
ContextModule: () =>
|
770
|
+
ConcatenatedModule: () => import_binding80.ConcatenatedModule,
|
771
|
+
ContextModule: () => import_binding79.ContextModule,
|
770
772
|
ContextReplacementPlugin: () => ContextReplacementPlugin,
|
771
773
|
CopyRspackPlugin: () => CopyRspackPlugin,
|
772
774
|
CssExtractRspackPlugin: () => CssExtractRspackPlugin,
|
773
775
|
DefinePlugin: () => DefinePlugin,
|
774
|
-
Dependency: () =>
|
776
|
+
Dependency: () => import_binding89.Dependency,
|
775
777
|
DllPlugin: () => DllPlugin,
|
776
778
|
DllReferencePlugin: () => DllReferencePlugin,
|
777
779
|
DynamicEntryPlugin: () => DynamicEntryPlugin,
|
778
|
-
EntryDependency: () =>
|
780
|
+
EntryDependency: () => import_binding89.EntryDependency,
|
779
781
|
EntryOptionPlugin: () => EntryOptionPlugin_default,
|
780
782
|
EntryPlugin: () => EntryPlugin,
|
781
783
|
EnvironmentPlugin: () => EnvironmentPlugin,
|
782
784
|
EvalDevToolModulePlugin: () => EvalDevToolModulePlugin,
|
783
785
|
EvalSourceMapDevToolPlugin: () => EvalSourceMapDevToolPlugin,
|
784
|
-
ExternalModule: () =>
|
786
|
+
ExternalModule: () => import_binding81.ExternalModule,
|
785
787
|
ExternalsPlugin: () => ExternalsPlugin,
|
786
788
|
HotModuleReplacementPlugin: () => HotModuleReplacementPlugin,
|
787
789
|
HtmlRspackPlugin: () => HtmlRspackPlugin,
|
@@ -2471,6 +2473,9 @@ var MergeCaller = class {
|
|
2471
2473
|
};
|
2472
2474
|
this.callFn = fn2;
|
2473
2475
|
}
|
2476
|
+
pendingData() {
|
2477
|
+
return this.callArgs;
|
2478
|
+
}
|
2474
2479
|
push(...data) {
|
2475
2480
|
if (this.callArgs.length === 0) {
|
2476
2481
|
queueMicrotask(this.finalCall);
|
@@ -2484,13 +2489,13 @@ function createFakeCompilationDependencies(getDeps, addDeps) {
|
|
2484
2489
|
const addDepsCaller = new MergeCaller(addDeps);
|
2485
2490
|
return {
|
2486
2491
|
*[Symbol.iterator]() {
|
2487
|
-
const deps = getDeps();
|
2492
|
+
const deps = /* @__PURE__ */ new Set([...getDeps(), ...addDepsCaller.pendingData()]);
|
2488
2493
|
for (const dep of deps) {
|
2489
2494
|
yield dep;
|
2490
2495
|
}
|
2491
2496
|
},
|
2492
2497
|
has(dep) {
|
2493
|
-
return getDeps().includes(dep);
|
2498
|
+
return addDepsCaller.pendingData().includes(dep) || getDeps().includes(dep);
|
2494
2499
|
},
|
2495
2500
|
add: (dep) => {
|
2496
2501
|
addDepsCaller.push(dep);
|
@@ -6954,26 +6959,45 @@ var BundlerInfoRspackPlugin = create2(
|
|
6954
6959
|
}
|
6955
6960
|
);
|
6956
6961
|
|
6957
|
-
// src/builtin-plugin/
|
6962
|
+
// src/builtin-plugin/CircularDependencyRspackPlugin.ts
|
6958
6963
|
var import_binding11 = require("@rspack/binding");
|
6964
|
+
var CircularDependencyRspackPlugin = create2(
|
6965
|
+
import_binding11.BuiltinPluginName.CircularDependencyRspackPlugin,
|
6966
|
+
(options) => {
|
6967
|
+
return {
|
6968
|
+
allowAsyncCycles: options.allowAsyncCycles,
|
6969
|
+
failOnError: options.failOnError,
|
6970
|
+
exclude: options.exclude,
|
6971
|
+
ignoredConnections: options.ignoredConnections,
|
6972
|
+
onDetected: options.onDetected,
|
6973
|
+
onIgnored: options.onIgnored,
|
6974
|
+
onStart: options.onStart,
|
6975
|
+
onEnd: options.onEnd
|
6976
|
+
};
|
6977
|
+
},
|
6978
|
+
"compilation"
|
6979
|
+
);
|
6980
|
+
|
6981
|
+
// src/builtin-plugin/ChunkPrefetchPreloadPlugin.ts
|
6982
|
+
var import_binding12 = require("@rspack/binding");
|
6959
6983
|
var ChunkPrefetchPreloadPlugin = create2(
|
6960
|
-
|
6984
|
+
import_binding12.BuiltinPluginName.ChunkPrefetchPreloadPlugin,
|
6961
6985
|
() => {
|
6962
6986
|
}
|
6963
6987
|
);
|
6964
6988
|
|
6965
6989
|
// src/builtin-plugin/CommonJsChunkFormatPlugin.ts
|
6966
|
-
var
|
6990
|
+
var import_binding13 = require("@rspack/binding");
|
6967
6991
|
var CommonJsChunkFormatPlugin = create2(
|
6968
|
-
|
6992
|
+
import_binding13.BuiltinPluginName.CommonJsChunkFormatPlugin,
|
6969
6993
|
() => {
|
6970
6994
|
}
|
6971
6995
|
);
|
6972
6996
|
|
6973
6997
|
// src/builtin-plugin/CopyRspackPlugin.ts
|
6974
|
-
var
|
6998
|
+
var import_binding14 = require("@rspack/binding");
|
6975
6999
|
var CopyRspackPlugin = create2(
|
6976
|
-
|
7000
|
+
import_binding14.BuiltinPluginName.CopyRspackPlugin,
|
6977
7001
|
(copy) => {
|
6978
7002
|
const ret = {
|
6979
7003
|
patterns: []
|
@@ -6994,7 +7018,7 @@ var CopyRspackPlugin = create2(
|
|
6994
7018
|
);
|
6995
7019
|
|
6996
7020
|
// src/builtin-plugin/css-extract/index.ts
|
6997
|
-
var
|
7021
|
+
var import_binding15 = require("@rspack/binding");
|
6998
7022
|
var import_node_path5 = require("path");
|
6999
7023
|
|
7000
7024
|
// src/builtin-plugin/css-extract/loader.ts
|
@@ -7030,7 +7054,7 @@ var CssExtractRspackPlugin = class {
|
|
7030
7054
|
this.options.pathinfo = true;
|
7031
7055
|
}
|
7032
7056
|
compiler.__internal__registerBuiltinPlugin({
|
7033
|
-
name:
|
7057
|
+
name: import_binding15.BuiltinPluginName.CssExtractRspackPlugin,
|
7034
7058
|
options: this.normalizeOptions(this.options)
|
7035
7059
|
});
|
7036
7060
|
}
|
@@ -7089,27 +7113,27 @@ CssExtractRspackPlugin.pluginName = PLUGIN_NAME;
|
|
7089
7113
|
CssExtractRspackPlugin.loader = LOADER_PATH;
|
7090
7114
|
|
7091
7115
|
// src/builtin-plugin/CssModulesPlugin.ts
|
7092
|
-
var
|
7116
|
+
var import_binding16 = require("@rspack/binding");
|
7093
7117
|
var CssModulesPlugin = create2(
|
7094
|
-
|
7118
|
+
import_binding16.BuiltinPluginName.CssModulesPlugin,
|
7095
7119
|
() => {
|
7096
7120
|
},
|
7097
7121
|
"compilation"
|
7098
7122
|
);
|
7099
7123
|
|
7100
7124
|
// src/builtin-plugin/DataUriPlugin.ts
|
7101
|
-
var
|
7125
|
+
var import_binding17 = require("@rspack/binding");
|
7102
7126
|
var DataUriPlugin = create2(
|
7103
|
-
|
7127
|
+
import_binding17.BuiltinPluginName.DataUriPlugin,
|
7104
7128
|
() => {
|
7105
7129
|
},
|
7106
7130
|
"compilation"
|
7107
7131
|
);
|
7108
7132
|
|
7109
7133
|
// src/builtin-plugin/DefinePlugin.ts
|
7110
|
-
var
|
7134
|
+
var import_binding18 = require("@rspack/binding");
|
7111
7135
|
var DefinePlugin = create2(
|
7112
|
-
|
7136
|
+
import_binding18.BuiltinPluginName.DefinePlugin,
|
7113
7137
|
function(define) {
|
7114
7138
|
var _a;
|
7115
7139
|
const supportsBigIntLiteral = ((_a = this.options.output.environment) == null ? void 0 : _a.bigIntLiteral) ?? false;
|
@@ -7153,11 +7177,11 @@ var normalizeValue = (define, supportsBigIntLiteral) => {
|
|
7153
7177
|
};
|
7154
7178
|
|
7155
7179
|
// src/builtin-plugin/DeterministicChunkIdsPlugin.ts
|
7156
|
-
var
|
7180
|
+
var import_binding19 = require("@rspack/binding");
|
7157
7181
|
var DeterministicChunkIdsPlugin = class extends RspackBuiltinPlugin {
|
7158
7182
|
constructor() {
|
7159
7183
|
super(...arguments);
|
7160
|
-
this.name =
|
7184
|
+
this.name = import_binding19.BuiltinPluginName.DeterministicChunkIdsPlugin;
|
7161
7185
|
this.affectedHooks = "compilation";
|
7162
7186
|
}
|
7163
7187
|
raw(compiler) {
|
@@ -7176,11 +7200,11 @@ var DeterministicChunkIdsPlugin = class extends RspackBuiltinPlugin {
|
|
7176
7200
|
};
|
7177
7201
|
|
7178
7202
|
// src/builtin-plugin/DeterministicModuleIdsPlugin.ts
|
7179
|
-
var
|
7203
|
+
var import_binding20 = require("@rspack/binding");
|
7180
7204
|
var DeterministicModuleIdsPlugin = class extends RspackBuiltinPlugin {
|
7181
7205
|
constructor() {
|
7182
7206
|
super(...arguments);
|
7183
|
-
this.name =
|
7207
|
+
this.name = import_binding20.BuiltinPluginName.DeterministicModuleIdsPlugin;
|
7184
7208
|
this.affectedHooks = "compilation";
|
7185
7209
|
}
|
7186
7210
|
raw(compiler) {
|
@@ -7199,7 +7223,7 @@ var DeterministicModuleIdsPlugin = class extends RspackBuiltinPlugin {
|
|
7199
7223
|
};
|
7200
7224
|
|
7201
7225
|
// src/builtin-plugin/DynamicEntryPlugin.ts
|
7202
|
-
var
|
7226
|
+
var import_binding22 = require("@rspack/binding");
|
7203
7227
|
|
7204
7228
|
// src/lib/EntryOptionPlugin.ts
|
7205
7229
|
var import_node_assert4 = __toESM(require("assert"));
|
@@ -7272,9 +7296,9 @@ var EntryOptionPlugin = class _EntryOptionPlugin {
|
|
7272
7296
|
var EntryOptionPlugin_default = EntryOptionPlugin;
|
7273
7297
|
|
7274
7298
|
// src/builtin-plugin/EntryPlugin.ts
|
7275
|
-
var
|
7299
|
+
var import_binding21 = require("@rspack/binding");
|
7276
7300
|
var OriginEntryPlugin = create2(
|
7277
|
-
|
7301
|
+
import_binding21.BuiltinPluginName.EntryPlugin,
|
7278
7302
|
(context2, entry2, options = "") => {
|
7279
7303
|
const entryOptions = typeof options === "string" ? { name: options } : options;
|
7280
7304
|
return {
|
@@ -7286,7 +7310,7 @@ var OriginEntryPlugin = create2(
|
|
7286
7310
|
"make"
|
7287
7311
|
);
|
7288
7312
|
var EntryPlugin = OriginEntryPlugin;
|
7289
|
-
EntryPlugin.createDependency = (request) => new
|
7313
|
+
EntryPlugin.createDependency = (request) => new import_binding21.EntryDependency(request);
|
7290
7314
|
function getRawEntryOptions(entry2) {
|
7291
7315
|
const runtime = entry2.runtime;
|
7292
7316
|
const chunkLoading2 = entry2.chunkLoading;
|
@@ -7310,7 +7334,7 @@ var DynamicEntryPlugin = class extends RspackBuiltinPlugin {
|
|
7310
7334
|
super();
|
7311
7335
|
this.context = context2;
|
7312
7336
|
this.entry = entry2;
|
7313
|
-
this.name =
|
7337
|
+
this.name = import_binding22.BuiltinPluginName.DynamicEntryPlugin;
|
7314
7338
|
this.affectedHooks = "make";
|
7315
7339
|
}
|
7316
7340
|
raw(compiler) {
|
@@ -7336,16 +7360,16 @@ var DynamicEntryPlugin = class extends RspackBuiltinPlugin {
|
|
7336
7360
|
};
|
7337
7361
|
|
7338
7362
|
// src/builtin-plugin/ElectronTargetPlugin.ts
|
7339
|
-
var
|
7363
|
+
var import_binding23 = require("@rspack/binding");
|
7340
7364
|
var ElectronTargetPlugin = create2(
|
7341
|
-
|
7365
|
+
import_binding23.BuiltinPluginName.ElectronTargetPlugin,
|
7342
7366
|
(context2) => context2 ?? "none"
|
7343
7367
|
);
|
7344
7368
|
|
7345
7369
|
// src/builtin-plugin/EnableChunkLoadingPlugin.ts
|
7346
|
-
var
|
7370
|
+
var import_binding24 = require("@rspack/binding");
|
7347
7371
|
var EnableChunkLoadingPluginInner = create2(
|
7348
|
-
|
7372
|
+
import_binding24.BuiltinPluginName.EnableChunkLoadingPlugin,
|
7349
7373
|
(type) => type
|
7350
7374
|
);
|
7351
7375
|
var enabledTypes = /* @__PURE__ */ new WeakMap();
|
@@ -7399,7 +7423,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
7399
7423
|
};
|
7400
7424
|
|
7401
7425
|
// src/builtin-plugin/EnableLibraryPlugin.ts
|
7402
|
-
var
|
7426
|
+
var import_binding25 = require("@rspack/binding");
|
7403
7427
|
var enabledTypes2 = /* @__PURE__ */ new WeakMap();
|
7404
7428
|
var getEnabledTypes2 = (compiler) => {
|
7405
7429
|
let set = enabledTypes2.get(compiler);
|
@@ -7413,7 +7437,7 @@ var EnableLibraryPlugin = class extends RspackBuiltinPlugin {
|
|
7413
7437
|
constructor(type) {
|
7414
7438
|
super();
|
7415
7439
|
this.type = type;
|
7416
|
-
this.name =
|
7440
|
+
this.name = import_binding25.BuiltinPluginName.EnableLibraryPlugin;
|
7417
7441
|
}
|
7418
7442
|
static setEnabled(compiler, type) {
|
7419
7443
|
getEnabledTypes2(compiler).add(type);
|
@@ -7435,32 +7459,32 @@ var EnableLibraryPlugin = class extends RspackBuiltinPlugin {
|
|
7435
7459
|
};
|
7436
7460
|
|
7437
7461
|
// src/builtin-plugin/EnableWasmLoadingPlugin.ts
|
7438
|
-
var
|
7462
|
+
var import_binding26 = require("@rspack/binding");
|
7439
7463
|
var EnableWasmLoadingPlugin = create2(
|
7440
|
-
|
7464
|
+
import_binding26.BuiltinPluginName.EnableWasmLoadingPlugin,
|
7441
7465
|
(type) => type
|
7442
7466
|
);
|
7443
7467
|
|
7444
7468
|
// src/builtin-plugin/EnsureChunkConditionsPlugin.ts
|
7445
|
-
var
|
7469
|
+
var import_binding27 = require("@rspack/binding");
|
7446
7470
|
var EnsureChunkConditionsPlugin = create2(
|
7447
|
-
|
7471
|
+
import_binding27.BuiltinPluginName.EnsureChunkConditionsPlugin,
|
7448
7472
|
() => {
|
7449
7473
|
}
|
7450
7474
|
);
|
7451
7475
|
|
7452
7476
|
// src/builtin-plugin/EvalDevToolModulePlugin.ts
|
7453
|
-
var
|
7477
|
+
var import_binding28 = require("@rspack/binding");
|
7454
7478
|
var EvalDevToolModulePlugin = create2(
|
7455
|
-
|
7479
|
+
import_binding28.BuiltinPluginName.EvalDevToolModulePlugin,
|
7456
7480
|
(options) => options,
|
7457
7481
|
"compilation"
|
7458
7482
|
);
|
7459
7483
|
|
7460
7484
|
// src/builtin-plugin/EvalSourceMapDevToolPlugin.ts
|
7461
|
-
var
|
7485
|
+
var import_binding29 = require("@rspack/binding");
|
7462
7486
|
var EvalSourceMapDevToolPlugin = create2(
|
7463
|
-
|
7487
|
+
import_binding29.BuiltinPluginName.EvalSourceMapDevToolPlugin,
|
7464
7488
|
(options) => {
|
7465
7489
|
return {
|
7466
7490
|
filename: options.filename || void 0,
|
@@ -7476,13 +7500,13 @@ var EvalSourceMapDevToolPlugin = create2(
|
|
7476
7500
|
);
|
7477
7501
|
|
7478
7502
|
// src/builtin-plugin/ExternalsPlugin.ts
|
7479
|
-
var
|
7503
|
+
var import_binding30 = require("@rspack/binding");
|
7480
7504
|
var ExternalsPlugin = class extends RspackBuiltinPlugin {
|
7481
7505
|
constructor(type, externals2) {
|
7482
7506
|
super();
|
7483
7507
|
this.type = type;
|
7484
7508
|
this.externals = externals2;
|
7485
|
-
this.name =
|
7509
|
+
this.name = import_binding30.BuiltinPluginName.ExternalsPlugin;
|
7486
7510
|
}
|
7487
7511
|
raw(compiler) {
|
7488
7512
|
const { type, externals: externals2 } = this;
|
@@ -7591,30 +7615,30 @@ function getRawExternalItemValue(value) {
|
|
7591
7615
|
}
|
7592
7616
|
|
7593
7617
|
// src/builtin-plugin/FileUriPlugin.ts
|
7594
|
-
var
|
7618
|
+
var import_binding31 = require("@rspack/binding");
|
7595
7619
|
var FileUriPlugin = create2(
|
7596
|
-
|
7620
|
+
import_binding31.BuiltinPluginName.FileUriPlugin,
|
7597
7621
|
() => {
|
7598
7622
|
},
|
7599
7623
|
"compilation"
|
7600
7624
|
);
|
7601
7625
|
|
7602
7626
|
// src/builtin-plugin/FlagDependencyExportsPlugin.ts
|
7603
|
-
var
|
7627
|
+
var import_binding32 = require("@rspack/binding");
|
7604
7628
|
var FlagDependencyExportsPlugin = create2(
|
7605
|
-
|
7629
|
+
import_binding32.BuiltinPluginName.FlagDependencyExportsPlugin,
|
7606
7630
|
() => {
|
7607
7631
|
},
|
7608
7632
|
"compilation"
|
7609
7633
|
);
|
7610
7634
|
|
7611
7635
|
// src/builtin-plugin/FlagDependencyUsagePlugin.ts
|
7612
|
-
var
|
7636
|
+
var import_binding33 = require("@rspack/binding");
|
7613
7637
|
var FlagDependencyUsagePlugin = class extends RspackBuiltinPlugin {
|
7614
7638
|
constructor(global) {
|
7615
7639
|
super();
|
7616
7640
|
this.global = global;
|
7617
|
-
this.name =
|
7641
|
+
this.name = import_binding33.BuiltinPluginName.FlagDependencyUsagePlugin;
|
7618
7642
|
this.affectedHooks = "compilation";
|
7619
7643
|
}
|
7620
7644
|
raw(compiler) {
|
@@ -7645,11 +7669,11 @@ var FlagDependencyUsagePlugin = class extends RspackBuiltinPlugin {
|
|
7645
7669
|
};
|
7646
7670
|
|
7647
7671
|
// src/builtin-plugin/HotModuleReplacementPlugin.ts
|
7648
|
-
var
|
7672
|
+
var import_binding34 = require("@rspack/binding");
|
7649
7673
|
var HotModuleReplacementPlugin = class extends RspackBuiltinPlugin {
|
7650
7674
|
constructor() {
|
7651
7675
|
super(...arguments);
|
7652
|
-
this.name =
|
7676
|
+
this.name = import_binding34.BuiltinPluginName.HotModuleReplacementPlugin;
|
7653
7677
|
}
|
7654
7678
|
raw(compiler) {
|
7655
7679
|
if (compiler.options.output.strictModuleErrorHandling === void 0) {
|
@@ -7662,7 +7686,7 @@ var HotModuleReplacementPlugin = class extends RspackBuiltinPlugin {
|
|
7662
7686
|
// src/builtin-plugin/html-plugin/plugin.ts
|
7663
7687
|
var import_node_fs = __toESM(require("fs"));
|
7664
7688
|
var import_node_path6 = __toESM(require("path"));
|
7665
|
-
var
|
7689
|
+
var import_binding35 = require("@rspack/binding");
|
7666
7690
|
|
7667
7691
|
// src/builtin-plugin/html-plugin/hooks.ts
|
7668
7692
|
var liteTapable5 = __toESM(require("@rspack/lite-tapable"));
|
@@ -8004,7 +8028,7 @@ var cleanPluginOptions = (compilation) => {
|
|
8004
8028
|
|
8005
8029
|
// src/builtin-plugin/html-plugin/plugin.ts
|
8006
8030
|
var HtmlRspackPluginImpl = create2(
|
8007
|
-
|
8031
|
+
import_binding35.BuiltinPluginName.HtmlRspackPlugin,
|
8008
8032
|
function(c = {}) {
|
8009
8033
|
validateHtmlPluginOptions(c);
|
8010
8034
|
const meta = {};
|
@@ -8211,9 +8235,9 @@ HtmlRspackPlugin.getHooks = HtmlRspackPlugin.getCompilationHooks = getPluginHook
|
|
8211
8235
|
HtmlRspackPlugin.version = 5;
|
8212
8236
|
|
8213
8237
|
// src/builtin-plugin/HttpExternalsRspackPlugin.ts
|
8214
|
-
var
|
8238
|
+
var import_binding36 = require("@rspack/binding");
|
8215
8239
|
var HttpExternalsRspackPlugin = create2(
|
8216
|
-
|
8240
|
+
import_binding36.BuiltinPluginName.HttpExternalsRspackPlugin,
|
8217
8241
|
(css, webAsync) => {
|
8218
8242
|
return {
|
8219
8243
|
css,
|
@@ -8223,7 +8247,7 @@ var HttpExternalsRspackPlugin = create2(
|
|
8223
8247
|
);
|
8224
8248
|
|
8225
8249
|
// src/builtin-plugin/IgnorePlugin.ts
|
8226
|
-
var
|
8250
|
+
var import_binding37 = require("@rspack/binding");
|
8227
8251
|
var import_zod2 = require("../compiled/zod/index.js");
|
8228
8252
|
var IgnorePluginOptions = import_zod2.z.union([
|
8229
8253
|
import_zod2.z.object({
|
@@ -8235,7 +8259,7 @@ var IgnorePluginOptions = import_zod2.z.union([
|
|
8235
8259
|
})
|
8236
8260
|
]);
|
8237
8261
|
var IgnorePlugin = create2(
|
8238
|
-
|
8262
|
+
import_binding37.BuiltinPluginName.IgnorePlugin,
|
8239
8263
|
(options) => {
|
8240
8264
|
validate(options, IgnorePluginOptions);
|
8241
8265
|
return options;
|
@@ -8243,22 +8267,22 @@ var IgnorePlugin = create2(
|
|
8243
8267
|
);
|
8244
8268
|
|
8245
8269
|
// src/builtin-plugin/InferAsyncModulesPlugin.ts
|
8246
|
-
var
|
8270
|
+
var import_binding38 = require("@rspack/binding");
|
8247
8271
|
var InferAsyncModulesPlugin = create2(
|
8248
|
-
|
8272
|
+
import_binding38.BuiltinPluginName.InferAsyncModulesPlugin,
|
8249
8273
|
() => {
|
8250
8274
|
},
|
8251
8275
|
"compilation"
|
8252
8276
|
);
|
8253
8277
|
|
8254
8278
|
// src/builtin-plugin/JavascriptModulesPlugin.ts
|
8255
|
-
var
|
8279
|
+
var import_binding39 = require("@rspack/binding");
|
8256
8280
|
var liteTapable6 = __toESM(require("@rspack/lite-tapable"));
|
8257
8281
|
var compilationHooksMap3 = /* @__PURE__ */ new WeakMap();
|
8258
8282
|
var JavascriptModulesPlugin = class extends RspackBuiltinPlugin {
|
8259
8283
|
constructor() {
|
8260
8284
|
super(...arguments);
|
8261
|
-
this.name =
|
8285
|
+
this.name = import_binding39.BuiltinPluginName.JavascriptModulesPlugin;
|
8262
8286
|
this.affectedHooks = "compilation";
|
8263
8287
|
}
|
8264
8288
|
raw() {
|
@@ -8282,233 +8306,124 @@ var JavascriptModulesPlugin = class extends RspackBuiltinPlugin {
|
|
8282
8306
|
};
|
8283
8307
|
|
8284
8308
|
// src/builtin-plugin/JsLoaderRspackPlugin.ts
|
8285
|
-
var
|
8309
|
+
var import_binding40 = require("@rspack/binding");
|
8286
8310
|
var JsLoaderRspackPlugin = create2(
|
8287
|
-
|
8311
|
+
import_binding40.BuiltinPluginName.JsLoaderRspackPlugin,
|
8288
8312
|
(compiler) => runLoaders.bind(null, compiler),
|
8289
8313
|
/* Not Inheretable */
|
8290
8314
|
"thisCompilation"
|
8291
8315
|
);
|
8292
8316
|
|
8293
8317
|
// src/builtin-plugin/JsonModulesPlugin.ts
|
8294
|
-
var
|
8318
|
+
var import_binding41 = require("@rspack/binding");
|
8295
8319
|
var JsonModulesPlugin = create2(
|
8296
|
-
|
8320
|
+
import_binding41.BuiltinPluginName.JsonModulesPlugin,
|
8297
8321
|
() => {
|
8298
8322
|
},
|
8299
8323
|
"compilation"
|
8300
8324
|
);
|
8301
8325
|
|
8302
|
-
// src/builtin-plugin/lazy-compilation/backend.ts
|
8303
|
-
var getBackend = (options) => {
|
8304
|
-
const state = {
|
8305
|
-
module: unimplemented,
|
8306
|
-
dispose: unimplemented
|
8307
|
-
};
|
8308
|
-
return {
|
8309
|
-
state,
|
8310
|
-
backend: (compiler, callback) => {
|
8311
|
-
const logger = compiler.getInfrastructureLogger("LazyCompilationBackend");
|
8312
|
-
const activeModules = /* @__PURE__ */ new Map();
|
8313
|
-
const filesByKey = /* @__PURE__ */ new Map();
|
8314
|
-
const prefix = "/lazy-compilation-using-";
|
8315
|
-
const isHttps = options.protocol === "https" || typeof options.server === "object" && ("key" in options.server || "pfx" in options.server);
|
8316
|
-
const createServer = typeof options.server === "function" ? options.server : (() => {
|
8317
|
-
const http = isHttps ? require("https") : require("http");
|
8318
|
-
return http.createServer.bind(http, options.server);
|
8319
|
-
})();
|
8320
|
-
const listen = typeof options.listen === "function" ? options.listen : typeof options.server === "function" && !options.listen ? (
|
8321
|
-
// if user offers custom server, no need to listen
|
8322
|
-
() => {
|
8323
|
-
}
|
8324
|
-
) : (server2) => {
|
8325
|
-
let { listen: listen2 } = options;
|
8326
|
-
if (typeof listen2 === "object" && !("port" in listen2))
|
8327
|
-
listen2 = { ...listen2, port: void 0 };
|
8328
|
-
server2.listen(listen2);
|
8329
|
-
};
|
8330
|
-
const protocol = options.protocol || (isHttps ? "https" : "http");
|
8331
|
-
const requestListener = (req, res) => {
|
8332
|
-
var _a;
|
8333
|
-
if (!((_a = req.url) == null ? void 0 : _a.startsWith(prefix))) {
|
8334
|
-
return;
|
8335
|
-
}
|
8336
|
-
const keys = req.url.slice(prefix.length).split("@");
|
8337
|
-
req.socket.on("close", () => {
|
8338
|
-
setTimeout(() => {
|
8339
|
-
for (const key of keys) {
|
8340
|
-
const oldValue = activeModules.get(key) || 0;
|
8341
|
-
activeModules.set(key, oldValue - 1);
|
8342
|
-
if (oldValue === 1) {
|
8343
|
-
logger.log(
|
8344
|
-
`${key} is no longer in use. Next compilation will skip this module.`
|
8345
|
-
);
|
8346
|
-
}
|
8347
|
-
}
|
8348
|
-
}, 12e4);
|
8349
|
-
});
|
8350
|
-
req.socket.setNoDelay(true);
|
8351
|
-
res.writeHead(200, {
|
8352
|
-
"content-type": "text/event-stream",
|
8353
|
-
"Access-Control-Allow-Origin": "*",
|
8354
|
-
"Access-Control-Allow-Methods": "*",
|
8355
|
-
"Access-Control-Allow-Headers": "*"
|
8356
|
-
});
|
8357
|
-
res.write("\n");
|
8358
|
-
const moduleActivated = [];
|
8359
|
-
for (const key of keys) {
|
8360
|
-
const oldValue = activeModules.get(key) || 0;
|
8361
|
-
activeModules.set(key, oldValue + 1);
|
8362
|
-
if (oldValue === 0) {
|
8363
|
-
logger.log(`${key} is now in use and will be compiled.`);
|
8364
|
-
moduleActivated.push(key);
|
8365
|
-
}
|
8366
|
-
}
|
8367
|
-
if (moduleActivated.length && compiler.watching) {
|
8368
|
-
compiler.watching.lazyCompilationInvalidate(
|
8369
|
-
new Set(moduleActivated.map((key) => filesByKey.get(key)))
|
8370
|
-
);
|
8371
|
-
}
|
8372
|
-
};
|
8373
|
-
const server = createServer();
|
8374
|
-
server.on("request", requestListener);
|
8375
|
-
let isClosing = false;
|
8376
|
-
const sockets = /* @__PURE__ */ new Set();
|
8377
|
-
server.on("connection", (socket) => {
|
8378
|
-
sockets.add(socket);
|
8379
|
-
socket.on("close", () => {
|
8380
|
-
sockets.delete(socket);
|
8381
|
-
});
|
8382
|
-
if (isClosing) socket.destroy();
|
8383
|
-
});
|
8384
|
-
server.on("listening", (err) => {
|
8385
|
-
if (err) return callback(err);
|
8386
|
-
const addr = server.address();
|
8387
|
-
if (typeof addr === "string")
|
8388
|
-
throw new Error("addr must not be a string");
|
8389
|
-
const urlBase = addr.address === "::" || addr.address === "0.0.0.0" ? `${protocol}://localhost:${addr.port}` : addr.family === "IPv6" ? `${protocol}://[${addr.address}]:${addr.port}` : `${protocol}://${addr.address}:${addr.port}`;
|
8390
|
-
logger.log(
|
8391
|
-
`Server-Sent-Events server for lazy compilation open at ${urlBase}.`
|
8392
|
-
);
|
8393
|
-
const result2 = {
|
8394
|
-
dispose(callback2) {
|
8395
|
-
isClosing = true;
|
8396
|
-
server.off("request", requestListener);
|
8397
|
-
server.close((err2) => {
|
8398
|
-
callback2(err2);
|
8399
|
-
});
|
8400
|
-
for (const socket of sockets) {
|
8401
|
-
socket.destroy(new Error("Server is disposing"));
|
8402
|
-
}
|
8403
|
-
},
|
8404
|
-
module({
|
8405
|
-
module: originalModule,
|
8406
|
-
path: path11
|
8407
|
-
}) {
|
8408
|
-
const key = `${encodeURIComponent(
|
8409
|
-
originalModule.replace(/\\/g, "/").replace(/@/g, "_")
|
8410
|
-
).replace(/%(2F|3A|24|26|2B|2C|3B|3D|3A)/g, decodeURIComponent)}`;
|
8411
|
-
filesByKey.set(key, path11);
|
8412
|
-
const active = activeModules.get(key) > 0;
|
8413
|
-
return {
|
8414
|
-
client: `${options.client}?${encodeURIComponent(urlBase + prefix)}`,
|
8415
|
-
data: key,
|
8416
|
-
active
|
8417
|
-
};
|
8418
|
-
}
|
8419
|
-
};
|
8420
|
-
state.module = result2.module;
|
8421
|
-
state.dispose = result2.dispose;
|
8422
|
-
callback(null, result2);
|
8423
|
-
});
|
8424
|
-
listen(server);
|
8425
|
-
}
|
8426
|
-
};
|
8427
|
-
};
|
8428
|
-
var backend_default = getBackend;
|
8429
|
-
function unimplemented() {
|
8430
|
-
throw new Error("access before initialization");
|
8431
|
-
}
|
8432
|
-
|
8433
8326
|
// src/builtin-plugin/lazy-compilation/lazyCompilation.ts
|
8434
|
-
var
|
8327
|
+
var import_binding42 = require("@rspack/binding");
|
8435
8328
|
var BuiltinLazyCompilationPlugin = create2(
|
8436
|
-
|
8329
|
+
import_binding42.BuiltinPluginName.LazyCompilationPlugin,
|
8437
8330
|
(module2, cacheable, entries, imports, test) => ({ module: module2, cacheable, imports, entries, test }),
|
8438
8331
|
"thisCompilation"
|
8439
8332
|
);
|
8440
8333
|
|
8441
|
-
// src/builtin-plugin/lazy-compilation/
|
8442
|
-
var
|
8443
|
-
|
8444
|
-
|
8445
|
-
|
8446
|
-
|
8447
|
-
|
8448
|
-
|
8449
|
-
|
8450
|
-
|
8451
|
-
|
8452
|
-
|
8453
|
-
|
8454
|
-
|
8455
|
-
|
8456
|
-
|
8457
|
-
|
8458
|
-
|
8459
|
-
|
8460
|
-
|
8461
|
-
|
8462
|
-
|
8463
|
-
|
8464
|
-
|
8465
|
-
|
8466
|
-
|
8467
|
-
|
8468
|
-
|
8469
|
-
|
8470
|
-
|
8471
|
-
|
8472
|
-
|
8473
|
-
|
8474
|
-
|
8475
|
-
(
|
8476
|
-
|
8477
|
-
|
8478
|
-
|
8479
|
-
|
8480
|
-
|
8481
|
-
|
8482
|
-
|
8483
|
-
|
8484
|
-
|
8485
|
-
|
8486
|
-
|
8487
|
-
|
8334
|
+
// src/builtin-plugin/lazy-compilation/middleware.ts
|
8335
|
+
var LAZY_COMPILATION_PREFIX = "/lazy-compilation-using-";
|
8336
|
+
var getDefaultClient = (compiler) => require.resolve(`../hot/lazy-compilation-${compiler.options.externalsPresets.node ? "node" : "web"}.js`);
|
8337
|
+
var noop2 = (_req, _res, next) => {
|
8338
|
+
if (typeof next === "function") {
|
8339
|
+
next();
|
8340
|
+
}
|
8341
|
+
};
|
8342
|
+
var lazyCompilationMiddleware = (compiler, userOptions = {}) => {
|
8343
|
+
if (userOptions === false) {
|
8344
|
+
return noop2;
|
8345
|
+
}
|
8346
|
+
const options = userOptions === true ? {} : userOptions;
|
8347
|
+
const activeModules = /* @__PURE__ */ new Map();
|
8348
|
+
const filesByKey = /* @__PURE__ */ new Map();
|
8349
|
+
new BuiltinLazyCompilationPlugin(
|
8350
|
+
({ module: module2, path: path11 }) => {
|
8351
|
+
const key = encodeURIComponent(
|
8352
|
+
module2.replace(/\\/g, "/").replace(/@/g, "_")
|
8353
|
+
).replace(/%(2F|3A|24|26|2B|2C|3B|3D)/g, decodeURIComponent);
|
8354
|
+
filesByKey.set(key, path11);
|
8355
|
+
const active = activeModules.get(key) === true;
|
8356
|
+
return {
|
8357
|
+
client: `${options.client || getDefaultClient(compiler)}?${encodeURIComponent((options.serverUrl ?? "") + LAZY_COMPILATION_PREFIX)}`,
|
8358
|
+
data: key,
|
8359
|
+
active
|
8360
|
+
};
|
8361
|
+
},
|
8362
|
+
// @ts-expect-error internal option
|
8363
|
+
options.cacheable ?? true,
|
8364
|
+
options.entries ?? true,
|
8365
|
+
options.imports ?? true,
|
8366
|
+
typeof options.test === "function" ? (module2) => {
|
8367
|
+
const test = options.test;
|
8368
|
+
return test(module2);
|
8369
|
+
} : options.test
|
8370
|
+
).apply(compiler);
|
8371
|
+
return lazyCompilationMiddlewareInternal(compiler, activeModules, filesByKey);
|
8372
|
+
};
|
8373
|
+
var lazyCompilationMiddlewareInternal = (compiler, activeModules, filesByKey) => {
|
8374
|
+
const logger = compiler.getInfrastructureLogger("LazyCompilation");
|
8375
|
+
return (req, res, next) => {
|
8376
|
+
var _a;
|
8377
|
+
if (!((_a = req.url) == null ? void 0 : _a.startsWith(LAZY_COMPILATION_PREFIX))) {
|
8378
|
+
return next == null ? void 0 : next();
|
8379
|
+
}
|
8380
|
+
const keys = req.url.slice(LAZY_COMPILATION_PREFIX.length).split("@");
|
8381
|
+
req.socket.setNoDelay(true);
|
8382
|
+
res.setHeader("content-type", "text/event-stream");
|
8383
|
+
res.writeHead(200);
|
8384
|
+
res.write("\n");
|
8385
|
+
const moduleActivated = [];
|
8386
|
+
for (const key of keys) {
|
8387
|
+
const oldValue = activeModules.get(key) ?? false;
|
8388
|
+
activeModules.set(key, true);
|
8389
|
+
if (!oldValue) {
|
8390
|
+
logger.log(`${key} is now in use and will be compiled.`);
|
8391
|
+
moduleActivated.push(key);
|
8392
|
+
}
|
8393
|
+
}
|
8394
|
+
if (moduleActivated.length && compiler.watching) {
|
8395
|
+
const rebuiltModules = new Set(
|
8396
|
+
moduleActivated.map((key) => {
|
8397
|
+
const filePath = filesByKey.get(key);
|
8398
|
+
if (!filePath) {
|
8399
|
+
logger.warn(`Cannot find correct file path for module ${key}`);
|
8400
|
+
}
|
8401
|
+
return filePath;
|
8402
|
+
}).filter(Boolean)
|
8403
|
+
);
|
8404
|
+
if (rebuiltModules.size) {
|
8405
|
+
compiler.watching.invalidateWithChangedFiles(new Set(rebuiltModules));
|
8488
8406
|
}
|
8489
|
-
|
8490
|
-
|
8491
|
-
state.dispose(callback);
|
8492
|
-
});
|
8493
|
-
}
|
8407
|
+
}
|
8408
|
+
};
|
8494
8409
|
};
|
8495
8410
|
|
8496
8411
|
// src/builtin-plugin/LimitChunkCountPlugin.ts
|
8497
|
-
var
|
8412
|
+
var import_binding43 = require("@rspack/binding");
|
8498
8413
|
var LimitChunkCountPlugin = create2(
|
8499
|
-
|
8414
|
+
import_binding43.BuiltinPluginName.LimitChunkCountPlugin,
|
8500
8415
|
(options) => {
|
8501
8416
|
return options;
|
8502
8417
|
}
|
8503
8418
|
);
|
8504
8419
|
|
8505
8420
|
// src/builtin-plugin/MangleExportsPlugin.ts
|
8506
|
-
var
|
8421
|
+
var import_binding44 = require("@rspack/binding");
|
8507
8422
|
var MangleExportsPlugin = class extends RspackBuiltinPlugin {
|
8508
8423
|
constructor(deterministic) {
|
8509
8424
|
super();
|
8510
8425
|
this.deterministic = deterministic;
|
8511
|
-
this.name =
|
8426
|
+
this.name = import_binding44.BuiltinPluginName.MangleExportsPlugin;
|
8512
8427
|
this.affectedHooks = "compilation";
|
8513
8428
|
}
|
8514
8429
|
raw(compiler) {
|
@@ -8539,27 +8454,27 @@ var MangleExportsPlugin = class extends RspackBuiltinPlugin {
|
|
8539
8454
|
};
|
8540
8455
|
|
8541
8456
|
// src/builtin-plugin/MergeDuplicateChunksPlugin.ts
|
8542
|
-
var
|
8457
|
+
var import_binding45 = require("@rspack/binding");
|
8543
8458
|
var MergeDuplicateChunksPlugin = create2(
|
8544
|
-
|
8459
|
+
import_binding45.BuiltinPluginName.MergeDuplicateChunksPlugin,
|
8545
8460
|
() => {
|
8546
8461
|
}
|
8547
8462
|
);
|
8548
8463
|
|
8549
8464
|
// src/builtin-plugin/ModuleChunkFormatPlugin.ts
|
8550
|
-
var
|
8465
|
+
var import_binding46 = require("@rspack/binding");
|
8551
8466
|
var ModuleChunkFormatPlugin = create2(
|
8552
|
-
|
8467
|
+
import_binding46.BuiltinPluginName.ModuleChunkFormatPlugin,
|
8553
8468
|
() => {
|
8554
8469
|
}
|
8555
8470
|
);
|
8556
8471
|
|
8557
8472
|
// src/builtin-plugin/ModuleConcatenationPlugin.ts
|
8558
|
-
var
|
8473
|
+
var import_binding47 = require("@rspack/binding");
|
8559
8474
|
var ModuleConcatenationPlugin = class extends RspackBuiltinPlugin {
|
8560
8475
|
constructor() {
|
8561
8476
|
super(...arguments);
|
8562
|
-
this.name =
|
8477
|
+
this.name = import_binding47.BuiltinPluginName.ModuleConcatenationPlugin;
|
8563
8478
|
this.affectedHooks = "compilation";
|
8564
8479
|
}
|
8565
8480
|
raw(compiler) {
|
@@ -8614,29 +8529,29 @@ var ModuleConcatenationPlugin = class extends RspackBuiltinPlugin {
|
|
8614
8529
|
};
|
8615
8530
|
|
8616
8531
|
// src/builtin-plugin/NamedChunkIdsPlugin.ts
|
8617
|
-
var
|
8532
|
+
var import_binding48 = require("@rspack/binding");
|
8618
8533
|
var NamedChunkIdsPlugin = create2(
|
8619
|
-
|
8534
|
+
import_binding48.BuiltinPluginName.NamedChunkIdsPlugin,
|
8620
8535
|
() => {
|
8621
8536
|
},
|
8622
8537
|
"compilation"
|
8623
8538
|
);
|
8624
8539
|
|
8625
8540
|
// src/builtin-plugin/NamedModuleIdsPlugin.ts
|
8626
|
-
var
|
8541
|
+
var import_binding49 = require("@rspack/binding");
|
8627
8542
|
var NamedModuleIdsPlugin = create2(
|
8628
|
-
|
8543
|
+
import_binding49.BuiltinPluginName.NamedModuleIdsPlugin,
|
8629
8544
|
() => {
|
8630
8545
|
},
|
8631
8546
|
"compilation"
|
8632
8547
|
);
|
8633
8548
|
|
8634
8549
|
// src/builtin-plugin/NaturalChunkIdsPlugin.ts
|
8635
|
-
var
|
8550
|
+
var import_binding50 = require("@rspack/binding");
|
8636
8551
|
var NaturalChunkIdsPlugin = class extends RspackBuiltinPlugin {
|
8637
8552
|
constructor() {
|
8638
8553
|
super(...arguments);
|
8639
|
-
this.name =
|
8554
|
+
this.name = import_binding50.BuiltinPluginName.NaturalChunkIdsPlugin;
|
8640
8555
|
this.affectedHooks = "compilation";
|
8641
8556
|
}
|
8642
8557
|
raw(compiler) {
|
@@ -8655,11 +8570,11 @@ var NaturalChunkIdsPlugin = class extends RspackBuiltinPlugin {
|
|
8655
8570
|
};
|
8656
8571
|
|
8657
8572
|
// src/builtin-plugin/NaturalModuleIdsPlugin.ts
|
8658
|
-
var
|
8573
|
+
var import_binding51 = require("@rspack/binding");
|
8659
8574
|
var NaturalModuleIdsPlugin = class extends RspackBuiltinPlugin {
|
8660
8575
|
constructor() {
|
8661
8576
|
super(...arguments);
|
8662
|
-
this.name =
|
8577
|
+
this.name = import_binding51.BuiltinPluginName.NaturalModuleIdsPlugin;
|
8663
8578
|
this.affectedHooks = "compilation";
|
8664
8579
|
}
|
8665
8580
|
raw(compiler) {
|
@@ -8678,24 +8593,24 @@ var NaturalModuleIdsPlugin = class extends RspackBuiltinPlugin {
|
|
8678
8593
|
};
|
8679
8594
|
|
8680
8595
|
// src/builtin-plugin/NodeTargetPlugin.ts
|
8681
|
-
var
|
8596
|
+
var import_binding52 = require("@rspack/binding");
|
8682
8597
|
var NodeTargetPlugin = create2(
|
8683
|
-
|
8598
|
+
import_binding52.BuiltinPluginName.NodeTargetPlugin,
|
8684
8599
|
() => void 0
|
8685
8600
|
);
|
8686
8601
|
|
8687
8602
|
// src/builtin-plugin/OccurrenceChunkIdsPlugin.ts
|
8688
|
-
var
|
8603
|
+
var import_binding53 = require("@rspack/binding");
|
8689
8604
|
var OccurrenceChunkIdsPlugin = create2(
|
8690
|
-
|
8605
|
+
import_binding53.BuiltinPluginName.OccurrenceChunkIdsPlugin,
|
8691
8606
|
(options) => ({ ...options }),
|
8692
8607
|
"compilation"
|
8693
8608
|
);
|
8694
8609
|
|
8695
8610
|
// src/builtin-plugin/ProgressPlugin.ts
|
8696
|
-
var
|
8611
|
+
var import_binding54 = require("@rspack/binding");
|
8697
8612
|
var ProgressPlugin = create2(
|
8698
|
-
|
8613
|
+
import_binding54.BuiltinPluginName.ProgressPlugin,
|
8699
8614
|
(progress = {}) => {
|
8700
8615
|
if (typeof progress === "function") {
|
8701
8616
|
return {
|
@@ -8709,9 +8624,9 @@ var ProgressPlugin = create2(
|
|
8709
8624
|
);
|
8710
8625
|
|
8711
8626
|
// src/builtin-plugin/ProvidePlugin.ts
|
8712
|
-
var
|
8627
|
+
var import_binding55 = require("@rspack/binding");
|
8713
8628
|
var ProvidePlugin = create2(
|
8714
|
-
|
8629
|
+
import_binding55.BuiltinPluginName.ProvidePlugin,
|
8715
8630
|
(provide) => {
|
8716
8631
|
const entries = Object.entries(provide).map(([key, value]) => {
|
8717
8632
|
if (typeof value === "string") {
|
@@ -8725,27 +8640,27 @@ var ProvidePlugin = create2(
|
|
8725
8640
|
);
|
8726
8641
|
|
8727
8642
|
// src/builtin-plugin/RealContentHashPlugin.ts
|
8728
|
-
var
|
8643
|
+
var import_binding56 = require("@rspack/binding");
|
8729
8644
|
var RealContentHashPlugin = create2(
|
8730
|
-
|
8645
|
+
import_binding56.BuiltinPluginName.RealContentHashPlugin,
|
8731
8646
|
() => {
|
8732
8647
|
},
|
8733
8648
|
"compilation"
|
8734
8649
|
);
|
8735
8650
|
|
8736
8651
|
// src/builtin-plugin/RemoveEmptyChunksPlugin.ts
|
8737
|
-
var
|
8652
|
+
var import_binding57 = require("@rspack/binding");
|
8738
8653
|
var RemoveEmptyChunksPlugin = create2(
|
8739
|
-
|
8654
|
+
import_binding57.BuiltinPluginName.RemoveEmptyChunksPlugin,
|
8740
8655
|
() => {
|
8741
8656
|
},
|
8742
8657
|
"compilation"
|
8743
8658
|
);
|
8744
8659
|
|
8745
8660
|
// src/builtin-plugin/RuntimeChunkPlugin.ts
|
8746
|
-
var
|
8661
|
+
var import_binding58 = require("@rspack/binding");
|
8747
8662
|
var RuntimeChunkPlugin = create2(
|
8748
|
-
|
8663
|
+
import_binding58.BuiltinPluginName.RuntimeChunkPlugin,
|
8749
8664
|
(options) => options,
|
8750
8665
|
"thisCompilation"
|
8751
8666
|
);
|
@@ -8823,18 +8738,18 @@ var createRuntimePluginHooksRegisters = (getCompiler, createTap, createMapTap) =
|
|
8823
8738
|
};
|
8824
8739
|
|
8825
8740
|
// src/builtin-plugin/SideEffectsFlagPlugin.ts
|
8826
|
-
var
|
8741
|
+
var import_binding59 = require("@rspack/binding");
|
8827
8742
|
var SideEffectsFlagPlugin = create2(
|
8828
|
-
|
8743
|
+
import_binding59.BuiltinPluginName.SideEffectsFlagPlugin,
|
8829
8744
|
() => {
|
8830
8745
|
},
|
8831
8746
|
"compilation"
|
8832
8747
|
);
|
8833
8748
|
|
8834
8749
|
// src/builtin-plugin/SizeLimitsPlugin.ts
|
8835
|
-
var
|
8750
|
+
var import_binding60 = require("@rspack/binding");
|
8836
8751
|
var SizeLimitsPlugin = create2(
|
8837
|
-
|
8752
|
+
import_binding60.BuiltinPluginName.SizeLimitsPlugin,
|
8838
8753
|
(options) => {
|
8839
8754
|
const hints = options.hints === false ? void 0 : options.hints;
|
8840
8755
|
return { ...options, hints };
|
@@ -8842,16 +8757,16 @@ var SizeLimitsPlugin = create2(
|
|
8842
8757
|
);
|
8843
8758
|
|
8844
8759
|
// src/builtin-plugin/SourceMapDevToolPlugin.ts
|
8845
|
-
var
|
8760
|
+
var import_binding61 = require("@rspack/binding");
|
8846
8761
|
var SourceMapDevToolPlugin = create2(
|
8847
|
-
|
8762
|
+
import_binding61.BuiltinPluginName.SourceMapDevToolPlugin,
|
8848
8763
|
(options) => options,
|
8849
8764
|
"compilation"
|
8850
8765
|
);
|
8851
8766
|
|
8852
8767
|
// src/builtin-plugin/SplitChunksPlugin.ts
|
8853
8768
|
var import_node_assert5 = __toESM(require("assert"));
|
8854
|
-
var
|
8769
|
+
var import_binding62 = require("@rspack/binding");
|
8855
8770
|
|
8856
8771
|
// src/util/SplitChunkSize.ts
|
8857
8772
|
var JsSplitChunkSizes = class {
|
@@ -8874,7 +8789,7 @@ var SplitChunksPlugin = class extends RspackBuiltinPlugin {
|
|
8874
8789
|
constructor(options) {
|
8875
8790
|
super();
|
8876
8791
|
this.options = options;
|
8877
|
-
this.name =
|
8792
|
+
this.name = import_binding62.BuiltinPluginName.SplitChunksPlugin;
|
8878
8793
|
this.affectedHooks = "thisCompilation";
|
8879
8794
|
}
|
8880
8795
|
raw(compiler) {
|
@@ -8974,9 +8889,9 @@ function toRawSplitChunksOptions(sc, compiler) {
|
|
8974
8889
|
}
|
8975
8890
|
|
8976
8891
|
// src/builtin-plugin/LightningCssMinimizerRspackPlugin.ts
|
8977
|
-
var
|
8892
|
+
var import_binding63 = require("@rspack/binding");
|
8978
8893
|
var LightningCssMinimizerRspackPlugin = create2(
|
8979
|
-
|
8894
|
+
import_binding63.BuiltinPluginName.LightningCssMinimizerRspackPlugin,
|
8980
8895
|
(options) => {
|
8981
8896
|
var _a, _b, _c;
|
8982
8897
|
const { include, exclude, draft, nonStandard, pseudoClasses, drafts } = (options == null ? void 0 : options.minimizerOptions) ?? {};
|
@@ -9004,16 +8919,16 @@ var LightningCssMinimizerRspackPlugin = create2(
|
|
9004
8919
|
);
|
9005
8920
|
|
9006
8921
|
// src/builtin-plugin/RemoveDuplicateModulesPlugin.ts
|
9007
|
-
var
|
8922
|
+
var import_binding64 = require("@rspack/binding");
|
9008
8923
|
var RemoveDuplicateModulesPlugin = create2(
|
9009
|
-
|
8924
|
+
import_binding64.BuiltinPluginName.RemoveDuplicateModulesPlugin,
|
9010
8925
|
() => {
|
9011
8926
|
return {};
|
9012
8927
|
}
|
9013
8928
|
);
|
9014
8929
|
|
9015
8930
|
// src/builtin-plugin/SwcJsMinimizerPlugin.ts
|
9016
|
-
var
|
8931
|
+
var import_binding65 = require("@rspack/binding");
|
9017
8932
|
function isObject2(value) {
|
9018
8933
|
const type = typeof value;
|
9019
8934
|
return value != null && (type === "object" || type === "function");
|
@@ -9056,7 +8971,7 @@ function getRawExtractCommentsOptions(extractComments) {
|
|
9056
8971
|
return void 0;
|
9057
8972
|
}
|
9058
8973
|
var SwcJsMinimizerRspackPlugin = create2(
|
9059
|
-
|
8974
|
+
import_binding65.BuiltinPluginName.SwcJsMinimizerRspackPlugin,
|
9060
8975
|
(options) => {
|
9061
8976
|
var _a, _b, _c, _d, _e;
|
9062
8977
|
let compress = ((_a = options == null ? void 0 : options.minimizerOptions) == null ? void 0 : _a.compress) ?? true;
|
@@ -9094,20 +9009,20 @@ var SwcJsMinimizerRspackPlugin = create2(
|
|
9094
9009
|
);
|
9095
9010
|
|
9096
9011
|
// src/builtin-plugin/WarnCaseSensitiveModulesPlugin.ts
|
9097
|
-
var
|
9012
|
+
var import_binding66 = require("@rspack/binding");
|
9098
9013
|
var WarnCaseSensitiveModulesPlugin = create2(
|
9099
|
-
|
9014
|
+
import_binding66.BuiltinPluginName.WarnCaseSensitiveModulesPlugin,
|
9100
9015
|
() => {
|
9101
9016
|
},
|
9102
9017
|
"compilation"
|
9103
9018
|
);
|
9104
9019
|
|
9105
9020
|
// src/builtin-plugin/WebWorkerTemplatePlugin.ts
|
9106
|
-
var
|
9021
|
+
var import_binding67 = require("@rspack/binding");
|
9107
9022
|
var WebWorkerTemplatePlugin = class extends RspackBuiltinPlugin {
|
9108
9023
|
constructor() {
|
9109
9024
|
super(...arguments);
|
9110
|
-
this.name =
|
9025
|
+
this.name = import_binding67.BuiltinPluginName.WebWorkerTemplatePlugin;
|
9111
9026
|
}
|
9112
9027
|
raw(compiler) {
|
9113
9028
|
compiler.options.output.chunkLoading = "import-scripts";
|
@@ -9116,7 +9031,7 @@ var WebWorkerTemplatePlugin = class extends RspackBuiltinPlugin {
|
|
9116
9031
|
};
|
9117
9032
|
|
9118
9033
|
// src/builtin-plugin/WorkerPlugin.ts
|
9119
|
-
var
|
9034
|
+
var import_binding68 = require("@rspack/binding");
|
9120
9035
|
var WorkerPlugin = class extends RspackBuiltinPlugin {
|
9121
9036
|
constructor(chunkLoading2, wasmLoading2, module2, workerPublicPath2) {
|
9122
9037
|
super();
|
@@ -9124,7 +9039,7 @@ var WorkerPlugin = class extends RspackBuiltinPlugin {
|
|
9124
9039
|
this.wasmLoading = wasmLoading2;
|
9125
9040
|
this.module = module2;
|
9126
9041
|
this.workerPublicPath = workerPublicPath2;
|
9127
|
-
this.name =
|
9042
|
+
this.name = import_binding68.BuiltinPluginName.WorkerPlugin;
|
9128
9043
|
}
|
9129
9044
|
raw(compiler) {
|
9130
9045
|
if (this.chunkLoading) {
|
@@ -9138,25 +9053,25 @@ var WorkerPlugin = class extends RspackBuiltinPlugin {
|
|
9138
9053
|
};
|
9139
9054
|
|
9140
9055
|
// src/builtin-plugin/FetchCompileAsyncWasmPlugin.ts
|
9141
|
-
var
|
9056
|
+
var import_binding69 = require("@rspack/binding");
|
9142
9057
|
var FetchCompileAsyncWasmPlugin = create2(
|
9143
|
-
|
9058
|
+
import_binding69.BuiltinPluginName.FetchCompileAsyncWasmPlugin,
|
9144
9059
|
() => {
|
9145
9060
|
},
|
9146
9061
|
"thisCompilation"
|
9147
9062
|
);
|
9148
9063
|
|
9149
9064
|
// src/builtin-plugin/NoEmitOnErrorsPlugin.ts
|
9150
|
-
var
|
9065
|
+
var import_binding70 = require("@rspack/binding");
|
9151
9066
|
var NoEmitOnErrorsPlugin = create2(
|
9152
|
-
|
9067
|
+
import_binding70.BuiltinPluginName.NoEmitOnErrorsPlugin,
|
9153
9068
|
() => void 0
|
9154
9069
|
);
|
9155
9070
|
|
9156
9071
|
// src/builtin-plugin/ContextReplacementPlugin.ts
|
9157
|
-
var
|
9072
|
+
var import_binding71 = require("@rspack/binding");
|
9158
9073
|
var ContextReplacementPlugin = create2(
|
9159
|
-
|
9074
|
+
import_binding71.BuiltinPluginName.ContextReplacementPlugin,
|
9160
9075
|
(resourceRegExp, newContentResource, newContentRecursive, newContentRegExp) => {
|
9161
9076
|
const rawOptions = {
|
9162
9077
|
resourceRegExp
|
@@ -9186,9 +9101,9 @@ var ContextReplacementPlugin = create2(
|
|
9186
9101
|
);
|
9187
9102
|
|
9188
9103
|
// src/builtin-plugin/LibManifestPlugin.ts
|
9189
|
-
var
|
9104
|
+
var import_binding72 = require("@rspack/binding");
|
9190
9105
|
var LibManifestPlugin = create2(
|
9191
|
-
|
9106
|
+
import_binding72.BuiltinPluginName.LibManifestPlugin,
|
9192
9107
|
(options) => {
|
9193
9108
|
const { context: context2, entryOnly, format: format3, name: name2, path: path11, type } = options;
|
9194
9109
|
return {
|
@@ -9203,9 +9118,9 @@ var LibManifestPlugin = create2(
|
|
9203
9118
|
);
|
9204
9119
|
|
9205
9120
|
// src/builtin-plugin/DllEntryPlugin.ts
|
9206
|
-
var
|
9121
|
+
var import_binding73 = require("@rspack/binding");
|
9207
9122
|
var DllEntryPlugin = create2(
|
9208
|
-
|
9123
|
+
import_binding73.BuiltinPluginName.DllEntryPlugin,
|
9209
9124
|
(context2, entries, options) => {
|
9210
9125
|
return {
|
9211
9126
|
context: context2,
|
@@ -9216,14 +9131,14 @@ var DllEntryPlugin = create2(
|
|
9216
9131
|
);
|
9217
9132
|
|
9218
9133
|
// src/builtin-plugin/DllReferenceAgencyPlugin.ts
|
9219
|
-
var
|
9134
|
+
var import_binding74 = require("@rspack/binding");
|
9220
9135
|
var DllReferenceAgencyPlugin = create2(
|
9221
|
-
|
9136
|
+
import_binding74.BuiltinPluginName.DllReferenceAgencyPlugin,
|
9222
9137
|
(options) => options
|
9223
9138
|
);
|
9224
9139
|
|
9225
9140
|
// src/builtin-plugin/RsdoctorPlugin.ts
|
9226
|
-
var
|
9141
|
+
var import_binding75 = require("@rspack/binding");
|
9227
9142
|
var liteTapable8 = __toESM(require("@rspack/lite-tapable"));
|
9228
9143
|
var import_zod3 = require("../compiled/zod/index.js");
|
9229
9144
|
var rsdoctorPluginSchema = import_zod3.z.strictObject({
|
@@ -9231,7 +9146,7 @@ var rsdoctorPluginSchema = import_zod3.z.strictObject({
|
|
9231
9146
|
chunkGraphFeatures: import_zod3.z.union([import_zod3.z.boolean(), import_zod3.z.array(import_zod3.z.enum(["graph", "assets"]))]).optional()
|
9232
9147
|
});
|
9233
9148
|
var RsdoctorPluginImpl = create2(
|
9234
|
-
|
9149
|
+
import_binding75.BuiltinPluginName.RsdoctorPlugin,
|
9235
9150
|
function(c = {
|
9236
9151
|
moduleGraphFeatures: true,
|
9237
9152
|
chunkGraphFeatures: true
|
@@ -9267,7 +9182,7 @@ RsdoctorPlugin.getHooks = RsdoctorPlugin.getCompilationHooks = (compilation) =>
|
|
9267
9182
|
var createRsdoctorPluginHooksRegisters = (getCompiler, createTap, createMapTap) => {
|
9268
9183
|
return {
|
9269
9184
|
registerRsdoctorPluginModuleGraphTaps: createTap(
|
9270
|
-
|
9185
|
+
import_binding75.RegisterJsTapKind.RsdoctorPluginModuleGraph,
|
9271
9186
|
function() {
|
9272
9187
|
return RsdoctorPlugin.getCompilationHooks(
|
9273
9188
|
getCompiler().__internal__get_compilation()
|
@@ -9280,7 +9195,7 @@ var createRsdoctorPluginHooksRegisters = (getCompiler, createTap, createMapTap)
|
|
9280
9195
|
}
|
9281
9196
|
),
|
9282
9197
|
registerRsdoctorPluginChunkGraphTaps: createTap(
|
9283
|
-
|
9198
|
+
import_binding75.RegisterJsTapKind.RsdoctorPluginChunkGraph,
|
9284
9199
|
function() {
|
9285
9200
|
return RsdoctorPlugin.getCompilationHooks(
|
9286
9201
|
getCompiler().__internal__get_compilation()
|
@@ -9293,7 +9208,7 @@ var createRsdoctorPluginHooksRegisters = (getCompiler, createTap, createMapTap)
|
|
9293
9208
|
}
|
9294
9209
|
),
|
9295
9210
|
registerRsdoctorPluginModuleIdsTaps: createTap(
|
9296
|
-
|
9211
|
+
import_binding75.RegisterJsTapKind.RsdoctorPluginModuleIds,
|
9297
9212
|
function() {
|
9298
9213
|
return RsdoctorPlugin.getCompilationHooks(
|
9299
9214
|
getCompiler().__internal__get_compilation()
|
@@ -9306,7 +9221,7 @@ var createRsdoctorPluginHooksRegisters = (getCompiler, createTap, createMapTap)
|
|
9306
9221
|
}
|
9307
9222
|
),
|
9308
9223
|
registerRsdoctorPluginModuleSourcesTaps: createTap(
|
9309
|
-
|
9224
|
+
import_binding75.RegisterJsTapKind.RsdoctorPluginModuleSources,
|
9310
9225
|
function() {
|
9311
9226
|
return RsdoctorPlugin.getCompilationHooks(
|
9312
9227
|
getCompiler().__internal__get_compilation()
|
@@ -9319,7 +9234,7 @@ var createRsdoctorPluginHooksRegisters = (getCompiler, createTap, createMapTap)
|
|
9319
9234
|
}
|
9320
9235
|
),
|
9321
9236
|
registerRsdoctorPluginAssetsTaps: createTap(
|
9322
|
-
|
9237
|
+
import_binding75.RegisterJsTapKind.RsdoctorPluginAssets,
|
9323
9238
|
function() {
|
9324
9239
|
return RsdoctorPlugin.getCompilationHooks(
|
9325
9240
|
getCompiler().__internal__get_compilation()
|
@@ -9338,7 +9253,7 @@ var createRsdoctorPluginHooksRegisters = (getCompiler, createTap, createMapTap)
|
|
9338
9253
|
var import_node_crypto2 = require("crypto");
|
9339
9254
|
var import_node_fs2 = require("fs");
|
9340
9255
|
var import_node_path7 = require("path");
|
9341
|
-
var
|
9256
|
+
var import_binding76 = require("@rspack/binding");
|
9342
9257
|
var import_zod4 = require("../compiled/zod/index.js");
|
9343
9258
|
var PLUGIN_NAME2 = "SubresourceIntegrityPlugin";
|
9344
9259
|
var NATIVE_HTML_PLUGIN = "HtmlRspackPlugin";
|
@@ -9349,7 +9264,7 @@ var pluginOptionsSchema2 = import_zod4.z.object({
|
|
9349
9264
|
enabled: import_zod4.z.literal("auto").or(import_zod4.z.boolean()).optional()
|
9350
9265
|
});
|
9351
9266
|
var NativeSubresourceIntegrityPlugin = create2(
|
9352
|
-
|
9267
|
+
import_binding76.BuiltinPluginName.SubresourceIntegrityPlugin,
|
9353
9268
|
function(options) {
|
9354
9269
|
let htmlPlugin = "Disabled";
|
9355
9270
|
if (options.htmlPlugin === NATIVE_HTML_PLUGIN) {
|
@@ -9555,9 +9470,9 @@ function normalizePath(path11) {
|
|
9555
9470
|
}
|
9556
9471
|
|
9557
9472
|
// src/builtin-plugin/ModuleInfoHeaderPlugin.ts
|
9558
|
-
var
|
9473
|
+
var import_binding77 = require("@rspack/binding");
|
9559
9474
|
var ModuleInfoHeaderPlugin = create2(
|
9560
|
-
|
9475
|
+
import_binding77.BuiltinPluginName.ModuleInfoHeaderPlugin,
|
9561
9476
|
(verbose) => verbose,
|
9562
9477
|
"compilation"
|
9563
9478
|
);
|
@@ -11905,7 +11820,7 @@ var Watching = class {
|
|
11905
11820
|
this.onChange();
|
11906
11821
|
this.#invalidate();
|
11907
11822
|
}
|
11908
|
-
|
11823
|
+
invalidateWithChangedFiles(files) {
|
11909
11824
|
this.#invalidate(/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map(), files, /* @__PURE__ */ new Set());
|
11910
11825
|
}
|
11911
11826
|
#invalidate(fileTimeInfoEntries, contextTimeInfoEntries, changedFiles, removedFiles) {
|
@@ -12304,7 +12219,7 @@ var binding6 = __toESM(require("@rspack/binding"));
|
|
12304
12219
|
|
12305
12220
|
// src/Module.ts
|
12306
12221
|
var binding5 = __toESM(require("@rspack/binding"));
|
12307
|
-
var
|
12222
|
+
var import_binding78 = require("@rspack/binding");
|
12308
12223
|
var ContextModuleFactoryBeforeResolveData = class _ContextModuleFactoryBeforeResolveData {
|
12309
12224
|
#inner;
|
12310
12225
|
static __from_binding(binding14) {
|
@@ -17874,21 +17789,6 @@ var RspackOptionsApply = class {
|
|
17874
17789
|
options.optimization.mangleExports !== "size"
|
17875
17790
|
).apply(compiler);
|
17876
17791
|
}
|
17877
|
-
if (options.experiments.lazyCompilation) {
|
17878
|
-
const lazyOptions = options.experiments.lazyCompilation;
|
17879
|
-
new LazyCompilationPlugin(
|
17880
|
-
// this is only for test
|
17881
|
-
// @ts-expect-error cacheable is hide
|
17882
|
-
lazyOptions.cacheable ?? true,
|
17883
|
-
lazyOptions.entries ?? true,
|
17884
|
-
lazyOptions.imports ?? true,
|
17885
|
-
typeof lazyOptions.test === "function" ? (module2) => lazyOptions.test.call(
|
17886
|
-
lazyOptions,
|
17887
|
-
module2
|
17888
|
-
) : lazyOptions.test,
|
17889
|
-
lazyOptions.backend
|
17890
|
-
).apply(compiler);
|
17891
|
-
}
|
17892
17792
|
if (options.output.enabledLibraryTypes && options.output.enabledLibraryTypes.length > 0) {
|
17893
17793
|
for (const type of options.output.enabledLibraryTypes) {
|
17894
17794
|
new EnableLibraryPlugin(type).apply(compiler);
|
@@ -17996,7 +17896,7 @@ var RspackOptionsApply = class {
|
|
17996
17896
|
|
17997
17897
|
// src/ContextModule.ts
|
17998
17898
|
var binding11 = __toESM(require("@rspack/binding"));
|
17999
|
-
var
|
17899
|
+
var import_binding79 = require("@rspack/binding");
|
18000
17900
|
Object.defineProperty(binding11.ContextModule.prototype, "originalSource", {
|
18001
17901
|
enumerable: true,
|
18002
17902
|
configurable: true,
|
@@ -18018,7 +17918,7 @@ Object.defineProperty(binding11.ContextModule.prototype, "emitFile", {
|
|
18018
17918
|
|
18019
17919
|
// src/ConcatenatedModule.ts
|
18020
17920
|
var binding12 = __toESM(require("@rspack/binding"));
|
18021
|
-
var
|
17921
|
+
var import_binding80 = require("@rspack/binding");
|
18022
17922
|
Object.defineProperty(binding12.ConcatenatedModule.prototype, "originalSource", {
|
18023
17923
|
enumerable: true,
|
18024
17924
|
configurable: true,
|
@@ -18040,7 +17940,7 @@ Object.defineProperty(binding12.ConcatenatedModule.prototype, "emitFile", {
|
|
18040
17940
|
|
18041
17941
|
// src/ExternalModule.ts
|
18042
17942
|
var binding13 = __toESM(require("@rspack/binding"));
|
18043
|
-
var
|
17943
|
+
var import_binding81 = require("@rspack/binding");
|
18044
17944
|
Object.defineProperty(binding13.ExternalModule.prototype, "originalSource", {
|
18045
17945
|
enumerable: true,
|
18046
17946
|
configurable: true,
|
@@ -18061,7 +17961,7 @@ Object.defineProperty(binding13.ExternalModule.prototype, "emitFile", {
|
|
18061
17961
|
});
|
18062
17962
|
|
18063
17963
|
// src/exports.ts
|
18064
|
-
var
|
17964
|
+
var import_binding89 = require("@rspack/binding");
|
18065
17965
|
|
18066
17966
|
// src/lib/ModuleFilenameHelpers.ts
|
18067
17967
|
var ModuleFilenameHelpers_exports = {};
|
@@ -18106,9 +18006,9 @@ var matchObject = (obj, str) => {
|
|
18106
18006
|
var import_zod5 = __toESM(require("../compiled/zod/index.js"));
|
18107
18007
|
|
18108
18008
|
// src/builtin-plugin/FlagAllModulesAsUsedPlugin.ts
|
18109
|
-
var
|
18009
|
+
var import_binding82 = require("@rspack/binding");
|
18110
18010
|
var FlagAllModulesAsUsedPlugin = create2(
|
18111
|
-
|
18011
|
+
import_binding82.BuiltinPluginName.FlagAllModulesAsUsedPlugin,
|
18112
18012
|
(explanation) => {
|
18113
18013
|
return {
|
18114
18014
|
explanation
|
@@ -19965,7 +19865,7 @@ var optimizationRuntimeChunk = import_zod8.z.enum(["single", "multiple"]).or(imp
|
|
19965
19865
|
).optional()
|
19966
19866
|
})
|
19967
19867
|
);
|
19968
|
-
var optimizationSplitChunksNameFunction = import_zod8.z.function().args(import_zod8.z.instanceof(
|
19868
|
+
var optimizationSplitChunksNameFunction = import_zod8.z.function().args(import_zod8.z.instanceof(import_binding78.Module), import_zod8.z.array(import_zod8.z.instanceof(Chunk)), import_zod8.z.string()).returns(
|
19969
19869
|
import_zod8.z.string().optional()
|
19970
19870
|
);
|
19971
19871
|
var optimizationSplitChunksName = import_zod8.z.string().or(import_zod8.z.literal(false)).or(optimizationSplitChunksNameFunction);
|
@@ -19992,7 +19892,7 @@ var sharedOptimizationSplitChunksCacheGroup = {
|
|
19992
19892
|
var optimizationSplitChunksCacheGroup = import_zod8.z.strictObject({
|
19993
19893
|
test: import_zod8.z.string().or(import_zod8.z.instanceof(RegExp)).or(
|
19994
19894
|
import_zod8.z.function().args(
|
19995
|
-
import_zod8.z.instanceof(
|
19895
|
+
import_zod8.z.instanceof(import_binding78.Module),
|
19996
19896
|
import_zod8.z.object({
|
19997
19897
|
moduleGraph: import_zod8.z.instanceof(ModuleGraph),
|
19998
19898
|
chunkGraph: import_zod8.z.instanceof(ChunkGraph)
|
@@ -20048,16 +19948,6 @@ var rspackFutureOptions = import_zod8.z.strictObject({
|
|
20048
19948
|
force: import_zod8.z.boolean().or(import_zod8.z.array(import_zod8.z.enum(["version", "uniqueId"]))).optional()
|
20049
19949
|
}).optional()
|
20050
19950
|
});
|
20051
|
-
var listenOptions = import_zod8.z.object({
|
20052
|
-
port: import_zod8.z.number().optional(),
|
20053
|
-
host: import_zod8.z.string().optional(),
|
20054
|
-
backlog: import_zod8.z.number().optional(),
|
20055
|
-
path: import_zod8.z.string().optional(),
|
20056
|
-
exclusive: import_zod8.z.boolean().optional(),
|
20057
|
-
readableAll: import_zod8.z.boolean().optional(),
|
20058
|
-
writableAll: import_zod8.z.boolean().optional(),
|
20059
|
-
ipv6Only: import_zod8.z.boolean().optional()
|
20060
|
-
});
|
20061
19951
|
var experimentCacheOptions = import_zod8.z.object({
|
20062
19952
|
type: import_zod8.z.enum(["memory"])
|
20063
19953
|
}).or(
|
@@ -20077,15 +19967,11 @@ var experimentCacheOptions = import_zod8.z.object({
|
|
20077
19967
|
})
|
20078
19968
|
);
|
20079
19969
|
var lazyCompilationOptions = import_zod8.z.object({
|
20080
|
-
backend: import_zod8.z.object({
|
20081
|
-
client: import_zod8.z.string().optional(),
|
20082
|
-
listen: import_zod8.z.number().or(listenOptions).or(import_zod8.z.function().args(import_zod8.z.any()).returns(import_zod8.z.void())).optional(),
|
20083
|
-
protocol: import_zod8.z.enum(["http", "https"]).optional(),
|
20084
|
-
server: import_zod8.z.record(import_zod8.z.any()).or(import_zod8.z.function().returns(import_zod8.z.any())).optional()
|
20085
|
-
}).optional(),
|
20086
19970
|
imports: import_zod8.z.boolean().optional(),
|
20087
19971
|
entries: import_zod8.z.boolean().optional(),
|
20088
|
-
test: import_zod8.z.instanceof(RegExp).or(import_zod8.z.function().args(import_zod8.z.custom()).returns(import_zod8.z.boolean())).optional()
|
19972
|
+
test: import_zod8.z.instanceof(RegExp).or(import_zod8.z.function().args(import_zod8.z.custom()).returns(import_zod8.z.boolean())).optional(),
|
19973
|
+
client: import_zod8.z.string().optional(),
|
19974
|
+
serverUrl: import_zod8.z.string().optional()
|
20089
19975
|
});
|
20090
19976
|
var incremental = import_zod8.z.strictObject({
|
20091
19977
|
make: import_zod8.z.boolean().optional(),
|
@@ -20174,9 +20060,9 @@ var rspackOptions = import_zod8.z.strictObject({
|
|
20174
20060
|
});
|
20175
20061
|
|
20176
20062
|
// src/container/ModuleFederationRuntimePlugin.ts
|
20177
|
-
var
|
20063
|
+
var import_binding83 = require("@rspack/binding");
|
20178
20064
|
var ModuleFederationRuntimePlugin = create2(
|
20179
|
-
|
20065
|
+
import_binding83.BuiltinPluginName.ModuleFederationRuntimePlugin,
|
20180
20066
|
() => {
|
20181
20067
|
}
|
20182
20068
|
);
|
@@ -20372,10 +20258,10 @@ function getDefaultEntryRuntime(paths, options, compiler) {
|
|
20372
20258
|
}
|
20373
20259
|
|
20374
20260
|
// src/sharing/ConsumeSharedPlugin.ts
|
20375
|
-
var
|
20261
|
+
var import_binding85 = require("@rspack/binding");
|
20376
20262
|
|
20377
20263
|
// src/sharing/ShareRuntimePlugin.ts
|
20378
|
-
var
|
20264
|
+
var import_binding84 = require("@rspack/binding");
|
20379
20265
|
var compilerSet = /* @__PURE__ */ new WeakSet();
|
20380
20266
|
function isSingleton(compiler) {
|
20381
20267
|
return compilerSet.has(compiler);
|
@@ -20387,7 +20273,7 @@ var ShareRuntimePlugin = class extends RspackBuiltinPlugin {
|
|
20387
20273
|
constructor(enhanced = false) {
|
20388
20274
|
super();
|
20389
20275
|
this.enhanced = enhanced;
|
20390
|
-
this.name =
|
20276
|
+
this.name = import_binding84.BuiltinPluginName.ShareRuntimePlugin;
|
20391
20277
|
}
|
20392
20278
|
raw(compiler) {
|
20393
20279
|
if (isSingleton(compiler)) return;
|
@@ -20406,7 +20292,7 @@ function isRequiredVersion(str) {
|
|
20406
20292
|
var ConsumeSharedPlugin = class extends RspackBuiltinPlugin {
|
20407
20293
|
constructor(options) {
|
20408
20294
|
super();
|
20409
|
-
this.name =
|
20295
|
+
this.name = import_binding85.BuiltinPluginName.ConsumeSharedPlugin;
|
20410
20296
|
this._options = {
|
20411
20297
|
consumes: parseOptions(
|
20412
20298
|
options.consumes,
|
@@ -20469,11 +20355,11 @@ var ConsumeSharedPlugin = class extends RspackBuiltinPlugin {
|
|
20469
20355
|
};
|
20470
20356
|
|
20471
20357
|
// src/sharing/ProvideSharedPlugin.ts
|
20472
|
-
var
|
20358
|
+
var import_binding86 = require("@rspack/binding");
|
20473
20359
|
var ProvideSharedPlugin = class extends RspackBuiltinPlugin {
|
20474
20360
|
constructor(options) {
|
20475
20361
|
super();
|
20476
|
-
this.name =
|
20362
|
+
this.name = import_binding86.BuiltinPluginName.ProvideSharedPlugin;
|
20477
20363
|
this._provides = parseOptions(
|
20478
20364
|
options.provides,
|
20479
20365
|
(item) => {
|
@@ -20578,11 +20464,11 @@ var SharePlugin = class {
|
|
20578
20464
|
};
|
20579
20465
|
|
20580
20466
|
// src/container/ContainerPlugin.ts
|
20581
|
-
var
|
20467
|
+
var import_binding87 = require("@rspack/binding");
|
20582
20468
|
var ContainerPlugin = class extends RspackBuiltinPlugin {
|
20583
20469
|
constructor(options) {
|
20584
20470
|
super();
|
20585
|
-
this.name =
|
20471
|
+
this.name = import_binding87.BuiltinPluginName.ContainerPlugin;
|
20586
20472
|
this._options = {
|
20587
20473
|
name: options.name,
|
20588
20474
|
shareScope: options.shareScope || "default",
|
@@ -20626,11 +20512,11 @@ var ContainerPlugin = class extends RspackBuiltinPlugin {
|
|
20626
20512
|
};
|
20627
20513
|
|
20628
20514
|
// src/container/ContainerReferencePlugin.ts
|
20629
|
-
var
|
20515
|
+
var import_binding88 = require("@rspack/binding");
|
20630
20516
|
var ContainerReferencePlugin = class extends RspackBuiltinPlugin {
|
20631
20517
|
constructor(options) {
|
20632
20518
|
super();
|
20633
|
-
this.name =
|
20519
|
+
this.name = import_binding88.BuiltinPluginName.ContainerReferencePlugin;
|
20634
20520
|
this._options = {
|
20635
20521
|
remoteType: options.remoteType,
|
20636
20522
|
remotes: parseOptions(
|
@@ -20715,7 +20601,7 @@ var ModuleFederationPluginV1 = class {
|
|
20715
20601
|
};
|
20716
20602
|
|
20717
20603
|
// src/exports.ts
|
20718
|
-
var
|
20604
|
+
var import_binding90 = require("@rspack/binding");
|
20719
20605
|
var rspackVersion = import_package.version;
|
20720
20606
|
var version = import_package.webpackVersion;
|
20721
20607
|
var WebpackError2 = Error;
|
@@ -20762,7 +20648,7 @@ var sharing = {
|
|
20762
20648
|
var experiments2 = {
|
20763
20649
|
globalTrace: {
|
20764
20650
|
async register(filter, layer2, output2) {
|
20765
|
-
(0,
|
20651
|
+
(0, import_binding90.registerGlobalTrace)(filter, layer2, output2);
|
20766
20652
|
if (layer2 === "otel") {
|
20767
20653
|
try {
|
20768
20654
|
const { initOpenTelemetry } = await import("@rspack/tracing");
|
@@ -20776,7 +20662,7 @@ var experiments2 = {
|
|
20776
20662
|
}
|
20777
20663
|
},
|
20778
20664
|
async cleanup() {
|
20779
|
-
(0,
|
20665
|
+
(0, import_binding90.cleanupGlobalTrace)();
|
20780
20666
|
try {
|
20781
20667
|
const { shutdownOpenTelemetry } = await import("@rspack/tracing");
|
20782
20668
|
await shutdownOpenTelemetry();
|
@@ -20791,7 +20677,8 @@ var experiments2 = {
|
|
20791
20677
|
* @internal
|
20792
20678
|
*/
|
20793
20679
|
RsdoctorPlugin,
|
20794
|
-
SubresourceIntegrityPlugin
|
20680
|
+
SubresourceIntegrityPlugin,
|
20681
|
+
lazyCompilationMiddleware
|
20795
20682
|
};
|
20796
20683
|
|
20797
20684
|
// src/rspack.ts
|
@@ -20905,6 +20792,7 @@ module.exports = rspack;
|
|
20905
20792
|
0 && (module.exports = {
|
20906
20793
|
AsyncDependenciesBlock,
|
20907
20794
|
BannerPlugin,
|
20795
|
+
CircularDependencyRspackPlugin,
|
20908
20796
|
Compilation,
|
20909
20797
|
Compiler,
|
20910
20798
|
ConcatenatedModule,
|