@rspack/core 1.2.0-alpha.0 → 1.2.0
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/browserslist/index.js +28 -28
- package/compiled/graceful-fs/index.js +18 -18
- package/compiled/watchpack/index.js +34 -34
- package/compiled/webpack-sources/index.js +76 -76
- package/compiled/zod/index.js +30 -30
- package/dist/ChunkGraph.d.ts +1 -0
- package/dist/ChunkGroup.d.ts +2 -0
- package/dist/Compilation.d.ts +0 -9
- package/dist/Module.d.ts +5 -8
- package/dist/ResolverFactory.d.ts +1 -1
- package/dist/builtin-plugin/APIPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/BannerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ContextReplacementPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DefinePlugin.d.ts +1 -1
- package/dist/builtin-plugin/DllEntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/HtmlRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/IgnorePlugin.d.ts +1 -1
- package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LibManifestPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -1
- package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ProgressPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -1
- package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
- package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/base.d.ts +1 -1
- package/dist/builtin-plugin/css-extract/index.d.ts +1 -0
- package/dist/builtin-plugin/lazy-compilation/backend.d.ts +1 -1
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +1 -1
- package/dist/config/normalization.d.ts +3 -2
- package/dist/config/types.d.ts +33 -53
- package/dist/config/zod.d.ts +124 -119
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
- package/dist/exports.d.ts +2 -3
- package/dist/index.js +368 -290
- package/dist/stats/statsFactoryUtils.d.ts +9 -0
- package/package.json +11 -5
package/dist/index.js
CHANGED
|
@@ -815,11 +815,8 @@ __export(exports_exports, {
|
|
|
815
815
|
var import_package = require("../package.json");
|
|
816
816
|
|
|
817
817
|
// src/Compilation.ts
|
|
818
|
-
var import_binding2 = require("@rspack/binding");
|
|
819
|
-
var liteTapable = __toESM(require("@rspack/lite-tapable"));
|
|
820
|
-
|
|
821
|
-
// src/Module.ts
|
|
822
818
|
var import_binding = require("@rspack/binding");
|
|
819
|
+
var liteTapable = __toESM(require("@rspack/lite-tapable"));
|
|
823
820
|
|
|
824
821
|
// src/Dependency.ts
|
|
825
822
|
var Dependency = class _Dependency {
|
|
@@ -1056,20 +1053,22 @@ var ContextModuleFactoryAfterResolveData = class _ContextModuleFactoryAfterResol
|
|
|
1056
1053
|
var MODULE_MAPPINGS = /* @__PURE__ */ new WeakMap();
|
|
1057
1054
|
var Module = class _Module {
|
|
1058
1055
|
#inner;
|
|
1059
|
-
static __from_binding(binding3
|
|
1056
|
+
static __from_binding(binding3) {
|
|
1060
1057
|
let module2 = MODULE_MAPPINGS.get(binding3);
|
|
1061
1058
|
if (module2) {
|
|
1062
1059
|
return module2;
|
|
1063
1060
|
}
|
|
1064
|
-
module2 = new _Module(binding3
|
|
1061
|
+
module2 = new _Module(binding3);
|
|
1065
1062
|
MODULE_MAPPINGS.set(binding3, module2);
|
|
1066
1063
|
return module2;
|
|
1067
1064
|
}
|
|
1068
1065
|
static __to_binding(module2) {
|
|
1069
1066
|
return module2.#inner;
|
|
1070
1067
|
}
|
|
1071
|
-
constructor(module2
|
|
1068
|
+
constructor(module2) {
|
|
1072
1069
|
this.#inner = module2;
|
|
1070
|
+
this.buildInfo = {};
|
|
1071
|
+
this.buildMeta = {};
|
|
1073
1072
|
Object.defineProperties(this, {
|
|
1074
1073
|
type: {
|
|
1075
1074
|
enumerable: true,
|
|
@@ -1125,46 +1124,19 @@ var Module = class _Module {
|
|
|
1125
1124
|
modules: {
|
|
1126
1125
|
enumerable: true,
|
|
1127
1126
|
get() {
|
|
1128
|
-
|
|
1129
|
-
return module2.modules ? module2.modules.map((m) => _Module.__from_binding(m)) : void 0;
|
|
1130
|
-
}
|
|
1131
|
-
return void 0;
|
|
1132
|
-
}
|
|
1133
|
-
},
|
|
1134
|
-
buildInfo: {
|
|
1135
|
-
enumerable: true,
|
|
1136
|
-
get() {
|
|
1137
|
-
const customModule = compilation == null ? void 0 : compilation.__internal__getCustomModule(
|
|
1138
|
-
module2.moduleIdentifier
|
|
1139
|
-
);
|
|
1140
|
-
return (customModule == null ? void 0 : customModule.buildInfo) || {};
|
|
1141
|
-
}
|
|
1142
|
-
},
|
|
1143
|
-
buildMeta: {
|
|
1144
|
-
enumerable: true,
|
|
1145
|
-
get() {
|
|
1146
|
-
const customModule = compilation == null ? void 0 : compilation.__internal__getCustomModule(
|
|
1147
|
-
module2.moduleIdentifier
|
|
1148
|
-
);
|
|
1149
|
-
return (customModule == null ? void 0 : customModule.buildMeta) || {};
|
|
1127
|
+
return module2.modules ? module2.modules.map((m) => _Module.__from_binding(m)) : void 0;
|
|
1150
1128
|
}
|
|
1151
1129
|
},
|
|
1152
1130
|
blocks: {
|
|
1153
1131
|
enumerable: true,
|
|
1154
1132
|
get() {
|
|
1155
|
-
|
|
1156
|
-
return module2.blocks.map((b) => DependenciesBlock.__from_binding(b));
|
|
1157
|
-
}
|
|
1158
|
-
return [];
|
|
1133
|
+
return module2.blocks.map((b) => DependenciesBlock.__from_binding(b));
|
|
1159
1134
|
}
|
|
1160
1135
|
},
|
|
1161
1136
|
dependencies: {
|
|
1162
1137
|
enumerable: true,
|
|
1163
1138
|
get() {
|
|
1164
|
-
|
|
1165
|
-
return module2.dependencies.map((d) => Dependency.__from_binding(d));
|
|
1166
|
-
}
|
|
1167
|
-
return [];
|
|
1139
|
+
return module2.dependencies.map((d) => Dependency.__from_binding(d));
|
|
1168
1140
|
}
|
|
1169
1141
|
},
|
|
1170
1142
|
useSourceMap: {
|
|
@@ -1263,6 +1235,12 @@ var ChunkGroup = class _ChunkGroup {
|
|
|
1263
1235
|
isInitial() {
|
|
1264
1236
|
return this.#inner.isInitial();
|
|
1265
1237
|
}
|
|
1238
|
+
getModulePreOrderIndex(module2) {
|
|
1239
|
+
return this.#inner.getModulePreOrderIndex(Module.__to_binding(module2));
|
|
1240
|
+
}
|
|
1241
|
+
getModulePostOrderIndex(module2) {
|
|
1242
|
+
return this.#inner.getModulePostOrderIndex(Module.__to_binding(module2));
|
|
1243
|
+
}
|
|
1266
1244
|
};
|
|
1267
1245
|
|
|
1268
1246
|
// src/Chunk.ts
|
|
@@ -1440,6 +1418,9 @@ var ChunkGraph = class _ChunkGraph {
|
|
|
1440
1418
|
getChunkEntryModulesIterable(chunk) {
|
|
1441
1419
|
return this.#inner.getChunkEntryModules(Chunk.__to_binding(chunk)).map((binding3) => Module.__from_binding(binding3));
|
|
1442
1420
|
}
|
|
1421
|
+
getNumberOfEntryModules(chunk) {
|
|
1422
|
+
return this.#inner.getNumberOfEntryModules(Chunk.__to_binding(chunk));
|
|
1423
|
+
}
|
|
1443
1424
|
getChunkEntryDependentChunksIterable(chunk) {
|
|
1444
1425
|
return this.#inner.getChunkEntryDependentChunksIterable(Chunk.__to_binding(chunk)).map((binding3) => Chunk.__from_binding(binding3));
|
|
1445
1426
|
}
|
|
@@ -2900,7 +2881,7 @@ function memoizeValue(fn2) {
|
|
|
2900
2881
|
}
|
|
2901
2882
|
|
|
2902
2883
|
// src/Compilation.ts
|
|
2903
|
-
var _inner, _shutdown,
|
|
2884
|
+
var _inner, _shutdown, _addIncludeDispatcher, _Compilation_instances, createCachedAssets_fn, _rebuildModuleCaller;
|
|
2904
2885
|
var _Compilation = class _Compilation {
|
|
2905
2886
|
constructor(compiler, inner) {
|
|
2906
2887
|
__privateAdd(this, _Compilation_instances);
|
|
@@ -2911,11 +2892,6 @@ var _Compilation = class _Compilation {
|
|
|
2911
2892
|
return null;
|
|
2912
2893
|
}
|
|
2913
2894
|
};
|
|
2914
|
-
/**
|
|
2915
|
-
* Records the dynamically added fields for Module on the JavaScript side, using the Module identifier for association.
|
|
2916
|
-
* These fields are generally used within a plugin, so they do not need to be passed back to the Rust side.
|
|
2917
|
-
*/
|
|
2918
|
-
__privateAdd(this, _customModules);
|
|
2919
2895
|
__privateAdd(this, _addIncludeDispatcher);
|
|
2920
2896
|
this.fileDependencies = createFakeCompilationDependencies(
|
|
2921
2897
|
() => __privateGet(this, _inner).dependencies().fileDependencies,
|
|
@@ -2941,7 +2917,7 @@ var _Compilation = class _Compilation {
|
|
|
2941
2917
|
for (const [id, callback] of args) {
|
|
2942
2918
|
const m = modules.find((item) => item.moduleIdentifier === id);
|
|
2943
2919
|
if (m) {
|
|
2944
|
-
callback(err, Module.__from_binding(m
|
|
2920
|
+
callback(err, Module.__from_binding(m));
|
|
2945
2921
|
} else {
|
|
2946
2922
|
callback(err || new Error("module no found"), null);
|
|
2947
2923
|
}
|
|
@@ -2952,7 +2928,6 @@ var _Compilation = class _Compilation {
|
|
|
2952
2928
|
))(this));
|
|
2953
2929
|
__privateSet(this, _inner, inner);
|
|
2954
2930
|
__privateSet(this, _shutdown, false);
|
|
2955
|
-
__privateSet(this, _customModules, {});
|
|
2956
2931
|
const processAssetsHook = new liteTapable.AsyncSeriesHook([
|
|
2957
2932
|
"assets"
|
|
2958
2933
|
]);
|
|
@@ -3106,14 +3081,12 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
3106
3081
|
}
|
|
3107
3082
|
get modules() {
|
|
3108
3083
|
return new Set(
|
|
3109
|
-
__privateGet(this, _inner).modules.map((module2) => Module.__from_binding(module2
|
|
3084
|
+
__privateGet(this, _inner).modules.map((module2) => Module.__from_binding(module2))
|
|
3110
3085
|
);
|
|
3111
3086
|
}
|
|
3112
3087
|
get builtModules() {
|
|
3113
3088
|
return new Set(
|
|
3114
|
-
__privateGet(this, _inner).builtModules.map(
|
|
3115
|
-
(module2) => Module.__from_binding(module2, this)
|
|
3116
|
-
)
|
|
3089
|
+
__privateGet(this, _inner).builtModules.map((module2) => Module.__from_binding(module2))
|
|
3117
3090
|
);
|
|
3118
3091
|
}
|
|
3119
3092
|
get chunks() {
|
|
@@ -3141,21 +3114,6 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
3141
3114
|
get entries() {
|
|
3142
3115
|
return new Entries(__privateGet(this, _inner).entries);
|
|
3143
3116
|
}
|
|
3144
|
-
/**
|
|
3145
|
-
* Note: This is not a webpack public API, maybe removed in future.
|
|
3146
|
-
*
|
|
3147
|
-
* @internal
|
|
3148
|
-
*/
|
|
3149
|
-
__internal__getCustomModule(moduleIdentifier) {
|
|
3150
|
-
let module2 = __privateGet(this, _customModules)[moduleIdentifier];
|
|
3151
|
-
if (!module2) {
|
|
3152
|
-
module2 = __privateGet(this, _customModules)[moduleIdentifier] = {
|
|
3153
|
-
buildInfo: {},
|
|
3154
|
-
buildMeta: {}
|
|
3155
|
-
};
|
|
3156
|
-
}
|
|
3157
|
-
return module2;
|
|
3158
|
-
}
|
|
3159
3117
|
getCache(name2) {
|
|
3160
3118
|
return this.compiler.getCache(name2);
|
|
3161
3119
|
}
|
|
@@ -3306,7 +3264,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
3306
3264
|
for (let i = 0; i < errs.length; i++) {
|
|
3307
3265
|
const error = errs[i];
|
|
3308
3266
|
inner.pushDiagnostic(
|
|
3309
|
-
JsRspackDiagnostic.__to_binding(error,
|
|
3267
|
+
JsRspackDiagnostic.__to_binding(error, import_binding.JsRspackSeverity.Error)
|
|
3310
3268
|
);
|
|
3311
3269
|
}
|
|
3312
3270
|
return Reflect.apply(target2, thisArg, errs);
|
|
@@ -3332,7 +3290,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
3332
3290
|
const errList = errs.map((error) => {
|
|
3333
3291
|
return JsRspackDiagnostic.__to_binding(
|
|
3334
3292
|
error,
|
|
3335
|
-
|
|
3293
|
+
import_binding.JsRspackSeverity.Error
|
|
3336
3294
|
);
|
|
3337
3295
|
});
|
|
3338
3296
|
inner.spliceDiagnostic(0, 0, errList);
|
|
@@ -3345,7 +3303,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
3345
3303
|
const errList = errors2.map((error) => {
|
|
3346
3304
|
return JsRspackDiagnostic.__to_binding(
|
|
3347
3305
|
error,
|
|
3348
|
-
|
|
3306
|
+
import_binding.JsRspackSeverity.Error
|
|
3349
3307
|
);
|
|
3350
3308
|
});
|
|
3351
3309
|
inner.spliceDiagnostic(startIdx, startIdx + delCount, errList);
|
|
@@ -3372,7 +3330,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
3372
3330
|
0,
|
|
3373
3331
|
length,
|
|
3374
3332
|
errors.map((error) => {
|
|
3375
|
-
return JsRspackDiagnostic.__to_binding(error,
|
|
3333
|
+
return JsRspackDiagnostic.__to_binding(error, import_binding.JsRspackSeverity.Error);
|
|
3376
3334
|
})
|
|
3377
3335
|
);
|
|
3378
3336
|
}
|
|
@@ -3389,7 +3347,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
3389
3347
|
thisArg,
|
|
3390
3348
|
processWarningsHook.call(warns).map((warn) => {
|
|
3391
3349
|
inner.pushDiagnostic(
|
|
3392
|
-
JsRspackDiagnostic.__to_binding(warn,
|
|
3350
|
+
JsRspackDiagnostic.__to_binding(warn, import_binding.JsRspackSeverity.Warn)
|
|
3393
3351
|
);
|
|
3394
3352
|
return warn;
|
|
3395
3353
|
})
|
|
@@ -3420,7 +3378,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
3420
3378
|
warnings2.map((warn) => {
|
|
3421
3379
|
return JsRspackDiagnostic.__to_binding(
|
|
3422
3380
|
warn,
|
|
3423
|
-
|
|
3381
|
+
import_binding.JsRspackSeverity.Warn
|
|
3424
3382
|
);
|
|
3425
3383
|
})
|
|
3426
3384
|
);
|
|
@@ -3432,7 +3390,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
3432
3390
|
handler(target2, thisArg, [startIdx, delCount, ...warns]) {
|
|
3433
3391
|
warns = processWarningsHook.call(warns);
|
|
3434
3392
|
const warnList = warns.map((warn) => {
|
|
3435
|
-
return JsRspackDiagnostic.__to_binding(warn,
|
|
3393
|
+
return JsRspackDiagnostic.__to_binding(warn, import_binding.JsRspackSeverity.Warn);
|
|
3436
3394
|
});
|
|
3437
3395
|
inner.spliceDiagnostic(startIdx, startIdx + delCount, warnList);
|
|
3438
3396
|
return Reflect.apply(target2, thisArg, [
|
|
@@ -3458,7 +3416,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
3458
3416
|
0,
|
|
3459
3417
|
length,
|
|
3460
3418
|
warnings.map((warning) => {
|
|
3461
|
-
return JsRspackDiagnostic.__to_binding(warning,
|
|
3419
|
+
return JsRspackDiagnostic.__to_binding(warning, import_binding.JsRspackSeverity.Warn);
|
|
3462
3420
|
})
|
|
3463
3421
|
);
|
|
3464
3422
|
}
|
|
@@ -3708,7 +3666,6 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
3708
3666
|
};
|
|
3709
3667
|
_inner = new WeakMap();
|
|
3710
3668
|
_shutdown = new WeakMap();
|
|
3711
|
-
_customModules = new WeakMap();
|
|
3712
3669
|
_addIncludeDispatcher = new WeakMap();
|
|
3713
3670
|
_Compilation_instances = new WeakSet();
|
|
3714
3671
|
createCachedAssets_fn = function() {
|
|
@@ -5294,40 +5251,40 @@ function create2(name2, resolve2, affectedHooks) {
|
|
|
5294
5251
|
}
|
|
5295
5252
|
|
|
5296
5253
|
// src/builtin-plugin/APIPlugin.ts
|
|
5297
|
-
var
|
|
5298
|
-
var APIPlugin = create2(
|
|
5254
|
+
var import_binding2 = require("@rspack/binding");
|
|
5255
|
+
var APIPlugin = create2(import_binding2.BuiltinPluginName.APIPlugin, () => {
|
|
5299
5256
|
});
|
|
5300
5257
|
|
|
5301
5258
|
// src/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.ts
|
|
5302
|
-
var
|
|
5259
|
+
var import_binding3 = require("@rspack/binding");
|
|
5303
5260
|
var ArrayPushCallbackChunkFormatPlugin = create2(
|
|
5304
|
-
|
|
5261
|
+
import_binding3.BuiltinPluginName.ArrayPushCallbackChunkFormatPlugin,
|
|
5305
5262
|
() => {
|
|
5306
5263
|
}
|
|
5307
5264
|
);
|
|
5308
5265
|
|
|
5309
5266
|
// src/builtin-plugin/AssetModulesPlugin.ts
|
|
5310
|
-
var
|
|
5267
|
+
var import_binding4 = require("@rspack/binding");
|
|
5311
5268
|
var AssetModulesPlugin = create2(
|
|
5312
|
-
|
|
5269
|
+
import_binding4.BuiltinPluginName.AssetModulesPlugin,
|
|
5313
5270
|
() => {
|
|
5314
5271
|
},
|
|
5315
5272
|
"compilation"
|
|
5316
5273
|
);
|
|
5317
5274
|
|
|
5318
5275
|
// src/builtin-plugin/AsyncWebAssemblyModulesPlugin.ts
|
|
5319
|
-
var
|
|
5276
|
+
var import_binding5 = require("@rspack/binding");
|
|
5320
5277
|
var AsyncWebAssemblyModulesPlugin = create2(
|
|
5321
|
-
|
|
5278
|
+
import_binding5.BuiltinPluginName.AsyncWebAssemblyModulesPlugin,
|
|
5322
5279
|
() => {
|
|
5323
5280
|
},
|
|
5324
5281
|
"compilation"
|
|
5325
5282
|
);
|
|
5326
5283
|
|
|
5327
5284
|
// src/builtin-plugin/BannerPlugin.ts
|
|
5328
|
-
var
|
|
5285
|
+
var import_binding6 = require("@rspack/binding");
|
|
5329
5286
|
var BannerPlugin = create2(
|
|
5330
|
-
|
|
5287
|
+
import_binding6.BuiltinPluginName.BannerPlugin,
|
|
5331
5288
|
(args) => {
|
|
5332
5289
|
if (typeof args === "string" || typeof args === "function") {
|
|
5333
5290
|
return {
|
|
@@ -5348,9 +5305,9 @@ var BannerPlugin = create2(
|
|
|
5348
5305
|
);
|
|
5349
5306
|
|
|
5350
5307
|
// src/builtin-plugin/BundlerInfoRspackPlugin.ts
|
|
5351
|
-
var
|
|
5308
|
+
var import_binding7 = require("@rspack/binding");
|
|
5352
5309
|
var BundlerInfoRspackPlugin = create2(
|
|
5353
|
-
|
|
5310
|
+
import_binding7.BuiltinPluginName.BundlerInfoRspackPlugin,
|
|
5354
5311
|
(options) => {
|
|
5355
5312
|
return {
|
|
5356
5313
|
version: options.version || "unknown",
|
|
@@ -5361,25 +5318,25 @@ var BundlerInfoRspackPlugin = create2(
|
|
|
5361
5318
|
);
|
|
5362
5319
|
|
|
5363
5320
|
// src/builtin-plugin/ChunkPrefetchPreloadPlugin.ts
|
|
5364
|
-
var
|
|
5321
|
+
var import_binding8 = require("@rspack/binding");
|
|
5365
5322
|
var ChunkPrefetchPreloadPlugin = create2(
|
|
5366
|
-
|
|
5323
|
+
import_binding8.BuiltinPluginName.ChunkPrefetchPreloadPlugin,
|
|
5367
5324
|
() => {
|
|
5368
5325
|
}
|
|
5369
5326
|
);
|
|
5370
5327
|
|
|
5371
5328
|
// src/builtin-plugin/CommonJsChunkFormatPlugin.ts
|
|
5372
|
-
var
|
|
5329
|
+
var import_binding9 = require("@rspack/binding");
|
|
5373
5330
|
var CommonJsChunkFormatPlugin = create2(
|
|
5374
|
-
|
|
5331
|
+
import_binding9.BuiltinPluginName.CommonJsChunkFormatPlugin,
|
|
5375
5332
|
() => {
|
|
5376
5333
|
}
|
|
5377
5334
|
);
|
|
5378
5335
|
|
|
5379
5336
|
// src/builtin-plugin/CopyRspackPlugin.ts
|
|
5380
|
-
var
|
|
5337
|
+
var import_binding10 = require("@rspack/binding");
|
|
5381
5338
|
var CopyRspackPlugin = create2(
|
|
5382
|
-
|
|
5339
|
+
import_binding10.BuiltinPluginName.CopyRspackPlugin,
|
|
5383
5340
|
(copy) => {
|
|
5384
5341
|
const ret = {
|
|
5385
5342
|
patterns: []
|
|
@@ -5399,7 +5356,7 @@ var CopyRspackPlugin = create2(
|
|
|
5399
5356
|
);
|
|
5400
5357
|
|
|
5401
5358
|
// src/builtin-plugin/css-extract/index.ts
|
|
5402
|
-
var
|
|
5359
|
+
var import_binding11 = require("@rspack/binding");
|
|
5403
5360
|
var import_node_path3 = require("path");
|
|
5404
5361
|
|
|
5405
5362
|
// src/builtin-plugin/css-extract/loader.ts
|
|
@@ -5435,7 +5392,7 @@ var CssExtractRspackPlugin = class {
|
|
|
5435
5392
|
this.options.pathinfo = true;
|
|
5436
5393
|
}
|
|
5437
5394
|
compiler.__internal__registerBuiltinPlugin({
|
|
5438
|
-
name:
|
|
5395
|
+
name: import_binding11.BuiltinPluginName.CssExtractRspackPlugin,
|
|
5439
5396
|
options: this.normalizeOptions(this.options)
|
|
5440
5397
|
});
|
|
5441
5398
|
}
|
|
@@ -5484,7 +5441,8 @@ var CssExtractRspackPlugin = class {
|
|
|
5484
5441
|
obj[k] = v;
|
|
5485
5442
|
return obj;
|
|
5486
5443
|
}, {}) : {},
|
|
5487
|
-
pathinfo: options.pathinfo ?? false
|
|
5444
|
+
pathinfo: options.pathinfo ?? false,
|
|
5445
|
+
enforceRelative: options.enforceRelative ?? false
|
|
5488
5446
|
};
|
|
5489
5447
|
return normalzedOptions;
|
|
5490
5448
|
}
|
|
@@ -5493,27 +5451,27 @@ CssExtractRspackPlugin.pluginName = PLUGIN_NAME;
|
|
|
5493
5451
|
CssExtractRspackPlugin.loader = LOADER_PATH;
|
|
5494
5452
|
|
|
5495
5453
|
// src/builtin-plugin/CssModulesPlugin.ts
|
|
5496
|
-
var
|
|
5454
|
+
var import_binding12 = require("@rspack/binding");
|
|
5497
5455
|
var CssModulesPlugin = create2(
|
|
5498
|
-
|
|
5456
|
+
import_binding12.BuiltinPluginName.CssModulesPlugin,
|
|
5499
5457
|
() => {
|
|
5500
5458
|
},
|
|
5501
5459
|
"compilation"
|
|
5502
5460
|
);
|
|
5503
5461
|
|
|
5504
5462
|
// src/builtin-plugin/DataUriPlugin.ts
|
|
5505
|
-
var
|
|
5463
|
+
var import_binding13 = require("@rspack/binding");
|
|
5506
5464
|
var DataUriPlugin = create2(
|
|
5507
|
-
|
|
5465
|
+
import_binding13.BuiltinPluginName.DataUriPlugin,
|
|
5508
5466
|
() => {
|
|
5509
5467
|
},
|
|
5510
5468
|
"compilation"
|
|
5511
5469
|
);
|
|
5512
5470
|
|
|
5513
5471
|
// src/builtin-plugin/DefinePlugin.ts
|
|
5514
|
-
var
|
|
5472
|
+
var import_binding14 = require("@rspack/binding");
|
|
5515
5473
|
var DefinePlugin = create2(
|
|
5516
|
-
|
|
5474
|
+
import_binding14.BuiltinPluginName.DefinePlugin,
|
|
5517
5475
|
function(define) {
|
|
5518
5476
|
var _a;
|
|
5519
5477
|
const supportsBigIntLiteral = ((_a = this.options.output.environment) == null ? void 0 : _a.bigIntLiteral) ?? false;
|
|
@@ -5557,11 +5515,11 @@ var normalizeValue = (define, supportsBigIntLiteral) => {
|
|
|
5557
5515
|
};
|
|
5558
5516
|
|
|
5559
5517
|
// src/builtin-plugin/DeterministicChunkIdsPlugin.ts
|
|
5560
|
-
var
|
|
5518
|
+
var import_binding15 = require("@rspack/binding");
|
|
5561
5519
|
var DeterministicChunkIdsPlugin = class extends RspackBuiltinPlugin {
|
|
5562
5520
|
constructor() {
|
|
5563
5521
|
super(...arguments);
|
|
5564
|
-
this.name =
|
|
5522
|
+
this.name = import_binding15.BuiltinPluginName.DeterministicChunkIdsPlugin;
|
|
5565
5523
|
this.affectedHooks = "compilation";
|
|
5566
5524
|
}
|
|
5567
5525
|
raw(compiler) {
|
|
@@ -5580,11 +5538,11 @@ var DeterministicChunkIdsPlugin = class extends RspackBuiltinPlugin {
|
|
|
5580
5538
|
};
|
|
5581
5539
|
|
|
5582
5540
|
// src/builtin-plugin/DeterministicModuleIdsPlugin.ts
|
|
5583
|
-
var
|
|
5541
|
+
var import_binding16 = require("@rspack/binding");
|
|
5584
5542
|
var DeterministicModuleIdsPlugin = class extends RspackBuiltinPlugin {
|
|
5585
5543
|
constructor() {
|
|
5586
5544
|
super(...arguments);
|
|
5587
|
-
this.name =
|
|
5545
|
+
this.name = import_binding16.BuiltinPluginName.DeterministicModuleIdsPlugin;
|
|
5588
5546
|
this.affectedHooks = "compilation";
|
|
5589
5547
|
}
|
|
5590
5548
|
raw(compiler) {
|
|
@@ -5603,7 +5561,7 @@ var DeterministicModuleIdsPlugin = class extends RspackBuiltinPlugin {
|
|
|
5603
5561
|
};
|
|
5604
5562
|
|
|
5605
5563
|
// src/builtin-plugin/DynamicEntryPlugin.ts
|
|
5606
|
-
var
|
|
5564
|
+
var import_binding18 = require("@rspack/binding");
|
|
5607
5565
|
|
|
5608
5566
|
// src/lib/EntryOptionPlugin.ts
|
|
5609
5567
|
var import_node_assert = __toESM(require("assert"));
|
|
@@ -5676,9 +5634,9 @@ var EntryOptionPlugin = class _EntryOptionPlugin {
|
|
|
5676
5634
|
var EntryOptionPlugin_default = EntryOptionPlugin;
|
|
5677
5635
|
|
|
5678
5636
|
// src/builtin-plugin/EntryPlugin.ts
|
|
5679
|
-
var
|
|
5637
|
+
var import_binding17 = require("@rspack/binding");
|
|
5680
5638
|
var OriginEntryPlugin = create2(
|
|
5681
|
-
|
|
5639
|
+
import_binding17.BuiltinPluginName.EntryPlugin,
|
|
5682
5640
|
(context2, entry2, options = "") => {
|
|
5683
5641
|
const entryOptions = typeof options === "string" ? { name: options } : options;
|
|
5684
5642
|
return {
|
|
@@ -5718,7 +5676,7 @@ var DynamicEntryPlugin = class extends RspackBuiltinPlugin {
|
|
|
5718
5676
|
super();
|
|
5719
5677
|
this.context = context2;
|
|
5720
5678
|
this.entry = entry2;
|
|
5721
|
-
this.name =
|
|
5679
|
+
this.name = import_binding18.BuiltinPluginName.DynamicEntryPlugin;
|
|
5722
5680
|
this.affectedHooks = "make";
|
|
5723
5681
|
}
|
|
5724
5682
|
raw(compiler) {
|
|
@@ -5744,21 +5702,21 @@ var DynamicEntryPlugin = class extends RspackBuiltinPlugin {
|
|
|
5744
5702
|
};
|
|
5745
5703
|
|
|
5746
5704
|
// src/builtin-plugin/ElectronTargetPlugin.ts
|
|
5747
|
-
var
|
|
5705
|
+
var import_binding19 = require("@rspack/binding");
|
|
5748
5706
|
var ElectronTargetPlugin = create2(
|
|
5749
|
-
|
|
5707
|
+
import_binding19.BuiltinPluginName.ElectronTargetPlugin,
|
|
5750
5708
|
(context2) => context2 ?? "none"
|
|
5751
5709
|
);
|
|
5752
5710
|
|
|
5753
5711
|
// src/builtin-plugin/EnableChunkLoadingPlugin.ts
|
|
5754
|
-
var
|
|
5712
|
+
var import_binding20 = require("@rspack/binding");
|
|
5755
5713
|
var EnableChunkLoadingPlugin = create2(
|
|
5756
|
-
|
|
5714
|
+
import_binding20.BuiltinPluginName.EnableChunkLoadingPlugin,
|
|
5757
5715
|
(type) => type
|
|
5758
5716
|
);
|
|
5759
5717
|
|
|
5760
5718
|
// src/builtin-plugin/EnableLibraryPlugin.ts
|
|
5761
|
-
var
|
|
5719
|
+
var import_binding21 = require("@rspack/binding");
|
|
5762
5720
|
var enabledTypes = /* @__PURE__ */ new WeakMap();
|
|
5763
5721
|
var getEnabledTypes = (compiler) => {
|
|
5764
5722
|
let set = enabledTypes.get(compiler);
|
|
@@ -5772,7 +5730,7 @@ var EnableLibraryPlugin = class extends RspackBuiltinPlugin {
|
|
|
5772
5730
|
constructor(type) {
|
|
5773
5731
|
super();
|
|
5774
5732
|
this.type = type;
|
|
5775
|
-
this.name =
|
|
5733
|
+
this.name = import_binding21.BuiltinPluginName.EnableLibraryPlugin;
|
|
5776
5734
|
}
|
|
5777
5735
|
static setEnabled(compiler, type) {
|
|
5778
5736
|
getEnabledTypes(compiler).add(type);
|
|
@@ -5794,32 +5752,32 @@ var EnableLibraryPlugin = class extends RspackBuiltinPlugin {
|
|
|
5794
5752
|
};
|
|
5795
5753
|
|
|
5796
5754
|
// src/builtin-plugin/EnableWasmLoadingPlugin.ts
|
|
5797
|
-
var
|
|
5755
|
+
var import_binding22 = require("@rspack/binding");
|
|
5798
5756
|
var EnableWasmLoadingPlugin = create2(
|
|
5799
|
-
|
|
5757
|
+
import_binding22.BuiltinPluginName.EnableWasmLoadingPlugin,
|
|
5800
5758
|
(type) => type
|
|
5801
5759
|
);
|
|
5802
5760
|
|
|
5803
5761
|
// src/builtin-plugin/EnsureChunkConditionsPlugin.ts
|
|
5804
|
-
var
|
|
5762
|
+
var import_binding23 = require("@rspack/binding");
|
|
5805
5763
|
var EnsureChunkConditionsPlugin = create2(
|
|
5806
|
-
|
|
5764
|
+
import_binding23.BuiltinPluginName.EnsureChunkConditionsPlugin,
|
|
5807
5765
|
() => {
|
|
5808
5766
|
}
|
|
5809
5767
|
);
|
|
5810
5768
|
|
|
5811
5769
|
// src/builtin-plugin/EvalDevToolModulePlugin.ts
|
|
5812
|
-
var
|
|
5770
|
+
var import_binding24 = require("@rspack/binding");
|
|
5813
5771
|
var EvalDevToolModulePlugin = create2(
|
|
5814
|
-
|
|
5772
|
+
import_binding24.BuiltinPluginName.EvalDevToolModulePlugin,
|
|
5815
5773
|
(options) => options,
|
|
5816
5774
|
"compilation"
|
|
5817
5775
|
);
|
|
5818
5776
|
|
|
5819
5777
|
// src/builtin-plugin/EvalSourceMapDevToolPlugin.ts
|
|
5820
|
-
var
|
|
5778
|
+
var import_binding25 = require("@rspack/binding");
|
|
5821
5779
|
var EvalSourceMapDevToolPlugin = create2(
|
|
5822
|
-
|
|
5780
|
+
import_binding25.BuiltinPluginName.EvalSourceMapDevToolPlugin,
|
|
5823
5781
|
(options) => {
|
|
5824
5782
|
return {
|
|
5825
5783
|
filename: options.filename || void 0,
|
|
@@ -5835,11 +5793,11 @@ var EvalSourceMapDevToolPlugin = create2(
|
|
|
5835
5793
|
);
|
|
5836
5794
|
|
|
5837
5795
|
// src/builtin-plugin/ExternalsPlugin.ts
|
|
5838
|
-
var
|
|
5796
|
+
var import_binding28 = require("@rspack/binding");
|
|
5839
5797
|
|
|
5840
5798
|
// src/config/adapter.ts
|
|
5841
5799
|
var import_node_assert3 = __toESM(require("assert"));
|
|
5842
|
-
var
|
|
5800
|
+
var import_binding27 = require("@rspack/binding");
|
|
5843
5801
|
|
|
5844
5802
|
// src/util/identifier.ts
|
|
5845
5803
|
var import_node_path4 = __toESM(require("path"));
|
|
@@ -6147,7 +6105,7 @@ function toFeatures(featureOptions) {
|
|
|
6147
6105
|
var import_node_querystring = __toESM(require("querystring"));
|
|
6148
6106
|
var import_node_assert2 = __toESM(require("assert"));
|
|
6149
6107
|
var import_node_util3 = require("util");
|
|
6150
|
-
var
|
|
6108
|
+
var import_binding26 = require("@rspack/binding");
|
|
6151
6109
|
var import_webpack_sources2 = require("../compiled/webpack-sources/index.js");
|
|
6152
6110
|
|
|
6153
6111
|
// src/NormalModule.ts
|
|
@@ -6505,7 +6463,32 @@ function getCurrentLoader(loaderContext, index = loaderContext.loaderIndex) {
|
|
|
6505
6463
|
}
|
|
6506
6464
|
return null;
|
|
6507
6465
|
}
|
|
6466
|
+
var tracingCache;
|
|
6467
|
+
async function tryTrace(context2) {
|
|
6468
|
+
if (!process.env.RSPACK_PROFILE) {
|
|
6469
|
+
return {};
|
|
6470
|
+
}
|
|
6471
|
+
try {
|
|
6472
|
+
const {
|
|
6473
|
+
trace,
|
|
6474
|
+
propagation,
|
|
6475
|
+
context: tracingContext
|
|
6476
|
+
} = await import("@rspack/tracing");
|
|
6477
|
+
const tracer = trace.getTracer("rspack-loader-runner");
|
|
6478
|
+
const activeContext = propagation.extract(
|
|
6479
|
+
tracingContext.active(),
|
|
6480
|
+
context2.__internal__tracingCarrier
|
|
6481
|
+
);
|
|
6482
|
+
tracingCache = { tracer, activeContext };
|
|
6483
|
+
return tracingCache;
|
|
6484
|
+
} catch (error) {
|
|
6485
|
+
tracingCache = {};
|
|
6486
|
+
return tracingCache;
|
|
6487
|
+
}
|
|
6488
|
+
}
|
|
6508
6489
|
async function runLoaders(compiler, context2) {
|
|
6490
|
+
var _a, _b;
|
|
6491
|
+
const { tracer, activeContext } = await tryTrace(context2);
|
|
6509
6492
|
const loaderState = context2.loaderState;
|
|
6510
6493
|
const { resource } = context2.resourceData;
|
|
6511
6494
|
const splittedResource = resource && parsePathQueryFragment(resource);
|
|
@@ -6722,7 +6705,7 @@ async function runLoaders(compiler, context2) {
|
|
|
6722
6705
|
error.moduleIdentifier = this._module.identifier();
|
|
6723
6706
|
compiler._lastCompilation.__internal__pushRspackDiagnostic({
|
|
6724
6707
|
error,
|
|
6725
|
-
severity:
|
|
6708
|
+
severity: import_binding26.JsRspackSeverity.Error
|
|
6726
6709
|
});
|
|
6727
6710
|
};
|
|
6728
6711
|
loaderContext.emitWarning = function emitWarning(warn) {
|
|
@@ -6738,7 +6721,7 @@ async function runLoaders(compiler, context2) {
|
|
|
6738
6721
|
warning.moduleIdentifier = this._module.identifier();
|
|
6739
6722
|
compiler._lastCompilation.__internal__pushRspackDiagnostic({
|
|
6740
6723
|
error: warning,
|
|
6741
|
-
severity:
|
|
6724
|
+
severity: import_binding26.JsRspackSeverity.Warn
|
|
6742
6725
|
});
|
|
6743
6726
|
};
|
|
6744
6727
|
loaderContext.emitFile = function emitFile(name2, content, sourceMap, assetInfo) {
|
|
@@ -6779,7 +6762,7 @@ async function runLoaders(compiler, context2) {
|
|
|
6779
6762
|
moduleIdentifier: context2._module.moduleIdentifier
|
|
6780
6763
|
});
|
|
6781
6764
|
compiler._lastCompilation.__internal__pushDiagnostic(
|
|
6782
|
-
(0,
|
|
6765
|
+
(0, import_binding26.formatDiagnostic)(d)
|
|
6783
6766
|
);
|
|
6784
6767
|
}
|
|
6785
6768
|
};
|
|
@@ -6806,10 +6789,7 @@ async function runLoaders(compiler, context2) {
|
|
|
6806
6789
|
};
|
|
6807
6790
|
loaderContext._compiler = compiler;
|
|
6808
6791
|
loaderContext._compilation = compiler._lastCompilation;
|
|
6809
|
-
loaderContext._module = Module.__from_binding(
|
|
6810
|
-
context2._module,
|
|
6811
|
-
compiler._lastCompilation
|
|
6812
|
-
);
|
|
6792
|
+
loaderContext._module = Module.__from_binding(context2._module);
|
|
6813
6793
|
loaderContext.getOptions = () => {
|
|
6814
6794
|
const loader2 = getCurrentLoader(loaderContext);
|
|
6815
6795
|
let options = loader2 == null ? void 0 : loader2.options;
|
|
@@ -6869,7 +6849,7 @@ async function runLoaders(compiler, context2) {
|
|
|
6869
6849
|
});
|
|
6870
6850
|
try {
|
|
6871
6851
|
switch (loaderState) {
|
|
6872
|
-
case
|
|
6852
|
+
case import_binding26.JsLoaderState.Pitching: {
|
|
6873
6853
|
while (loaderContext.loaderIndex < loaderContext.loaders.length) {
|
|
6874
6854
|
const currentLoaderObject = loaderContext.loaders[loaderContext.loaderIndex];
|
|
6875
6855
|
if (currentLoaderObject.shouldYield()) break;
|
|
@@ -6881,11 +6861,21 @@ async function runLoaders(compiler, context2) {
|
|
|
6881
6861
|
const fn2 = currentLoaderObject.pitch;
|
|
6882
6862
|
currentLoaderObject.pitchExecuted = true;
|
|
6883
6863
|
if (!fn2) continue;
|
|
6864
|
+
const span = tracer == null ? void 0 : tracer.startSpan(
|
|
6865
|
+
"LoaderRunner:pitch",
|
|
6866
|
+
{
|
|
6867
|
+
attributes: {
|
|
6868
|
+
"loader.identifier": (_a = getCurrentLoader(loaderContext)) == null ? void 0 : _a.request
|
|
6869
|
+
}
|
|
6870
|
+
},
|
|
6871
|
+
activeContext
|
|
6872
|
+
);
|
|
6884
6873
|
const args = await runSyncOrAsync(fn2, loaderContext, [
|
|
6885
6874
|
loaderContext.remainingRequest,
|
|
6886
6875
|
loaderContext.previousRequest,
|
|
6887
6876
|
currentLoaderObject.data
|
|
6888
6877
|
]) || [];
|
|
6878
|
+
span == null ? void 0 : span.end();
|
|
6889
6879
|
const hasArg = args.some((value) => value !== void 0);
|
|
6890
6880
|
if (hasArg) {
|
|
6891
6881
|
const [content, sourceMap, additionalData] = args;
|
|
@@ -6897,7 +6887,7 @@ async function runLoaders(compiler, context2) {
|
|
|
6897
6887
|
}
|
|
6898
6888
|
break;
|
|
6899
6889
|
}
|
|
6900
|
-
case
|
|
6890
|
+
case import_binding26.JsLoaderState.Normal: {
|
|
6901
6891
|
let content = context2.content;
|
|
6902
6892
|
let sourceMap = JsSourceMap.__from_binding(context2.sourceMap);
|
|
6903
6893
|
let additionalData = context2.additionalData;
|
|
@@ -6914,7 +6904,17 @@ async function runLoaders(compiler, context2) {
|
|
|
6914
6904
|
if (!fn2) continue;
|
|
6915
6905
|
const args = [content, sourceMap, additionalData];
|
|
6916
6906
|
convertArgs(args, !!currentLoaderObject.raw);
|
|
6907
|
+
const span = tracer == null ? void 0 : tracer.startSpan(
|
|
6908
|
+
"LoaderRunner:normal",
|
|
6909
|
+
{
|
|
6910
|
+
attributes: {
|
|
6911
|
+
"loader.identifier": (_b = getCurrentLoader(loaderContext)) == null ? void 0 : _b.request
|
|
6912
|
+
}
|
|
6913
|
+
},
|
|
6914
|
+
activeContext
|
|
6915
|
+
);
|
|
6917
6916
|
[content, sourceMap, additionalData] = await runSyncOrAsync(fn2, loaderContext, args) || [];
|
|
6917
|
+
span == null ? void 0 : span.end();
|
|
6918
6918
|
}
|
|
6919
6919
|
context2.content = isNil(content) ? null : toBuffer(content);
|
|
6920
6920
|
context2.sourceMap = JsSourceMap.__to_binding(sourceMap);
|
|
@@ -7070,9 +7070,10 @@ var getRawOptions = (options, compiler) => {
|
|
|
7070
7070
|
const mode2 = options.mode;
|
|
7071
7071
|
const experiments3 = options.experiments;
|
|
7072
7072
|
return {
|
|
7073
|
+
name: options.name,
|
|
7073
7074
|
mode: mode2,
|
|
7074
7075
|
context: options.context,
|
|
7075
|
-
output: options.output,
|
|
7076
|
+
output: getRawOutput(options.output),
|
|
7076
7077
|
resolve: getRawResolve(options.resolve),
|
|
7077
7078
|
resolveLoader: getRawResolve(options.resolveLoader),
|
|
7078
7079
|
module: getRawModule(options.module, {
|
|
@@ -7089,11 +7090,34 @@ var getRawOptions = (options, compiler) => {
|
|
|
7089
7090
|
experiments: experiments3,
|
|
7090
7091
|
node: getRawNode(options.node),
|
|
7091
7092
|
profile: options.profile,
|
|
7092
|
-
amd: options.amd,
|
|
7093
|
+
amd: options.amd !== false ? JSON.stringify(options.amd || {}) : void 0,
|
|
7093
7094
|
bail: options.bail,
|
|
7094
7095
|
__references: {}
|
|
7095
7096
|
};
|
|
7096
7097
|
};
|
|
7098
|
+
function getRawOutput(output2) {
|
|
7099
|
+
return {
|
|
7100
|
+
...output2,
|
|
7101
|
+
environment: getRawOutputEnvironment(output2.environment)
|
|
7102
|
+
};
|
|
7103
|
+
}
|
|
7104
|
+
function getRawOutputEnvironment(environment2 = {}) {
|
|
7105
|
+
return {
|
|
7106
|
+
const: Boolean(environment2.const),
|
|
7107
|
+
arrowFunction: Boolean(environment2.arrowFunction),
|
|
7108
|
+
nodePrefixForCoreModules: Boolean(environment2.nodePrefixForCoreModules),
|
|
7109
|
+
asyncFunction: Boolean(environment2.asyncFunction),
|
|
7110
|
+
bigIntLiteral: Boolean(environment2.bigIntLiteral),
|
|
7111
|
+
destructuring: Boolean(environment2.destructuring),
|
|
7112
|
+
document: Boolean(environment2.document),
|
|
7113
|
+
dynamicImport: Boolean(environment2.dynamicImport),
|
|
7114
|
+
forOf: Boolean(environment2.forOf),
|
|
7115
|
+
globalThis: Boolean(environment2.globalThis),
|
|
7116
|
+
module: Boolean(environment2.module),
|
|
7117
|
+
optionalChaining: Boolean(environment2.optionalChaining),
|
|
7118
|
+
templateLiteral: Boolean(environment2.templateLiteral)
|
|
7119
|
+
};
|
|
7120
|
+
}
|
|
7097
7121
|
function getRawExtensionAlias(alias = {}) {
|
|
7098
7122
|
const entries = Object.entries(alias).map(([key, value]) => {
|
|
7099
7123
|
if (Array.isArray(value)) {
|
|
@@ -7282,31 +7306,31 @@ var getRawModuleRule = (rule, path11, options, upperType) => {
|
|
|
7282
7306
|
function getRawRuleSetCondition(condition) {
|
|
7283
7307
|
if (typeof condition === "string") {
|
|
7284
7308
|
return {
|
|
7285
|
-
type:
|
|
7309
|
+
type: import_binding27.RawRuleSetConditionType.string,
|
|
7286
7310
|
string: condition
|
|
7287
7311
|
};
|
|
7288
7312
|
}
|
|
7289
7313
|
if (condition instanceof RegExp) {
|
|
7290
7314
|
return {
|
|
7291
|
-
type:
|
|
7315
|
+
type: import_binding27.RawRuleSetConditionType.regexp,
|
|
7292
7316
|
regexp: condition
|
|
7293
7317
|
};
|
|
7294
7318
|
}
|
|
7295
7319
|
if (typeof condition === "function") {
|
|
7296
7320
|
return {
|
|
7297
|
-
type:
|
|
7321
|
+
type: import_binding27.RawRuleSetConditionType.func,
|
|
7298
7322
|
func: condition
|
|
7299
7323
|
};
|
|
7300
7324
|
}
|
|
7301
7325
|
if (Array.isArray(condition)) {
|
|
7302
7326
|
return {
|
|
7303
|
-
type:
|
|
7327
|
+
type: import_binding27.RawRuleSetConditionType.array,
|
|
7304
7328
|
array: condition.map((i) => getRawRuleSetCondition(i))
|
|
7305
7329
|
};
|
|
7306
7330
|
}
|
|
7307
7331
|
if (typeof condition === "object" && condition !== null) {
|
|
7308
7332
|
return {
|
|
7309
|
-
type:
|
|
7333
|
+
type: import_binding27.RawRuleSetConditionType.logical,
|
|
7310
7334
|
logical: [getRawRuleSetLogicalConditions(condition)]
|
|
7311
7335
|
};
|
|
7312
7336
|
}
|
|
@@ -7437,7 +7461,8 @@ function getRawCssParserOptions(parser) {
|
|
|
7437
7461
|
}
|
|
7438
7462
|
function getRawJsonParserOptions(parser) {
|
|
7439
7463
|
return {
|
|
7440
|
-
exportsDepth: parser.exportsDepth
|
|
7464
|
+
exportsDepth: parser.exportsDepth,
|
|
7465
|
+
parse: typeof parser.parse === "function" ? (str) => JSON.stringify(parser.parse(str)) : void 0
|
|
7441
7466
|
};
|
|
7442
7467
|
}
|
|
7443
7468
|
function getRawGeneratorOptions(generator, type) {
|
|
@@ -7503,7 +7528,8 @@ function getRawAssetResourceGeneratorOptions(options) {
|
|
|
7503
7528
|
emit: options.emit,
|
|
7504
7529
|
filename: options.filename,
|
|
7505
7530
|
outputPath: options.outputPath,
|
|
7506
|
-
publicPath: options.publicPath
|
|
7531
|
+
publicPath: options.publicPath,
|
|
7532
|
+
importMode: options.importMode
|
|
7507
7533
|
};
|
|
7508
7534
|
}
|
|
7509
7535
|
function getRawAssetGeneratorDataUrl(dataUrl) {
|
|
@@ -8760,6 +8786,7 @@ var applyExperimentsDefaults = (experiments3, { production, development }) => {
|
|
|
8760
8786
|
D(experiments3.incremental, "emitAssets", true);
|
|
8761
8787
|
}
|
|
8762
8788
|
D(experiments3, "rspackFuture", {});
|
|
8789
|
+
D(experiments3, "parallelCodeSplitting", false);
|
|
8763
8790
|
};
|
|
8764
8791
|
var applybundlerInfoDefaults = (rspackFuture, library3) => {
|
|
8765
8792
|
if (typeof rspackFuture === "object") {
|
|
@@ -9460,6 +9487,9 @@ var getResolveDefaults = ({
|
|
|
9460
9487
|
extensions: [...jsExtensions]
|
|
9461
9488
|
});
|
|
9462
9489
|
const resolveOptions2 = {
|
|
9490
|
+
// enable pnp only in pnp environment, see https://yarnpkg.com/advanced/pnpapi#processversionspnp
|
|
9491
|
+
// IGNORE(resolve.pnp): Rspack use `resolve.enable` to enable yarn pnp feature
|
|
9492
|
+
pnp: !!process.versions.pnp,
|
|
9463
9493
|
modules: ["node_modules"],
|
|
9464
9494
|
conditionNames: conditions,
|
|
9465
9495
|
mainFiles: ["index"],
|
|
@@ -9480,7 +9510,7 @@ var getResolveDefaults = ({
|
|
|
9480
9510
|
preferRelative: true
|
|
9481
9511
|
},
|
|
9482
9512
|
commonjs: cjsDeps(),
|
|
9483
|
-
|
|
9513
|
+
amd: cjsDeps(),
|
|
9484
9514
|
// for backward-compat: loadModule
|
|
9485
9515
|
// loader: cjsDeps(),
|
|
9486
9516
|
// for backward-compat: Custom Dependency and getResolve without dependencyType
|
|
@@ -9774,13 +9804,14 @@ var getNormalizedRspackOptions = (config2) => {
|
|
|
9774
9804
|
chunksRender: true,
|
|
9775
9805
|
emitAssets: true
|
|
9776
9806
|
} : options
|
|
9777
|
-
)
|
|
9807
|
+
),
|
|
9808
|
+
parallelCodeSplitting: experiments3.parallelCodeSplitting
|
|
9778
9809
|
})),
|
|
9779
9810
|
watch: config2.watch,
|
|
9780
9811
|
watchOptions: cloneObject(config2.watchOptions),
|
|
9781
9812
|
devServer: config2.devServer,
|
|
9782
9813
|
profile: config2.profile,
|
|
9783
|
-
amd: config2.amd
|
|
9814
|
+
amd: config2.amd,
|
|
9784
9815
|
bail: config2.bail
|
|
9785
9816
|
};
|
|
9786
9817
|
};
|
|
@@ -10288,7 +10319,8 @@ var baseResolveOptions = import_zod2.z.strictObject({
|
|
|
10288
10319
|
extensionAlias: import_zod2.z.record(import_zod2.z.string().or(import_zod2.z.array(import_zod2.z.string()))).optional(),
|
|
10289
10320
|
aliasFields: import_zod2.z.array(import_zod2.z.string()).optional(),
|
|
10290
10321
|
restrictions: import_zod2.z.array(import_zod2.z.string()).optional(),
|
|
10291
|
-
roots: import_zod2.z.array(import_zod2.z.string()).optional()
|
|
10322
|
+
roots: import_zod2.z.array(import_zod2.z.string()).optional(),
|
|
10323
|
+
pnp: import_zod2.z.boolean().optional()
|
|
10292
10324
|
});
|
|
10293
10325
|
var resolveOptions = baseResolveOptions.extend({
|
|
10294
10326
|
byDependency: import_zod2.z.lazy(() => import_zod2.z.record(resolveOptions)).optional()
|
|
@@ -10669,6 +10701,8 @@ var externalItem = import_zod2.z.string().or(import_zod2.z.instanceof(RegExp)).o
|
|
|
10669
10701
|
)
|
|
10670
10702
|
).or(
|
|
10671
10703
|
import_zod2.z.function().args(externalItemFunctionData).returns(import_zod2.z.promise(externalItemValue))
|
|
10704
|
+
).or(
|
|
10705
|
+
import_zod2.z.function().args(externalItemFunctionData).returns(externalItemValue)
|
|
10672
10706
|
);
|
|
10673
10707
|
var externals = externalItem.array().or(externalItem);
|
|
10674
10708
|
var externalsPresets = import_zod2.z.strictObject({
|
|
@@ -10838,10 +10872,8 @@ var optimizationRuntimeChunk = import_zod2.z.enum(["single", "multiple"]).or(imp
|
|
|
10838
10872
|
).optional()
|
|
10839
10873
|
})
|
|
10840
10874
|
);
|
|
10841
|
-
var optimizationSplitChunksNameFunction = import_zod2.z.function().args(
|
|
10842
|
-
import_zod2.z.
|
|
10843
|
-
// FIXME: z.array(z.instanceof(Chunk)).optional(), z.string()
|
|
10844
|
-
// FIXME: Chunk[], cacheChunkKey
|
|
10875
|
+
var optimizationSplitChunksNameFunction = import_zod2.z.function().args(import_zod2.z.instanceof(Module), import_zod2.z.array(import_zod2.z.instanceof(Chunk)), import_zod2.z.string()).returns(
|
|
10876
|
+
import_zod2.z.string().optional()
|
|
10845
10877
|
);
|
|
10846
10878
|
var optimizationSplitChunksName = import_zod2.z.string().or(import_zod2.z.literal(false)).or(optimizationSplitChunksNameFunction);
|
|
10847
10879
|
var optimizationSplitChunksChunks = import_zod2.z.enum(["initial", "async", "all"]).or(import_zod2.z.instanceof(RegExp)).or(
|
|
@@ -10983,6 +11015,7 @@ var experiments = import_zod2.z.strictObject({
|
|
|
10983
11015
|
css: import_zod2.z.boolean().optional(),
|
|
10984
11016
|
layers: import_zod2.z.boolean().optional(),
|
|
10985
11017
|
incremental: import_zod2.z.boolean().or(incremental).optional(),
|
|
11018
|
+
parallelCodeSplitting: import_zod2.z.boolean().optional(),
|
|
10986
11019
|
futureDefaults: import_zod2.z.boolean().optional(),
|
|
10987
11020
|
rspackFuture: rspackFutureOptions.optional()
|
|
10988
11021
|
});
|
|
@@ -11084,7 +11117,7 @@ var ExternalsPlugin = class extends RspackBuiltinPlugin {
|
|
|
11084
11117
|
super();
|
|
11085
11118
|
this.type = type;
|
|
11086
11119
|
this.externals = externals2;
|
|
11087
|
-
this.name =
|
|
11120
|
+
this.name = import_binding28.BuiltinPluginName.ExternalsPlugin;
|
|
11088
11121
|
}
|
|
11089
11122
|
raw(compiler) {
|
|
11090
11123
|
const { type, externals: externals2 } = this;
|
|
@@ -11168,6 +11201,13 @@ function getRawExternalItem(compiler, item) {
|
|
|
11168
11201
|
}),
|
|
11169
11202
|
(e) => reject(e)
|
|
11170
11203
|
);
|
|
11204
|
+
} else if (item.length === 1) {
|
|
11205
|
+
resolve2({
|
|
11206
|
+
result: getRawExternalItemValueFormFnResult(
|
|
11207
|
+
promise
|
|
11208
|
+
),
|
|
11209
|
+
externalType: void 0
|
|
11210
|
+
});
|
|
11171
11211
|
}
|
|
11172
11212
|
});
|
|
11173
11213
|
};
|
|
@@ -11192,30 +11232,30 @@ function getRawExternalItemValue(value) {
|
|
|
11192
11232
|
}
|
|
11193
11233
|
|
|
11194
11234
|
// src/builtin-plugin/FileUriPlugin.ts
|
|
11195
|
-
var
|
|
11235
|
+
var import_binding29 = require("@rspack/binding");
|
|
11196
11236
|
var FileUriPlugin = create2(
|
|
11197
|
-
|
|
11237
|
+
import_binding29.BuiltinPluginName.FileUriPlugin,
|
|
11198
11238
|
() => {
|
|
11199
11239
|
},
|
|
11200
11240
|
"compilation"
|
|
11201
11241
|
);
|
|
11202
11242
|
|
|
11203
11243
|
// src/builtin-plugin/FlagDependencyExportsPlugin.ts
|
|
11204
|
-
var
|
|
11244
|
+
var import_binding30 = require("@rspack/binding");
|
|
11205
11245
|
var FlagDependencyExportsPlugin = create2(
|
|
11206
|
-
|
|
11246
|
+
import_binding30.BuiltinPluginName.FlagDependencyExportsPlugin,
|
|
11207
11247
|
() => {
|
|
11208
11248
|
},
|
|
11209
11249
|
"compilation"
|
|
11210
11250
|
);
|
|
11211
11251
|
|
|
11212
11252
|
// src/builtin-plugin/FlagDependencyUsagePlugin.ts
|
|
11213
|
-
var
|
|
11253
|
+
var import_binding31 = require("@rspack/binding");
|
|
11214
11254
|
var FlagDependencyUsagePlugin = class extends RspackBuiltinPlugin {
|
|
11215
11255
|
constructor(global) {
|
|
11216
11256
|
super();
|
|
11217
11257
|
this.global = global;
|
|
11218
|
-
this.name =
|
|
11258
|
+
this.name = import_binding31.BuiltinPluginName.FlagDependencyUsagePlugin;
|
|
11219
11259
|
this.affectedHooks = "compilation";
|
|
11220
11260
|
}
|
|
11221
11261
|
raw(compiler) {
|
|
@@ -11246,11 +11286,11 @@ var FlagDependencyUsagePlugin = class extends RspackBuiltinPlugin {
|
|
|
11246
11286
|
};
|
|
11247
11287
|
|
|
11248
11288
|
// src/builtin-plugin/HotModuleReplacementPlugin.ts
|
|
11249
|
-
var
|
|
11289
|
+
var import_binding32 = require("@rspack/binding");
|
|
11250
11290
|
var HotModuleReplacementPlugin = class extends RspackBuiltinPlugin {
|
|
11251
11291
|
constructor() {
|
|
11252
11292
|
super(...arguments);
|
|
11253
|
-
this.name =
|
|
11293
|
+
this.name = import_binding32.BuiltinPluginName.HotModuleReplacementPlugin;
|
|
11254
11294
|
}
|
|
11255
11295
|
raw(compiler) {
|
|
11256
11296
|
if (compiler.options.output.strictModuleErrorHandling === void 0) {
|
|
@@ -11263,7 +11303,7 @@ var HotModuleReplacementPlugin = class extends RspackBuiltinPlugin {
|
|
|
11263
11303
|
// src/builtin-plugin/HtmlRspackPlugin.ts
|
|
11264
11304
|
var import_node_fs2 = __toESM(require("fs"));
|
|
11265
11305
|
var import_node_path9 = __toESM(require("path"));
|
|
11266
|
-
var
|
|
11306
|
+
var import_binding33 = require("@rspack/binding");
|
|
11267
11307
|
var liteTapable3 = __toESM(require("@rspack/lite-tapable"));
|
|
11268
11308
|
var import_zod3 = require("../compiled/zod/index.js");
|
|
11269
11309
|
|
|
@@ -11553,7 +11593,7 @@ var htmlRspackPluginOptions = import_zod3.z.strictObject({
|
|
|
11553
11593
|
hash: import_zod3.z.boolean().optional()
|
|
11554
11594
|
});
|
|
11555
11595
|
var HtmlRspackPluginImpl = create2(
|
|
11556
|
-
|
|
11596
|
+
import_binding33.BuiltinPluginName.HtmlRspackPlugin,
|
|
11557
11597
|
function(c = {}) {
|
|
11558
11598
|
validate(c, htmlRspackPluginOptions);
|
|
11559
11599
|
const meta = {};
|
|
@@ -11792,9 +11832,9 @@ HtmlRspackPlugin.getHooks = HtmlRspackPlugin.getCompilationHooks = (compilation)
|
|
|
11792
11832
|
HtmlRspackPlugin.version = 5;
|
|
11793
11833
|
|
|
11794
11834
|
// src/builtin-plugin/HttpExternalsRspackPlugin.ts
|
|
11795
|
-
var
|
|
11835
|
+
var import_binding34 = require("@rspack/binding");
|
|
11796
11836
|
var HttpExternalsRspackPlugin = create2(
|
|
11797
|
-
|
|
11837
|
+
import_binding34.BuiltinPluginName.HttpExternalsRspackPlugin,
|
|
11798
11838
|
(css, webAsync) => {
|
|
11799
11839
|
return {
|
|
11800
11840
|
css,
|
|
@@ -11804,7 +11844,7 @@ var HttpExternalsRspackPlugin = create2(
|
|
|
11804
11844
|
);
|
|
11805
11845
|
|
|
11806
11846
|
// src/builtin-plugin/IgnorePlugin.ts
|
|
11807
|
-
var
|
|
11847
|
+
var import_binding35 = require("@rspack/binding");
|
|
11808
11848
|
var import_zod4 = require("../compiled/zod/index.js");
|
|
11809
11849
|
var IgnorePluginOptions = import_zod4.z.union([
|
|
11810
11850
|
import_zod4.z.object({
|
|
@@ -11816,7 +11856,7 @@ var IgnorePluginOptions = import_zod4.z.union([
|
|
|
11816
11856
|
})
|
|
11817
11857
|
]);
|
|
11818
11858
|
var IgnorePlugin = create2(
|
|
11819
|
-
|
|
11859
|
+
import_binding35.BuiltinPluginName.IgnorePlugin,
|
|
11820
11860
|
(options) => {
|
|
11821
11861
|
validate(options, IgnorePluginOptions);
|
|
11822
11862
|
return options;
|
|
@@ -11824,22 +11864,22 @@ var IgnorePlugin = create2(
|
|
|
11824
11864
|
);
|
|
11825
11865
|
|
|
11826
11866
|
// src/builtin-plugin/InferAsyncModulesPlugin.ts
|
|
11827
|
-
var
|
|
11867
|
+
var import_binding36 = require("@rspack/binding");
|
|
11828
11868
|
var InferAsyncModulesPlugin = create2(
|
|
11829
|
-
|
|
11869
|
+
import_binding36.BuiltinPluginName.InferAsyncModulesPlugin,
|
|
11830
11870
|
() => {
|
|
11831
11871
|
},
|
|
11832
11872
|
"compilation"
|
|
11833
11873
|
);
|
|
11834
11874
|
|
|
11835
11875
|
// src/builtin-plugin/JavascriptModulesPlugin.ts
|
|
11836
|
-
var
|
|
11876
|
+
var import_binding37 = require("@rspack/binding");
|
|
11837
11877
|
var liteTapable4 = __toESM(require("@rspack/lite-tapable"));
|
|
11838
11878
|
var compilationHooksMap3 = /* @__PURE__ */ new WeakMap();
|
|
11839
11879
|
var JavascriptModulesPlugin = class extends RspackBuiltinPlugin {
|
|
11840
11880
|
constructor() {
|
|
11841
11881
|
super(...arguments);
|
|
11842
|
-
this.name =
|
|
11882
|
+
this.name = import_binding37.BuiltinPluginName.JavascriptModulesPlugin;
|
|
11843
11883
|
this.affectedHooks = "compilation";
|
|
11844
11884
|
}
|
|
11845
11885
|
raw() {
|
|
@@ -11863,18 +11903,18 @@ var JavascriptModulesPlugin = class extends RspackBuiltinPlugin {
|
|
|
11863
11903
|
};
|
|
11864
11904
|
|
|
11865
11905
|
// src/builtin-plugin/JsLoaderRspackPlugin.ts
|
|
11866
|
-
var
|
|
11906
|
+
var import_binding38 = require("@rspack/binding");
|
|
11867
11907
|
var JsLoaderRspackPlugin = create2(
|
|
11868
|
-
|
|
11908
|
+
import_binding38.BuiltinPluginName.JsLoaderRspackPlugin,
|
|
11869
11909
|
(compiler) => runLoaders.bind(null, compiler),
|
|
11870
11910
|
/* Not Inheretable */
|
|
11871
11911
|
"thisCompilation"
|
|
11872
11912
|
);
|
|
11873
11913
|
|
|
11874
11914
|
// src/builtin-plugin/JsonModulesPlugin.ts
|
|
11875
|
-
var
|
|
11915
|
+
var import_binding39 = require("@rspack/binding");
|
|
11876
11916
|
var JsonModulesPlugin = create2(
|
|
11877
|
-
|
|
11917
|
+
import_binding39.BuiltinPluginName.JsonModulesPlugin,
|
|
11878
11918
|
() => {
|
|
11879
11919
|
},
|
|
11880
11920
|
"compilation"
|
|
@@ -12010,9 +12050,9 @@ function moduleImpl(args) {
|
|
|
12010
12050
|
}
|
|
12011
12051
|
|
|
12012
12052
|
// src/builtin-plugin/lazy-compilation/lazyCompilation.ts
|
|
12013
|
-
var
|
|
12053
|
+
var import_binding40 = require("@rspack/binding");
|
|
12014
12054
|
var BuiltinLazyCompilationPlugin = create2(
|
|
12015
|
-
|
|
12055
|
+
import_binding40.BuiltinPluginName.LazyCompilationPlugin,
|
|
12016
12056
|
(module2, cacheable, entries, imports, test) => ({ module: module2, cacheable, imports, entries, test }),
|
|
12017
12057
|
"thisCompilation"
|
|
12018
12058
|
);
|
|
@@ -12028,8 +12068,8 @@ var LazyCompilationPlugin = class {
|
|
|
12028
12068
|
}
|
|
12029
12069
|
apply(compiler) {
|
|
12030
12070
|
const backend = backend_default({
|
|
12031
|
-
|
|
12032
|
-
|
|
12071
|
+
client: require.resolve(`../hot/lazy-compilation-${compiler.options.externalsPresets.node ? "node" : "web"}.js`),
|
|
12072
|
+
...this.backend
|
|
12033
12073
|
});
|
|
12034
12074
|
new BuiltinLazyCompilationPlugin(
|
|
12035
12075
|
moduleImpl,
|
|
@@ -12057,21 +12097,21 @@ var LazyCompilationPlugin = class {
|
|
|
12057
12097
|
};
|
|
12058
12098
|
|
|
12059
12099
|
// src/builtin-plugin/LimitChunkCountPlugin.ts
|
|
12060
|
-
var
|
|
12100
|
+
var import_binding41 = require("@rspack/binding");
|
|
12061
12101
|
var LimitChunkCountPlugin = create2(
|
|
12062
|
-
|
|
12102
|
+
import_binding41.BuiltinPluginName.LimitChunkCountPlugin,
|
|
12063
12103
|
(options) => {
|
|
12064
12104
|
return options;
|
|
12065
12105
|
}
|
|
12066
12106
|
);
|
|
12067
12107
|
|
|
12068
12108
|
// src/builtin-plugin/MangleExportsPlugin.ts
|
|
12069
|
-
var
|
|
12109
|
+
var import_binding42 = require("@rspack/binding");
|
|
12070
12110
|
var MangleExportsPlugin = class extends RspackBuiltinPlugin {
|
|
12071
12111
|
constructor(deterministic) {
|
|
12072
12112
|
super();
|
|
12073
12113
|
this.deterministic = deterministic;
|
|
12074
|
-
this.name =
|
|
12114
|
+
this.name = import_binding42.BuiltinPluginName.MangleExportsPlugin;
|
|
12075
12115
|
this.affectedHooks = "compilation";
|
|
12076
12116
|
}
|
|
12077
12117
|
raw(compiler) {
|
|
@@ -12102,27 +12142,27 @@ var MangleExportsPlugin = class extends RspackBuiltinPlugin {
|
|
|
12102
12142
|
};
|
|
12103
12143
|
|
|
12104
12144
|
// src/builtin-plugin/MergeDuplicateChunksPlugin.ts
|
|
12105
|
-
var
|
|
12145
|
+
var import_binding43 = require("@rspack/binding");
|
|
12106
12146
|
var MergeDuplicateChunksPlugin = create2(
|
|
12107
|
-
|
|
12147
|
+
import_binding43.BuiltinPluginName.MergeDuplicateChunksPlugin,
|
|
12108
12148
|
() => {
|
|
12109
12149
|
}
|
|
12110
12150
|
);
|
|
12111
12151
|
|
|
12112
12152
|
// src/builtin-plugin/ModuleChunkFormatPlugin.ts
|
|
12113
|
-
var
|
|
12153
|
+
var import_binding44 = require("@rspack/binding");
|
|
12114
12154
|
var ModuleChunkFormatPlugin = create2(
|
|
12115
|
-
|
|
12155
|
+
import_binding44.BuiltinPluginName.ModuleChunkFormatPlugin,
|
|
12116
12156
|
() => {
|
|
12117
12157
|
}
|
|
12118
12158
|
);
|
|
12119
12159
|
|
|
12120
12160
|
// src/builtin-plugin/ModuleConcatenationPlugin.ts
|
|
12121
|
-
var
|
|
12161
|
+
var import_binding45 = require("@rspack/binding");
|
|
12122
12162
|
var ModuleConcatenationPlugin = class extends RspackBuiltinPlugin {
|
|
12123
12163
|
constructor() {
|
|
12124
12164
|
super(...arguments);
|
|
12125
|
-
this.name =
|
|
12165
|
+
this.name = import_binding45.BuiltinPluginName.ModuleConcatenationPlugin;
|
|
12126
12166
|
this.affectedHooks = "compilation";
|
|
12127
12167
|
}
|
|
12128
12168
|
raw(compiler) {
|
|
@@ -12177,29 +12217,29 @@ var ModuleConcatenationPlugin = class extends RspackBuiltinPlugin {
|
|
|
12177
12217
|
};
|
|
12178
12218
|
|
|
12179
12219
|
// src/builtin-plugin/NamedChunkIdsPlugin.ts
|
|
12180
|
-
var
|
|
12220
|
+
var import_binding46 = require("@rspack/binding");
|
|
12181
12221
|
var NamedChunkIdsPlugin = create2(
|
|
12182
|
-
|
|
12222
|
+
import_binding46.BuiltinPluginName.NamedChunkIdsPlugin,
|
|
12183
12223
|
() => {
|
|
12184
12224
|
},
|
|
12185
12225
|
"compilation"
|
|
12186
12226
|
);
|
|
12187
12227
|
|
|
12188
12228
|
// src/builtin-plugin/NamedModuleIdsPlugin.ts
|
|
12189
|
-
var
|
|
12229
|
+
var import_binding47 = require("@rspack/binding");
|
|
12190
12230
|
var NamedModuleIdsPlugin = create2(
|
|
12191
|
-
|
|
12231
|
+
import_binding47.BuiltinPluginName.NamedModuleIdsPlugin,
|
|
12192
12232
|
() => {
|
|
12193
12233
|
},
|
|
12194
12234
|
"compilation"
|
|
12195
12235
|
);
|
|
12196
12236
|
|
|
12197
12237
|
// src/builtin-plugin/NaturalChunkIdsPlugin.ts
|
|
12198
|
-
var
|
|
12238
|
+
var import_binding48 = require("@rspack/binding");
|
|
12199
12239
|
var NaturalChunkIdsPlugin = class extends RspackBuiltinPlugin {
|
|
12200
12240
|
constructor() {
|
|
12201
12241
|
super(...arguments);
|
|
12202
|
-
this.name =
|
|
12242
|
+
this.name = import_binding48.BuiltinPluginName.NaturalChunkIdsPlugin;
|
|
12203
12243
|
this.affectedHooks = "compilation";
|
|
12204
12244
|
}
|
|
12205
12245
|
raw(compiler) {
|
|
@@ -12218,11 +12258,11 @@ var NaturalChunkIdsPlugin = class extends RspackBuiltinPlugin {
|
|
|
12218
12258
|
};
|
|
12219
12259
|
|
|
12220
12260
|
// src/builtin-plugin/NaturalModuleIdsPlugin.ts
|
|
12221
|
-
var
|
|
12261
|
+
var import_binding49 = require("@rspack/binding");
|
|
12222
12262
|
var NaturalModuleIdsPlugin = class extends RspackBuiltinPlugin {
|
|
12223
12263
|
constructor() {
|
|
12224
12264
|
super(...arguments);
|
|
12225
|
-
this.name =
|
|
12265
|
+
this.name = import_binding49.BuiltinPluginName.NaturalModuleIdsPlugin;
|
|
12226
12266
|
this.affectedHooks = "compilation";
|
|
12227
12267
|
}
|
|
12228
12268
|
raw(compiler) {
|
|
@@ -12241,24 +12281,24 @@ var NaturalModuleIdsPlugin = class extends RspackBuiltinPlugin {
|
|
|
12241
12281
|
};
|
|
12242
12282
|
|
|
12243
12283
|
// src/builtin-plugin/NodeTargetPlugin.ts
|
|
12244
|
-
var
|
|
12284
|
+
var import_binding50 = require("@rspack/binding");
|
|
12245
12285
|
var NodeTargetPlugin = create2(
|
|
12246
|
-
|
|
12286
|
+
import_binding50.BuiltinPluginName.NodeTargetPlugin,
|
|
12247
12287
|
() => void 0
|
|
12248
12288
|
);
|
|
12249
12289
|
|
|
12250
12290
|
// src/builtin-plugin/OccurrenceChunkIdsPlugin.ts
|
|
12251
|
-
var
|
|
12291
|
+
var import_binding51 = require("@rspack/binding");
|
|
12252
12292
|
var OccurrenceChunkIdsPlugin = create2(
|
|
12253
|
-
|
|
12293
|
+
import_binding51.BuiltinPluginName.OccurrenceChunkIdsPlugin,
|
|
12254
12294
|
(options) => ({ ...options }),
|
|
12255
12295
|
"compilation"
|
|
12256
12296
|
);
|
|
12257
12297
|
|
|
12258
12298
|
// src/builtin-plugin/ProgressPlugin.ts
|
|
12259
|
-
var
|
|
12299
|
+
var import_binding52 = require("@rspack/binding");
|
|
12260
12300
|
var ProgressPlugin = create2(
|
|
12261
|
-
|
|
12301
|
+
import_binding52.BuiltinPluginName.ProgressPlugin,
|
|
12262
12302
|
(progress = {}) => {
|
|
12263
12303
|
if (typeof progress === "function") {
|
|
12264
12304
|
return {
|
|
@@ -12272,9 +12312,9 @@ var ProgressPlugin = create2(
|
|
|
12272
12312
|
);
|
|
12273
12313
|
|
|
12274
12314
|
// src/builtin-plugin/ProvidePlugin.ts
|
|
12275
|
-
var
|
|
12315
|
+
var import_binding53 = require("@rspack/binding");
|
|
12276
12316
|
var ProvidePlugin = create2(
|
|
12277
|
-
|
|
12317
|
+
import_binding53.BuiltinPluginName.ProvidePlugin,
|
|
12278
12318
|
(provide) => {
|
|
12279
12319
|
const entries = Object.entries(provide).map(([key, value]) => {
|
|
12280
12320
|
if (typeof value === "string") {
|
|
@@ -12288,53 +12328,53 @@ var ProvidePlugin = create2(
|
|
|
12288
12328
|
);
|
|
12289
12329
|
|
|
12290
12330
|
// src/builtin-plugin/RealContentHashPlugin.ts
|
|
12291
|
-
var
|
|
12331
|
+
var import_binding54 = require("@rspack/binding");
|
|
12292
12332
|
var RealContentHashPlugin = create2(
|
|
12293
|
-
|
|
12333
|
+
import_binding54.BuiltinPluginName.RealContentHashPlugin,
|
|
12294
12334
|
() => {
|
|
12295
12335
|
},
|
|
12296
12336
|
"compilation"
|
|
12297
12337
|
);
|
|
12298
12338
|
|
|
12299
12339
|
// src/builtin-plugin/RemoveEmptyChunksPlugin.ts
|
|
12300
|
-
var
|
|
12340
|
+
var import_binding55 = require("@rspack/binding");
|
|
12301
12341
|
var RemoveEmptyChunksPlugin = create2(
|
|
12302
|
-
|
|
12342
|
+
import_binding55.BuiltinPluginName.RemoveEmptyChunksPlugin,
|
|
12303
12343
|
() => {
|
|
12304
12344
|
},
|
|
12305
12345
|
"compilation"
|
|
12306
12346
|
);
|
|
12307
12347
|
|
|
12308
12348
|
// src/builtin-plugin/RuntimeChunkPlugin.ts
|
|
12309
|
-
var
|
|
12349
|
+
var import_binding56 = require("@rspack/binding");
|
|
12310
12350
|
var RuntimeChunkPlugin = create2(
|
|
12311
|
-
|
|
12351
|
+
import_binding56.BuiltinPluginName.RuntimeChunkPlugin,
|
|
12312
12352
|
(options) => options,
|
|
12313
12353
|
"thisCompilation"
|
|
12314
12354
|
);
|
|
12315
12355
|
|
|
12316
12356
|
// src/builtin-plugin/RuntimePlugin.ts
|
|
12317
|
-
var
|
|
12357
|
+
var import_binding57 = require("@rspack/binding");
|
|
12318
12358
|
var RuntimePlugin = create2(
|
|
12319
|
-
|
|
12359
|
+
import_binding57.BuiltinPluginName.RuntimePlugin,
|
|
12320
12360
|
() => {
|
|
12321
12361
|
},
|
|
12322
12362
|
"compilation"
|
|
12323
12363
|
);
|
|
12324
12364
|
|
|
12325
12365
|
// src/builtin-plugin/SideEffectsFlagPlugin.ts
|
|
12326
|
-
var
|
|
12366
|
+
var import_binding58 = require("@rspack/binding");
|
|
12327
12367
|
var SideEffectsFlagPlugin = create2(
|
|
12328
|
-
|
|
12368
|
+
import_binding58.BuiltinPluginName.SideEffectsFlagPlugin,
|
|
12329
12369
|
() => {
|
|
12330
12370
|
},
|
|
12331
12371
|
"compilation"
|
|
12332
12372
|
);
|
|
12333
12373
|
|
|
12334
12374
|
// src/builtin-plugin/SizeLimitsPlugin.ts
|
|
12335
|
-
var
|
|
12375
|
+
var import_binding59 = require("@rspack/binding");
|
|
12336
12376
|
var SizeLimitsPlugin = create2(
|
|
12337
|
-
|
|
12377
|
+
import_binding59.BuiltinPluginName.SizeLimitsPlugin,
|
|
12338
12378
|
(options) => {
|
|
12339
12379
|
const hints = options.hints === false ? void 0 : options.hints;
|
|
12340
12380
|
return { ...options, hints };
|
|
@@ -12342,16 +12382,16 @@ var SizeLimitsPlugin = create2(
|
|
|
12342
12382
|
);
|
|
12343
12383
|
|
|
12344
12384
|
// src/builtin-plugin/SourceMapDevToolPlugin.ts
|
|
12345
|
-
var
|
|
12385
|
+
var import_binding60 = require("@rspack/binding");
|
|
12346
12386
|
var SourceMapDevToolPlugin = create2(
|
|
12347
|
-
|
|
12387
|
+
import_binding60.BuiltinPluginName.SourceMapDevToolPlugin,
|
|
12348
12388
|
(options) => options,
|
|
12349
12389
|
"compilation"
|
|
12350
12390
|
);
|
|
12351
12391
|
|
|
12352
12392
|
// src/builtin-plugin/SplitChunksPlugin.ts
|
|
12353
12393
|
var import_node_assert5 = __toESM(require("assert"));
|
|
12354
|
-
var
|
|
12394
|
+
var import_binding61 = require("@rspack/binding");
|
|
12355
12395
|
|
|
12356
12396
|
// src/util/SplitChunkSize.ts
|
|
12357
12397
|
var JsSplitChunkSizes = class {
|
|
@@ -12374,7 +12414,7 @@ var SplitChunksPlugin = class extends RspackBuiltinPlugin {
|
|
|
12374
12414
|
constructor(options) {
|
|
12375
12415
|
super();
|
|
12376
12416
|
this.options = options;
|
|
12377
|
-
this.name =
|
|
12417
|
+
this.name = import_binding61.BuiltinPluginName.SplitChunksPlugin;
|
|
12378
12418
|
this.affectedHooks = "thisCompilation";
|
|
12379
12419
|
}
|
|
12380
12420
|
raw(compiler) {
|
|
@@ -12394,7 +12434,7 @@ function toRawSplitChunksOptions(sc, compiler) {
|
|
|
12394
12434
|
return name3(void 0);
|
|
12395
12435
|
}
|
|
12396
12436
|
return name3(
|
|
12397
|
-
Module.__from_binding(ctx.module
|
|
12437
|
+
Module.__from_binding(ctx.module),
|
|
12398
12438
|
getChunks(ctx.chunks),
|
|
12399
12439
|
ctx.cacheGroupKey
|
|
12400
12440
|
);
|
|
@@ -12408,9 +12448,7 @@ function toRawSplitChunksOptions(sc, compiler) {
|
|
|
12408
12448
|
if (typeof ctx.module === "undefined") {
|
|
12409
12449
|
return test(void 0);
|
|
12410
12450
|
}
|
|
12411
|
-
return test(
|
|
12412
|
-
Module.__from_binding(ctx.module, compiler._lastCompilation)
|
|
12413
|
-
);
|
|
12451
|
+
return test(Module.__from_binding(ctx.module));
|
|
12414
12452
|
};
|
|
12415
12453
|
}
|
|
12416
12454
|
return test;
|
|
@@ -12475,9 +12513,9 @@ function toRawSplitChunksOptions(sc, compiler) {
|
|
|
12475
12513
|
}
|
|
12476
12514
|
|
|
12477
12515
|
// src/builtin-plugin/LightningCssMinimizerRspackPlugin.ts
|
|
12478
|
-
var
|
|
12516
|
+
var import_binding62 = require("@rspack/binding");
|
|
12479
12517
|
var LightningCssMinimizerRspackPlugin = create2(
|
|
12480
|
-
|
|
12518
|
+
import_binding62.BuiltinPluginName.LightningCssMinimizerRspackPlugin,
|
|
12481
12519
|
(options) => {
|
|
12482
12520
|
var _a, _b, _c;
|
|
12483
12521
|
const { include, exclude, draft, nonStandard, pseudoClasses, drafts } = (options == null ? void 0 : options.minimizerOptions) ?? {};
|
|
@@ -12505,16 +12543,16 @@ var LightningCssMinimizerRspackPlugin = create2(
|
|
|
12505
12543
|
);
|
|
12506
12544
|
|
|
12507
12545
|
// src/builtin-plugin/RemoveDuplicateModulesPlugin.ts
|
|
12508
|
-
var
|
|
12546
|
+
var import_binding63 = require("@rspack/binding");
|
|
12509
12547
|
var RemoveDuplicateModulesPlugin = create2(
|
|
12510
|
-
|
|
12548
|
+
import_binding63.BuiltinPluginName.RemoveDuplicateModulesPlugin,
|
|
12511
12549
|
() => {
|
|
12512
12550
|
return {};
|
|
12513
12551
|
}
|
|
12514
12552
|
);
|
|
12515
12553
|
|
|
12516
12554
|
// src/builtin-plugin/SwcJsMinimizerPlugin.ts
|
|
12517
|
-
var
|
|
12555
|
+
var import_binding64 = require("@rspack/binding");
|
|
12518
12556
|
function isObject2(value) {
|
|
12519
12557
|
const type = typeof value;
|
|
12520
12558
|
return value != null && (type === "object" || type === "function");
|
|
@@ -12557,7 +12595,7 @@ function getRawExtractCommentsOptions(extractComments) {
|
|
|
12557
12595
|
return void 0;
|
|
12558
12596
|
}
|
|
12559
12597
|
var SwcJsMinimizerRspackPlugin = create2(
|
|
12560
|
-
|
|
12598
|
+
import_binding64.BuiltinPluginName.SwcJsMinimizerRspackPlugin,
|
|
12561
12599
|
(options) => {
|
|
12562
12600
|
var _a, _b, _c, _d, _e;
|
|
12563
12601
|
let compress = ((_a = options == null ? void 0 : options.minimizerOptions) == null ? void 0 : _a.compress) ?? true;
|
|
@@ -12595,20 +12633,20 @@ var SwcJsMinimizerRspackPlugin = create2(
|
|
|
12595
12633
|
);
|
|
12596
12634
|
|
|
12597
12635
|
// src/builtin-plugin/WarnCaseSensitiveModulesPlugin.ts
|
|
12598
|
-
var
|
|
12636
|
+
var import_binding65 = require("@rspack/binding");
|
|
12599
12637
|
var WarnCaseSensitiveModulesPlugin = create2(
|
|
12600
|
-
|
|
12638
|
+
import_binding65.BuiltinPluginName.WarnCaseSensitiveModulesPlugin,
|
|
12601
12639
|
() => {
|
|
12602
12640
|
},
|
|
12603
12641
|
"compilation"
|
|
12604
12642
|
);
|
|
12605
12643
|
|
|
12606
12644
|
// src/builtin-plugin/WebWorkerTemplatePlugin.ts
|
|
12607
|
-
var
|
|
12645
|
+
var import_binding66 = require("@rspack/binding");
|
|
12608
12646
|
var WebWorkerTemplatePlugin = class extends RspackBuiltinPlugin {
|
|
12609
12647
|
constructor() {
|
|
12610
12648
|
super(...arguments);
|
|
12611
|
-
this.name =
|
|
12649
|
+
this.name = import_binding66.BuiltinPluginName.WebWorkerTemplatePlugin;
|
|
12612
12650
|
}
|
|
12613
12651
|
raw(compiler) {
|
|
12614
12652
|
compiler.options.output.chunkLoading = "import-scripts";
|
|
@@ -12617,7 +12655,7 @@ var WebWorkerTemplatePlugin = class extends RspackBuiltinPlugin {
|
|
|
12617
12655
|
};
|
|
12618
12656
|
|
|
12619
12657
|
// src/builtin-plugin/WorkerPlugin.ts
|
|
12620
|
-
var
|
|
12658
|
+
var import_binding67 = require("@rspack/binding");
|
|
12621
12659
|
var WorkerPlugin = class extends RspackBuiltinPlugin {
|
|
12622
12660
|
constructor(chunkLoading2, wasmLoading2, module2, workerPublicPath2) {
|
|
12623
12661
|
super();
|
|
@@ -12625,7 +12663,7 @@ var WorkerPlugin = class extends RspackBuiltinPlugin {
|
|
|
12625
12663
|
this.wasmLoading = wasmLoading2;
|
|
12626
12664
|
this.module = module2;
|
|
12627
12665
|
this.workerPublicPath = workerPublicPath2;
|
|
12628
|
-
this.name =
|
|
12666
|
+
this.name = import_binding67.BuiltinPluginName.WorkerPlugin;
|
|
12629
12667
|
}
|
|
12630
12668
|
raw(compiler) {
|
|
12631
12669
|
if (this.chunkLoading) {
|
|
@@ -12639,25 +12677,25 @@ var WorkerPlugin = class extends RspackBuiltinPlugin {
|
|
|
12639
12677
|
};
|
|
12640
12678
|
|
|
12641
12679
|
// src/builtin-plugin/FetchCompileAsyncWasmPlugin.ts
|
|
12642
|
-
var
|
|
12680
|
+
var import_binding68 = require("@rspack/binding");
|
|
12643
12681
|
var FetchCompileAsyncWasmPlugin = create2(
|
|
12644
|
-
|
|
12682
|
+
import_binding68.BuiltinPluginName.FetchCompileAsyncWasmPlugin,
|
|
12645
12683
|
() => {
|
|
12646
12684
|
},
|
|
12647
12685
|
"thisCompilation"
|
|
12648
12686
|
);
|
|
12649
12687
|
|
|
12650
12688
|
// src/builtin-plugin/NoEmitOnErrorsPlugin.ts
|
|
12651
|
-
var
|
|
12689
|
+
var import_binding69 = require("@rspack/binding");
|
|
12652
12690
|
var NoEmitOnErrorsPlugin = create2(
|
|
12653
|
-
|
|
12691
|
+
import_binding69.BuiltinPluginName.NoEmitOnErrorsPlugin,
|
|
12654
12692
|
() => void 0
|
|
12655
12693
|
);
|
|
12656
12694
|
|
|
12657
12695
|
// src/builtin-plugin/ContextReplacementPlugin.ts
|
|
12658
|
-
var
|
|
12696
|
+
var import_binding70 = require("@rspack/binding");
|
|
12659
12697
|
var ContextReplacementPlugin = create2(
|
|
12660
|
-
|
|
12698
|
+
import_binding70.BuiltinPluginName.ContextReplacementPlugin,
|
|
12661
12699
|
(resourceRegExp, newContentResource, newContentRecursive, newContentRegExp) => {
|
|
12662
12700
|
const rawOptions = {
|
|
12663
12701
|
resourceRegExp
|
|
@@ -12687,9 +12725,9 @@ var ContextReplacementPlugin = create2(
|
|
|
12687
12725
|
);
|
|
12688
12726
|
|
|
12689
12727
|
// src/builtin-plugin/LibManifestPlugin.ts
|
|
12690
|
-
var
|
|
12728
|
+
var import_binding71 = require("@rspack/binding");
|
|
12691
12729
|
var LibManifestPlugin = create2(
|
|
12692
|
-
|
|
12730
|
+
import_binding71.BuiltinPluginName.LibManifestPlugin,
|
|
12693
12731
|
(options) => {
|
|
12694
12732
|
const { context: context2, entryOnly, format: format3, name: name2, path: path11, type } = options;
|
|
12695
12733
|
return {
|
|
@@ -12704,9 +12742,9 @@ var LibManifestPlugin = create2(
|
|
|
12704
12742
|
);
|
|
12705
12743
|
|
|
12706
12744
|
// src/builtin-plugin/DllEntryPlugin.ts
|
|
12707
|
-
var
|
|
12745
|
+
var import_binding72 = require("@rspack/binding");
|
|
12708
12746
|
var DllEntryPlugin = create2(
|
|
12709
|
-
|
|
12747
|
+
import_binding72.BuiltinPluginName.DllEntryPlugin,
|
|
12710
12748
|
(context2, entries, options) => {
|
|
12711
12749
|
return {
|
|
12712
12750
|
context: context2,
|
|
@@ -12717,9 +12755,9 @@ var DllEntryPlugin = create2(
|
|
|
12717
12755
|
);
|
|
12718
12756
|
|
|
12719
12757
|
// src/builtin-plugin/DllReferenceAgencyPlugin.ts
|
|
12720
|
-
var
|
|
12758
|
+
var import_binding73 = require("@rspack/binding");
|
|
12721
12759
|
var DllReferenceAgencyPlugin = create2(
|
|
12722
|
-
|
|
12760
|
+
import_binding73.BuiltinPluginName.DllReferenceAgencyPlugin,
|
|
12723
12761
|
(options) => options
|
|
12724
12762
|
);
|
|
12725
12763
|
|
|
@@ -13029,8 +13067,8 @@ var ResolverFactory = class {
|
|
|
13029
13067
|
static __to_binding(resolver_factory) {
|
|
13030
13068
|
return resolver_factory.#binding;
|
|
13031
13069
|
}
|
|
13032
|
-
constructor() {
|
|
13033
|
-
this.#binding = new binding.JsResolverFactory();
|
|
13070
|
+
constructor(pnp) {
|
|
13071
|
+
this.#binding = new binding.JsResolverFactory(pnp);
|
|
13034
13072
|
}
|
|
13035
13073
|
get(type, resolveOptions2) {
|
|
13036
13074
|
const { dependencyCategory, resolveToContext, ...resolve2 } = resolveOptions2 || {};
|
|
@@ -13267,26 +13305,33 @@ var Watching = class {
|
|
|
13267
13305
|
cb(err);
|
|
13268
13306
|
}
|
|
13269
13307
|
};
|
|
13270
|
-
const cbs = this.callbacks;
|
|
13271
|
-
this.callbacks = [];
|
|
13272
|
-
const startTime = this.startTime;
|
|
13273
|
-
this.startTime = void 0;
|
|
13274
13308
|
if (error) {
|
|
13275
13309
|
return handleError(error);
|
|
13276
13310
|
}
|
|
13277
13311
|
(0, import_node_assert7.default)(compilation);
|
|
13312
|
+
stats = new Stats(compilation);
|
|
13313
|
+
if (this.invalid && !this.suspended && !this.blocked && !(this.isBlocked() && (this.blocked = true))) {
|
|
13314
|
+
this.#go();
|
|
13315
|
+
return;
|
|
13316
|
+
}
|
|
13317
|
+
const startTime = this.startTime;
|
|
13318
|
+
this.startTime = void 0;
|
|
13278
13319
|
compilation.startTime = startTime;
|
|
13279
13320
|
compilation.endTime = Date.now();
|
|
13280
|
-
|
|
13321
|
+
const cbs = this.callbacks;
|
|
13322
|
+
this.callbacks = [];
|
|
13323
|
+
const fileDependencies = /* @__PURE__ */ new Set([...compilation.fileDependencies]);
|
|
13324
|
+
const contextDependencies = /* @__PURE__ */ new Set([...compilation.contextDependencies]);
|
|
13325
|
+
const missingDependencies = /* @__PURE__ */ new Set([...compilation.missingDependencies]);
|
|
13281
13326
|
this.compiler.hooks.done.callAsync(stats, (err) => {
|
|
13282
13327
|
if (err) return handleError(err, cbs);
|
|
13283
13328
|
this.handler(null, stats);
|
|
13284
13329
|
process.nextTick(() => {
|
|
13285
13330
|
if (!this.#closed) {
|
|
13286
13331
|
this.watch(
|
|
13287
|
-
|
|
13288
|
-
|
|
13289
|
-
|
|
13332
|
+
fileDependencies,
|
|
13333
|
+
contextDependencies,
|
|
13334
|
+
missingDependencies
|
|
13290
13335
|
);
|
|
13291
13336
|
}
|
|
13292
13337
|
});
|
|
@@ -13422,7 +13467,8 @@ var checkVersion = () => {
|
|
|
13422
13467
|
);
|
|
13423
13468
|
if (!isMatch) {
|
|
13424
13469
|
return result = new Error(
|
|
13425
|
-
|
|
13470
|
+
`Unmatched version @rspack/core@${CORE_VERSION}, @rspack/binding@${BINDING_VERSION}, @rspack/binding-${platformArchAbi}@${ADDON_VERSION}.
|
|
13471
|
+
Rspack requires these versions to be the same or you may have installed the wrong version. Otherwise, Rspack may not work properly.`
|
|
13426
13472
|
);
|
|
13427
13473
|
}
|
|
13428
13474
|
return result = null;
|
|
@@ -13499,7 +13545,6 @@ var Compiler = class _Compiler {
|
|
|
13499
13545
|
this.watchFileSystem = null;
|
|
13500
13546
|
this.records = {};
|
|
13501
13547
|
this.options = options;
|
|
13502
|
-
this.resolverFactory = new ResolverFactory();
|
|
13503
13548
|
this.context = context2;
|
|
13504
13549
|
this.cache = new Cache_default();
|
|
13505
13550
|
this.compilerPath = "";
|
|
@@ -14137,9 +14182,7 @@ var Compiler = class _Compiler {
|
|
|
14137
14182
|
},
|
|
14138
14183
|
function(queried) {
|
|
14139
14184
|
return function(m) {
|
|
14140
|
-
return queried.call(
|
|
14141
|
-
Module.__from_binding(m, that.deref().#compilation)
|
|
14142
|
-
);
|
|
14185
|
+
return queried.call(Module.__from_binding(m));
|
|
14143
14186
|
};
|
|
14144
14187
|
}
|
|
14145
14188
|
),
|
|
@@ -14150,9 +14193,7 @@ var Compiler = class _Compiler {
|
|
|
14150
14193
|
},
|
|
14151
14194
|
function(queried) {
|
|
14152
14195
|
return function(m) {
|
|
14153
|
-
return queried.call(
|
|
14154
|
-
Module.__from_binding(m, that.deref().#compilation)
|
|
14155
|
-
);
|
|
14196
|
+
return queried.call(Module.__from_binding(m));
|
|
14156
14197
|
};
|
|
14157
14198
|
}
|
|
14158
14199
|
),
|
|
@@ -14163,9 +14204,7 @@ var Compiler = class _Compiler {
|
|
|
14163
14204
|
},
|
|
14164
14205
|
function(queried) {
|
|
14165
14206
|
return function(m) {
|
|
14166
|
-
return queried.call(
|
|
14167
|
-
Module.__from_binding(m, that.deref().#compilation)
|
|
14168
|
-
);
|
|
14207
|
+
return queried.call(Module.__from_binding(m));
|
|
14169
14208
|
};
|
|
14170
14209
|
}
|
|
14171
14210
|
),
|
|
@@ -14666,7 +14705,11 @@ var Compiler = class _Compiler {
|
|
|
14666
14705
|
this.#registers,
|
|
14667
14706
|
ThreadsafeOutputNodeFS.__to_binding(this.outputFileSystem),
|
|
14668
14707
|
this.intermediateFileSystem ? ThreadsafeIntermediateNodeFS.__to_binding(this.intermediateFileSystem) : void 0,
|
|
14669
|
-
ResolverFactory.__to_binding(
|
|
14708
|
+
ResolverFactory.__to_binding(
|
|
14709
|
+
this.resolverFactory = new ResolverFactory(
|
|
14710
|
+
rawOptions.resolve.pnp ?? false
|
|
14711
|
+
)
|
|
14712
|
+
)
|
|
14670
14713
|
);
|
|
14671
14714
|
callback(null, this.#instance);
|
|
14672
14715
|
}
|
|
@@ -16811,6 +16854,9 @@ var SIMPLE_EXTRACTORS = {
|
|
|
16811
16854
|
object.resolvedModuleIdentifier = reason.resolvedModuleDescriptor.identifier;
|
|
16812
16855
|
object.resolvedModule = reason.resolvedModuleDescriptor.name;
|
|
16813
16856
|
}
|
|
16857
|
+
object.explanation = reason.explanation;
|
|
16858
|
+
object.active = reason.active;
|
|
16859
|
+
object.loc = reason.loc;
|
|
16814
16860
|
},
|
|
16815
16861
|
ids: (object, reason) => {
|
|
16816
16862
|
object.moduleId = reason.moduleDescriptor ? reason.moduleDescriptor.id : null;
|
|
@@ -16884,7 +16930,8 @@ var SIMPLE_EXTRACTORS = {
|
|
|
16884
16930
|
error: EXTRACT_ERROR,
|
|
16885
16931
|
warning: EXTRACT_ERROR,
|
|
16886
16932
|
moduleTraceItem: {
|
|
16887
|
-
_: (object, { origin, module: module2 },
|
|
16933
|
+
_: (object, { origin, module: module2, dependencies: dependencies2 }, context2, { requestShortener }, factory) => {
|
|
16934
|
+
const { type } = context2;
|
|
16888
16935
|
if (origin.moduleDescriptor) {
|
|
16889
16936
|
object.originIdentifier = origin.moduleDescriptor.identifier;
|
|
16890
16937
|
object.originName = origin.moduleDescriptor.name;
|
|
@@ -16893,13 +16940,22 @@ var SIMPLE_EXTRACTORS = {
|
|
|
16893
16940
|
object.moduleIdentifier = module2.moduleDescriptor.identifier;
|
|
16894
16941
|
object.moduleName = module2.moduleDescriptor.name;
|
|
16895
16942
|
}
|
|
16943
|
+
object.dependencies = factory.create(
|
|
16944
|
+
`${type}.dependencies`,
|
|
16945
|
+
dependencies2,
|
|
16946
|
+
context2
|
|
16947
|
+
);
|
|
16896
16948
|
},
|
|
16897
16949
|
ids: (object, { origin, module: module2 }) => {
|
|
16898
16950
|
object.originId = origin.moduleDescriptor.id;
|
|
16899
16951
|
object.moduleId = module2.moduleDescriptor.id;
|
|
16900
16952
|
}
|
|
16953
|
+
},
|
|
16954
|
+
moduleTraceDependency: {
|
|
16955
|
+
_: (object, dependency) => {
|
|
16956
|
+
object.loc = dependency.loc;
|
|
16957
|
+
}
|
|
16901
16958
|
}
|
|
16902
|
-
// - moduleTraceDependency
|
|
16903
16959
|
};
|
|
16904
16960
|
var FILTER = {
|
|
16905
16961
|
"module.reasons": {
|
|
@@ -18412,6 +18468,7 @@ var RspackOptionsApply = class {
|
|
|
18412
18468
|
const cheap = options.devtool.includes("cheap");
|
|
18413
18469
|
const moduleMaps = options.devtool.includes("module");
|
|
18414
18470
|
const noSources = options.devtool.includes("nosources");
|
|
18471
|
+
const debugIds = options.devtool.includes("debugids");
|
|
18415
18472
|
const Plugin = evalWrapped ? EvalSourceMapDevToolPlugin : SourceMapDevToolPlugin;
|
|
18416
18473
|
new Plugin({
|
|
18417
18474
|
filename: inline ? null : options.output.sourceMapFilename,
|
|
@@ -18421,7 +18478,8 @@ var RspackOptionsApply = class {
|
|
|
18421
18478
|
module: moduleMaps ? true : !cheap,
|
|
18422
18479
|
columns: !cheap,
|
|
18423
18480
|
noSources,
|
|
18424
|
-
namespace: options.output.devtoolNamespace
|
|
18481
|
+
namespace: options.output.devtoolNamespace,
|
|
18482
|
+
debugIds
|
|
18425
18483
|
}).apply(compiler);
|
|
18426
18484
|
} else if (options.devtool.includes("eval")) {
|
|
18427
18485
|
new EvalDevToolModulePlugin({
|
|
@@ -18642,9 +18700,9 @@ var matchObject = (obj, str) => {
|
|
|
18642
18700
|
var import_zod5 = __toESM(require("../compiled/zod/index.js"));
|
|
18643
18701
|
|
|
18644
18702
|
// src/builtin-plugin/FlagAllModulesAsUsedPlugin.ts
|
|
18645
|
-
var
|
|
18703
|
+
var import_binding74 = require("@rspack/binding");
|
|
18646
18704
|
var FlagAllModulesAsUsedPlugin = create2(
|
|
18647
|
-
|
|
18705
|
+
import_binding74.BuiltinPluginName.FlagAllModulesAsUsedPlugin,
|
|
18648
18706
|
(explanation) => {
|
|
18649
18707
|
return {
|
|
18650
18708
|
explanation
|
|
@@ -19533,9 +19591,9 @@ var NodeTemplatePlugin = class {
|
|
|
19533
19591
|
};
|
|
19534
19592
|
|
|
19535
19593
|
// src/container/ModuleFederationRuntimePlugin.ts
|
|
19536
|
-
var
|
|
19594
|
+
var import_binding75 = require("@rspack/binding");
|
|
19537
19595
|
var ModuleFederationRuntimePlugin = create2(
|
|
19538
|
-
|
|
19596
|
+
import_binding75.BuiltinPluginName.ModuleFederationRuntimePlugin,
|
|
19539
19597
|
() => {
|
|
19540
19598
|
}
|
|
19541
19599
|
);
|
|
@@ -19731,10 +19789,10 @@ function getDefaultEntryRuntime(paths, options, compiler) {
|
|
|
19731
19789
|
}
|
|
19732
19790
|
|
|
19733
19791
|
// src/sharing/ConsumeSharedPlugin.ts
|
|
19734
|
-
var
|
|
19792
|
+
var import_binding77 = require("@rspack/binding");
|
|
19735
19793
|
|
|
19736
19794
|
// src/sharing/ShareRuntimePlugin.ts
|
|
19737
|
-
var
|
|
19795
|
+
var import_binding76 = require("@rspack/binding");
|
|
19738
19796
|
var compilerSet = /* @__PURE__ */ new WeakSet();
|
|
19739
19797
|
function isSingleton(compiler) {
|
|
19740
19798
|
return compilerSet.has(compiler);
|
|
@@ -19746,7 +19804,7 @@ var ShareRuntimePlugin = class extends RspackBuiltinPlugin {
|
|
|
19746
19804
|
constructor(enhanced = false) {
|
|
19747
19805
|
super();
|
|
19748
19806
|
this.enhanced = enhanced;
|
|
19749
|
-
this.name =
|
|
19807
|
+
this.name = import_binding76.BuiltinPluginName.ShareRuntimePlugin;
|
|
19750
19808
|
}
|
|
19751
19809
|
raw(compiler) {
|
|
19752
19810
|
if (isSingleton(compiler)) return;
|
|
@@ -19765,7 +19823,7 @@ function isRequiredVersion(str) {
|
|
|
19765
19823
|
var ConsumeSharedPlugin = class extends RspackBuiltinPlugin {
|
|
19766
19824
|
constructor(options) {
|
|
19767
19825
|
super();
|
|
19768
|
-
this.name =
|
|
19826
|
+
this.name = import_binding77.BuiltinPluginName.ConsumeSharedPlugin;
|
|
19769
19827
|
this._options = {
|
|
19770
19828
|
consumes: parseOptions(
|
|
19771
19829
|
options.consumes,
|
|
@@ -19828,11 +19886,11 @@ var ConsumeSharedPlugin = class extends RspackBuiltinPlugin {
|
|
|
19828
19886
|
};
|
|
19829
19887
|
|
|
19830
19888
|
// src/sharing/ProvideSharedPlugin.ts
|
|
19831
|
-
var
|
|
19889
|
+
var import_binding78 = require("@rspack/binding");
|
|
19832
19890
|
var ProvideSharedPlugin = class extends RspackBuiltinPlugin {
|
|
19833
19891
|
constructor(options) {
|
|
19834
19892
|
super();
|
|
19835
|
-
this.name =
|
|
19893
|
+
this.name = import_binding78.BuiltinPluginName.ProvideSharedPlugin;
|
|
19836
19894
|
this._provides = parseOptions(
|
|
19837
19895
|
options.provides,
|
|
19838
19896
|
(item) => {
|
|
@@ -19937,11 +19995,11 @@ var SharePlugin = class {
|
|
|
19937
19995
|
};
|
|
19938
19996
|
|
|
19939
19997
|
// src/container/ContainerPlugin.ts
|
|
19940
|
-
var
|
|
19998
|
+
var import_binding79 = require("@rspack/binding");
|
|
19941
19999
|
var ContainerPlugin = class extends RspackBuiltinPlugin {
|
|
19942
20000
|
constructor(options) {
|
|
19943
20001
|
super();
|
|
19944
|
-
this.name =
|
|
20002
|
+
this.name = import_binding79.BuiltinPluginName.ContainerPlugin;
|
|
19945
20003
|
this._options = {
|
|
19946
20004
|
name: options.name,
|
|
19947
20005
|
shareScope: options.shareScope || "default",
|
|
@@ -19985,11 +20043,11 @@ var ContainerPlugin = class extends RspackBuiltinPlugin {
|
|
|
19985
20043
|
};
|
|
19986
20044
|
|
|
19987
20045
|
// src/container/ContainerReferencePlugin.ts
|
|
19988
|
-
var
|
|
20046
|
+
var import_binding80 = require("@rspack/binding");
|
|
19989
20047
|
var ContainerReferencePlugin = class extends RspackBuiltinPlugin {
|
|
19990
20048
|
constructor(options) {
|
|
19991
20049
|
super();
|
|
19992
|
-
this.name =
|
|
20050
|
+
this.name = import_binding80.BuiltinPluginName.ContainerReferencePlugin;
|
|
19993
20051
|
this._options = {
|
|
19994
20052
|
remoteType: options.remoteType,
|
|
19995
20053
|
remotes: parseOptions(
|
|
@@ -20074,7 +20132,7 @@ var ModuleFederationPluginV1 = class {
|
|
|
20074
20132
|
};
|
|
20075
20133
|
|
|
20076
20134
|
// src/exports.ts
|
|
20077
|
-
var
|
|
20135
|
+
var import_binding81 = require("@rspack/binding");
|
|
20078
20136
|
var rspackVersion = import_package.version;
|
|
20079
20137
|
var version = import_package.webpackVersion;
|
|
20080
20138
|
var WebpackError2 = Error;
|
|
@@ -20120,8 +20178,28 @@ var sharing = {
|
|
|
20120
20178
|
};
|
|
20121
20179
|
var experiments2 = {
|
|
20122
20180
|
globalTrace: {
|
|
20123
|
-
register
|
|
20124
|
-
|
|
20181
|
+
async register(filter, layer2, output2) {
|
|
20182
|
+
(0, import_binding81.registerGlobalTrace)(filter, layer2, output2);
|
|
20183
|
+
if (layer2 === "otel") {
|
|
20184
|
+
try {
|
|
20185
|
+
const { initOpenTelemetry } = await import("@rspack/tracing");
|
|
20186
|
+
await initOpenTelemetry();
|
|
20187
|
+
} catch (error) {
|
|
20188
|
+
console.error(
|
|
20189
|
+
"Failed to import `@rspack/tracing` package. Please install `@rspack/tracing` to enable OpenTelemetry tracing.",
|
|
20190
|
+
error
|
|
20191
|
+
);
|
|
20192
|
+
}
|
|
20193
|
+
}
|
|
20194
|
+
},
|
|
20195
|
+
async cleanup() {
|
|
20196
|
+
(0, import_binding81.cleanupGlobalTrace)();
|
|
20197
|
+
try {
|
|
20198
|
+
const { shutdownOpenTelemetry } = await import("@rspack/tracing");
|
|
20199
|
+
await shutdownOpenTelemetry();
|
|
20200
|
+
} catch (error) {
|
|
20201
|
+
}
|
|
20202
|
+
}
|
|
20125
20203
|
},
|
|
20126
20204
|
RemoveDuplicateModulesPlugin
|
|
20127
20205
|
};
|