@rspack/core 1.3.0-beta.1 → 1.3.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/dist/Watching.d.ts +4 -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/CircularDependencyRspackPlugin.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/HttpExternalsRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/HttpUriPlugin.d.ts +36 -0
- 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/ModuleInfoHeaderPlugin.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/RsdoctorPlugin.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/SubresourceIntegrityPlugin.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/html-plugin/plugin.d.ts +1 -1
- package/dist/builtin-plugin/index.d.ts +1 -0
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +1 -1
- package/dist/config/normalization.d.ts +2 -0
- package/dist/config/types.d.ts +11 -1
- package/dist/config/zod.d.ts +443 -360
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
- package/dist/index.js +349 -261
- package/package.json +3 -3
package/dist/index.js
CHANGED
@@ -148,15 +148,15 @@ var require_CachedInputFileSystem = __commonJS({
|
|
148
148
|
"../../node_modules/.pnpm/enhanced-resolve@5.18.1/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js"(exports2, module2) {
|
149
149
|
"use strict";
|
150
150
|
var nextTick = require("process").nextTick;
|
151
|
-
var dirname4 = (
|
152
|
-
let idx =
|
151
|
+
var dirname4 = (path12) => {
|
152
|
+
let idx = path12.length - 1;
|
153
153
|
while (idx >= 0) {
|
154
|
-
const c =
|
154
|
+
const c = path12.charCodeAt(idx);
|
155
155
|
if (c === 47 || c === 92) break;
|
156
156
|
idx--;
|
157
157
|
}
|
158
158
|
if (idx < 0) return "";
|
159
|
-
return
|
159
|
+
return path12.slice(0, idx);
|
160
160
|
};
|
161
161
|
var runCallbacks = (callbacks, err, result2) => {
|
162
162
|
if (callbacks.length === 1) {
|
@@ -193,13 +193,13 @@ var require_CachedInputFileSystem = __commonJS({
|
|
193
193
|
* @param {FileSystemCallback<any>=} callback callback
|
194
194
|
* @returns {any} result
|
195
195
|
*/
|
196
|
-
(
|
196
|
+
(path12, options, callback) => {
|
197
197
|
if (typeof options === "function") {
|
198
198
|
callback = /** @type {FileSystemCallback<any>} */
|
199
199
|
options;
|
200
200
|
options = void 0;
|
201
201
|
}
|
202
|
-
if (typeof
|
202
|
+
if (typeof path12 !== "string" && !Buffer.isBuffer(path12) && !(path12 instanceof URL) && typeof path12 !== "number") {
|
203
203
|
callback(
|
204
204
|
new TypeError("path must be a string, Buffer, URL or number")
|
205
205
|
);
|
@@ -210,26 +210,26 @@ var require_CachedInputFileSystem = __commonJS({
|
|
210
210
|
/** @type {Function} */
|
211
211
|
this._provider.call(
|
212
212
|
this._providerContext,
|
213
|
-
|
213
|
+
path12,
|
214
214
|
options,
|
215
215
|
callback
|
216
216
|
)
|
217
217
|
);
|
218
218
|
}
|
219
|
-
let callbacks = this._activeAsyncOperations.get(
|
219
|
+
let callbacks = this._activeAsyncOperations.get(path12);
|
220
220
|
if (callbacks) {
|
221
221
|
callbacks.push(callback);
|
222
222
|
return;
|
223
223
|
}
|
224
|
-
this._activeAsyncOperations.set(
|
224
|
+
this._activeAsyncOperations.set(path12, callbacks = [callback]);
|
225
225
|
provider(
|
226
|
-
|
226
|
+
path12,
|
227
227
|
/**
|
228
228
|
* @param {Error} err error
|
229
229
|
* @param {any} result result
|
230
230
|
*/
|
231
231
|
(err, result2) => {
|
232
|
-
this._activeAsyncOperations.delete(
|
232
|
+
this._activeAsyncOperations.delete(path12);
|
233
233
|
runCallbacks(callbacks, err, result2);
|
234
234
|
}
|
235
235
|
);
|
@@ -241,12 +241,12 @@ var require_CachedInputFileSystem = __commonJS({
|
|
241
241
|
* @param {object=} options options
|
242
242
|
* @returns {any} result
|
243
243
|
*/
|
244
|
-
(
|
244
|
+
(path12, options) => {
|
245
245
|
return (
|
246
246
|
/** @type {Function} */
|
247
247
|
this._syncProvider.call(
|
248
248
|
this._providerContext,
|
249
|
-
|
249
|
+
path12,
|
250
250
|
options
|
251
251
|
)
|
252
252
|
);
|
@@ -292,22 +292,22 @@ var require_CachedInputFileSystem = __commonJS({
|
|
292
292
|
* @param {FileSystemCallback<any>} callback callback
|
293
293
|
* @returns {void}
|
294
294
|
*/
|
295
|
-
provide(
|
295
|
+
provide(path12, options, callback) {
|
296
296
|
if (typeof options === "function") {
|
297
297
|
callback = options;
|
298
298
|
options = void 0;
|
299
299
|
}
|
300
|
-
if (typeof
|
300
|
+
if (typeof path12 !== "string" && !Buffer.isBuffer(path12) && !(path12 instanceof URL) && typeof path12 !== "number") {
|
301
301
|
callback(new TypeError("path must be a string, Buffer, URL or number"));
|
302
302
|
return;
|
303
303
|
}
|
304
|
-
const strPath = typeof
|
304
|
+
const strPath = typeof path12 !== "string" ? path12.toString() : path12;
|
305
305
|
if (options) {
|
306
306
|
return (
|
307
307
|
/** @type {Function} */
|
308
308
|
this._provider.call(
|
309
309
|
this._providerContext,
|
310
|
-
|
310
|
+
path12,
|
311
311
|
options,
|
312
312
|
callback
|
313
313
|
)
|
@@ -329,7 +329,7 @@ var require_CachedInputFileSystem = __commonJS({
|
|
329
329
|
this._activeAsyncOperations.set(strPath, callbacks = [callback]);
|
330
330
|
this._provider.call(
|
331
331
|
this._providerContext,
|
332
|
-
|
332
|
+
path12,
|
333
333
|
/**
|
334
334
|
* @param {Error | null} err error
|
335
335
|
* @param {any} [result] result
|
@@ -352,17 +352,17 @@ var require_CachedInputFileSystem = __commonJS({
|
|
352
352
|
* @param {any} options options
|
353
353
|
* @returns {any} result
|
354
354
|
*/
|
355
|
-
provideSync(
|
356
|
-
if (typeof
|
355
|
+
provideSync(path12, options) {
|
356
|
+
if (typeof path12 !== "string" && !Buffer.isBuffer(path12) && !(path12 instanceof URL) && typeof path12 !== "number") {
|
357
357
|
throw new TypeError("path must be a string");
|
358
358
|
}
|
359
|
-
const strPath = typeof
|
359
|
+
const strPath = typeof path12 !== "string" ? path12.toString() : path12;
|
360
360
|
if (options) {
|
361
361
|
return (
|
362
362
|
/** @type {Function} */
|
363
363
|
this._syncProvider.call(
|
364
364
|
this._providerContext,
|
365
|
-
|
365
|
+
path12,
|
366
366
|
options
|
367
367
|
)
|
368
368
|
);
|
@@ -382,7 +382,7 @@ var require_CachedInputFileSystem = __commonJS({
|
|
382
382
|
result2 = /** @type {Function} */
|
383
383
|
this._syncProvider.call(
|
384
384
|
this._providerContext,
|
385
|
-
|
385
|
+
path12
|
386
386
|
);
|
387
387
|
} catch (err) {
|
388
388
|
this._storeResult(
|
@@ -471,11 +471,11 @@ var require_CachedInputFileSystem = __commonJS({
|
|
471
471
|
* @param {Error | null} err error
|
472
472
|
* @param {any} result result
|
473
473
|
*/
|
474
|
-
_storeResult(
|
475
|
-
if (this._data.has(
|
474
|
+
_storeResult(path12, err, result2) {
|
475
|
+
if (this._data.has(path12)) return;
|
476
476
|
const level = this._levels[this._currentLevel];
|
477
|
-
this._data.set(
|
478
|
-
level.add(
|
477
|
+
this._data.set(path12, { err, result: result2, level });
|
478
|
+
level.add(path12);
|
479
479
|
}
|
480
480
|
_decayLevel() {
|
481
481
|
const nextLevel = (this._currentLevel + 1) % this._levels.length;
|
@@ -610,8 +610,8 @@ var require_CachedInputFileSystem = __commonJS({
|
|
610
610
|
* @param {string} path path
|
611
611
|
* @param {FileSystemCallback<any>} callback
|
612
612
|
*/
|
613
|
-
((
|
614
|
-
this.readFile(
|
613
|
+
((path12, callback) => {
|
614
|
+
this.readFile(path12, (err, buffer) => {
|
615
615
|
if (err) return callback(err);
|
616
616
|
if (!buffer || buffer.length === 0)
|
617
617
|
return callback(new Error("No file content"));
|
@@ -632,8 +632,8 @@ var require_CachedInputFileSystem = __commonJS({
|
|
632
632
|
* @param {string} path path
|
633
633
|
* @returns {any} result
|
634
634
|
*/
|
635
|
-
((
|
636
|
-
const buffer = this.readFileSync(
|
635
|
+
((path12) => {
|
636
|
+
const buffer = this.readFileSync(path12);
|
637
637
|
const data = JSON.parse(buffer.toString("utf-8"));
|
638
638
|
return data;
|
639
639
|
}),
|
@@ -689,28 +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_binding90.AsyncDependenciesBlock,
|
693
693
|
BannerPlugin: () => BannerPlugin,
|
694
694
|
CircularDependencyRspackPlugin: () => CircularDependencyRspackPlugin,
|
695
695
|
Compilation: () => Compilation,
|
696
696
|
Compiler: () => Compiler,
|
697
|
-
ConcatenatedModule: () =>
|
698
|
-
ContextModule: () =>
|
697
|
+
ConcatenatedModule: () => import_binding81.ConcatenatedModule,
|
698
|
+
ContextModule: () => import_binding80.ContextModule,
|
699
699
|
ContextReplacementPlugin: () => ContextReplacementPlugin,
|
700
700
|
CopyRspackPlugin: () => CopyRspackPlugin,
|
701
701
|
CssExtractRspackPlugin: () => CssExtractRspackPlugin,
|
702
702
|
DefinePlugin: () => DefinePlugin,
|
703
|
-
Dependency: () =>
|
703
|
+
Dependency: () => import_binding90.Dependency,
|
704
704
|
DllPlugin: () => DllPlugin,
|
705
705
|
DllReferencePlugin: () => DllReferencePlugin,
|
706
706
|
DynamicEntryPlugin: () => DynamicEntryPlugin,
|
707
|
-
EntryDependency: () =>
|
707
|
+
EntryDependency: () => import_binding90.EntryDependency,
|
708
708
|
EntryOptionPlugin: () => EntryOptionPlugin_default,
|
709
709
|
EntryPlugin: () => EntryPlugin,
|
710
710
|
EnvironmentPlugin: () => EnvironmentPlugin,
|
711
711
|
EvalDevToolModulePlugin: () => EvalDevToolModulePlugin,
|
712
712
|
EvalSourceMapDevToolPlugin: () => EvalSourceMapDevToolPlugin,
|
713
|
-
ExternalModule: () =>
|
713
|
+
ExternalModule: () => import_binding82.ExternalModule,
|
714
714
|
ExternalsPlugin: () => ExternalsPlugin,
|
715
715
|
HotModuleReplacementPlugin: () => HotModuleReplacementPlugin,
|
716
716
|
HtmlRspackPlugin: () => HtmlRspackPlugin,
|
@@ -762,28 +762,28 @@ module.exports = __toCommonJS(index_exports);
|
|
762
762
|
// src/exports.ts
|
763
763
|
var exports_exports = {};
|
764
764
|
__export(exports_exports, {
|
765
|
-
AsyncDependenciesBlock: () =>
|
765
|
+
AsyncDependenciesBlock: () => import_binding90.AsyncDependenciesBlock,
|
766
766
|
BannerPlugin: () => BannerPlugin,
|
767
767
|
CircularDependencyRspackPlugin: () => CircularDependencyRspackPlugin,
|
768
768
|
Compilation: () => Compilation,
|
769
769
|
Compiler: () => Compiler,
|
770
|
-
ConcatenatedModule: () =>
|
771
|
-
ContextModule: () =>
|
770
|
+
ConcatenatedModule: () => import_binding81.ConcatenatedModule,
|
771
|
+
ContextModule: () => import_binding80.ContextModule,
|
772
772
|
ContextReplacementPlugin: () => ContextReplacementPlugin,
|
773
773
|
CopyRspackPlugin: () => CopyRspackPlugin,
|
774
774
|
CssExtractRspackPlugin: () => CssExtractRspackPlugin,
|
775
775
|
DefinePlugin: () => DefinePlugin,
|
776
|
-
Dependency: () =>
|
776
|
+
Dependency: () => import_binding90.Dependency,
|
777
777
|
DllPlugin: () => DllPlugin,
|
778
778
|
DllReferencePlugin: () => DllReferencePlugin,
|
779
779
|
DynamicEntryPlugin: () => DynamicEntryPlugin,
|
780
|
-
EntryDependency: () =>
|
780
|
+
EntryDependency: () => import_binding90.EntryDependency,
|
781
781
|
EntryOptionPlugin: () => EntryOptionPlugin_default,
|
782
782
|
EntryPlugin: () => EntryPlugin,
|
783
783
|
EnvironmentPlugin: () => EnvironmentPlugin,
|
784
784
|
EvalDevToolModulePlugin: () => EvalDevToolModulePlugin,
|
785
785
|
EvalSourceMapDevToolPlugin: () => EvalSourceMapDevToolPlugin,
|
786
|
-
ExternalModule: () =>
|
786
|
+
ExternalModule: () => import_binding82.ExternalModule,
|
787
787
|
ExternalsPlugin: () => ExternalsPlugin,
|
788
788
|
HotModuleReplacementPlugin: () => HotModuleReplacementPlugin,
|
789
789
|
HtmlRspackPlugin: () => HtmlRspackPlugin,
|
@@ -5361,7 +5361,7 @@ var LoaderObject = class {
|
|
5361
5361
|
constructor(loaderItem, compiler) {
|
5362
5362
|
const {
|
5363
5363
|
request,
|
5364
|
-
path:
|
5364
|
+
path: path12,
|
5365
5365
|
query,
|
5366
5366
|
fragment,
|
5367
5367
|
options,
|
@@ -5372,7 +5372,7 @@ var LoaderObject = class {
|
|
5372
5372
|
type
|
5373
5373
|
} = createLoaderObject(loaderItem, compiler);
|
5374
5374
|
this.request = request;
|
5375
|
-
this.path =
|
5375
|
+
this.path = path12;
|
5376
5376
|
this.query = query;
|
5377
5377
|
this.fragment = fragment;
|
5378
5378
|
this.options = options;
|
@@ -5499,17 +5499,17 @@ var runSyncOrAsync = (0, import_node_util4.promisify)(function runSyncOrAsync2(f
|
|
5499
5499
|
callback(e, []);
|
5500
5500
|
}
|
5501
5501
|
});
|
5502
|
-
function dirname2(
|
5503
|
-
if (
|
5504
|
-
const i =
|
5505
|
-
const j =
|
5506
|
-
const i2 =
|
5507
|
-
const j2 =
|
5502
|
+
function dirname2(path12) {
|
5503
|
+
if (path12 === "/") return "/";
|
5504
|
+
const i = path12.lastIndexOf("/");
|
5505
|
+
const j = path12.lastIndexOf("\\");
|
5506
|
+
const i2 = path12.indexOf("/");
|
5507
|
+
const j2 = path12.indexOf("\\");
|
5508
5508
|
const idx = i > j ? i : j;
|
5509
5509
|
const idx2 = i > j ? i2 : j2;
|
5510
|
-
if (idx < 0) return
|
5511
|
-
if (idx === idx2) return
|
5512
|
-
return
|
5510
|
+
if (idx < 0) return path12;
|
5511
|
+
if (idx === idx2) return path12.slice(0, idx + 1);
|
5512
|
+
return path12.slice(0, idx);
|
5513
5513
|
}
|
5514
5514
|
function getCurrentLoader(loaderContext, index = loaderContext.loaderIndex) {
|
5515
5515
|
var _a;
|
@@ -6035,10 +6035,10 @@ function parsePathQueryFragment(str) {
|
|
6035
6035
|
|
6036
6036
|
// src/config/adapterRuleUse.ts
|
6037
6037
|
var BUILTIN_LOADER_PREFIX = "builtin:";
|
6038
|
-
function createRawModuleRuleUses(uses,
|
6038
|
+
function createRawModuleRuleUses(uses, path12, options) {
|
6039
6039
|
const normalizeRuleSetUseItem = (item) => typeof item === "string" ? { loader: item } : item;
|
6040
6040
|
const allUses = Array.isArray(uses) ? [...uses].map(normalizeRuleSetUseItem) : [normalizeRuleSetUseItem(uses)];
|
6041
|
-
return createRawModuleRuleUsesImpl(allUses,
|
6041
|
+
return createRawModuleRuleUsesImpl(allUses, path12, options);
|
6042
6042
|
}
|
6043
6043
|
var getSwcLoaderOptions = (options, _) => {
|
6044
6044
|
if (options && typeof options === "object") {
|
@@ -6079,7 +6079,7 @@ function getBuiltinLoaderOptions(identifier, o, options) {
|
|
6079
6079
|
}
|
6080
6080
|
return o;
|
6081
6081
|
}
|
6082
|
-
function createRawModuleRuleUsesImpl(uses,
|
6082
|
+
function createRawModuleRuleUsesImpl(uses, path12, options) {
|
6083
6083
|
if (!uses.length) {
|
6084
6084
|
return [];
|
6085
6085
|
}
|
@@ -6094,7 +6094,7 @@ function createRawModuleRuleUsesImpl(uses, path11, options) {
|
|
6094
6094
|
return {
|
6095
6095
|
loader: resolveStringifyLoaders(
|
6096
6096
|
use,
|
6097
|
-
`${
|
6097
|
+
`${path12}[${index}]`,
|
6098
6098
|
options.compiler,
|
6099
6099
|
isBuiltin
|
6100
6100
|
),
|
@@ -6102,7 +6102,7 @@ function createRawModuleRuleUsesImpl(uses, path11, options) {
|
|
6102
6102
|
};
|
6103
6103
|
});
|
6104
6104
|
}
|
6105
|
-
function resolveStringifyLoaders(use,
|
6105
|
+
function resolveStringifyLoaders(use, path12, compiler, isBuiltin) {
|
6106
6106
|
const obj = parsePathQueryFragment(use.loader);
|
6107
6107
|
let ident = null;
|
6108
6108
|
if (use.options === null) {
|
@@ -6111,7 +6111,7 @@ function resolveStringifyLoaders(use, path11, compiler, isBuiltin) {
|
|
6111
6111
|
else if (use.ident) obj.query = `??${ident = use.ident}`;
|
6112
6112
|
else if (typeof use.options === "object" && use.options.ident)
|
6113
6113
|
obj.query = `??${ident = use.options.ident}`;
|
6114
|
-
else if (typeof use.options === "object") obj.query = `??${ident =
|
6114
|
+
else if (typeof use.options === "object") obj.query = `??${ident = path12}`;
|
6115
6115
|
else obj.query = `?${JSON.stringify(use.options)}`;
|
6116
6116
|
if (use.options && typeof use.options === "object") {
|
6117
6117
|
if (!ident) ident = "[[missing ident]]";
|
@@ -6198,10 +6198,13 @@ function getRawExtensionAlias(alias = {}) {
|
|
6198
6198
|
return Object.fromEntries(entries);
|
6199
6199
|
}
|
6200
6200
|
function getRawAlias(alias = {}) {
|
6201
|
-
|
6202
|
-
|
6203
|
-
|
6204
|
-
|
6201
|
+
if (typeof alias === "object" && alias !== null && !Array.isArray(alias)) {
|
6202
|
+
return Object.entries(alias).map(([key, value]) => ({
|
6203
|
+
path: key,
|
6204
|
+
redirect: Array.isArray(value) ? value : [value]
|
6205
|
+
}));
|
6206
|
+
}
|
6207
|
+
return false;
|
6205
6208
|
}
|
6206
6209
|
function getRawResolveByDependency(byDependency) {
|
6207
6210
|
if (byDependency === void 0) return byDependency;
|
@@ -6277,7 +6280,7 @@ function tryMatch(payload, condition) {
|
|
6277
6280
|
}
|
6278
6281
|
return false;
|
6279
6282
|
}
|
6280
|
-
var getRawModuleRule = (rule,
|
6283
|
+
var getRawModuleRule = (rule, path12, options, upperType) => {
|
6281
6284
|
if (rule.loader) {
|
6282
6285
|
rule.use = [
|
6283
6286
|
{
|
@@ -6295,7 +6298,7 @@ var getRawModuleRule = (rule, path11, options, upperType) => {
|
|
6295
6298
|
compiler: options.compiler
|
6296
6299
|
};
|
6297
6300
|
const uses = use(context2);
|
6298
|
-
return createRawModuleRuleUses(uses ?? [], `${
|
6301
|
+
return createRawModuleRuleUses(uses ?? [], `${path12}.use`, options);
|
6299
6302
|
};
|
6300
6303
|
}
|
6301
6304
|
const rawModuleRule = {
|
@@ -6323,7 +6326,7 @@ var getRawModuleRule = (rule, path11, options, upperType) => {
|
|
6323
6326
|
scheme: rule.scheme ? getRawRuleSetCondition(rule.scheme) : void 0,
|
6324
6327
|
mimetype: rule.mimetype ? getRawRuleSetCondition(rule.mimetype) : void 0,
|
6325
6328
|
sideEffects: rule.sideEffects,
|
6326
|
-
use: typeof rule.use === "function" ? funcUse : createRawModuleRuleUses(rule.use ?? [], `${
|
6329
|
+
use: typeof rule.use === "function" ? funcUse : createRawModuleRuleUses(rule.use ?? [], `${path12}.use`, options),
|
6327
6330
|
type: rule.type,
|
6328
6331
|
layer: rule.layer,
|
6329
6332
|
parser: rule.parser ? getRawParserOptions(rule.parser, rule.type ?? upperType) : void 0,
|
@@ -6332,7 +6335,7 @@ var getRawModuleRule = (rule, path11, options, upperType) => {
|
|
6332
6335
|
oneOf: rule.oneOf ? rule.oneOf.filter(Boolean).map(
|
6333
6336
|
(rule2, index) => getRawModuleRule(
|
6334
6337
|
rule2,
|
6335
|
-
`${
|
6338
|
+
`${path12}.oneOf[${index}]`,
|
6336
6339
|
options,
|
6337
6340
|
rule2.type ?? upperType
|
6338
6341
|
)
|
@@ -6340,7 +6343,7 @@ var getRawModuleRule = (rule, path11, options, upperType) => {
|
|
6340
6343
|
rules: rule.rules ? rule.rules.filter(Boolean).map(
|
6341
6344
|
(rule2, index) => getRawModuleRule(
|
6342
6345
|
rule2,
|
6343
|
-
`${
|
6346
|
+
`${path12}.rules[${index}]`,
|
6344
6347
|
options,
|
6345
6348
|
rule2.type ?? upperType
|
6346
6349
|
)
|
@@ -6354,11 +6357,11 @@ var getRawModuleRule = (rule, path11, options, upperType) => {
|
|
6354
6357
|
delete rawModuleRule.resourceFragment;
|
6355
6358
|
rawModuleRule.rspackResource = getRawRuleSetCondition(
|
6356
6359
|
(resourceQueryFragment) => {
|
6357
|
-
const { path:
|
6358
|
-
if (rule.test && !tryMatch(
|
6360
|
+
const { path: path13, query, fragment } = parseResource(resourceQueryFragment);
|
6361
|
+
if (rule.test && !tryMatch(path13, rule.test)) {
|
6359
6362
|
return false;
|
6360
6363
|
}
|
6361
|
-
if (rule.resource && !tryMatch(
|
6364
|
+
if (rule.resource && !tryMatch(path13, rule.resource)) {
|
6362
6365
|
return false;
|
6363
6366
|
}
|
6364
6367
|
if (rule.resourceQuery && !tryMatch(query, rule.resourceQuery)) {
|
@@ -6480,7 +6483,7 @@ function getRawParserOptions(parser, type) {
|
|
6480
6483
|
json: getRawJsonParserOptions(parser)
|
6481
6484
|
};
|
6482
6485
|
}
|
6483
|
-
throw new Error(`unreachable:
|
6486
|
+
throw new Error(`unreachable: unknown module type: ${type}`);
|
6484
6487
|
}
|
6485
6488
|
function getRawJavascriptParserOptions(parser) {
|
6486
6489
|
var _a, _b, _c;
|
@@ -6668,7 +6671,7 @@ function getRawStats(stats) {
|
|
6668
6671
|
// src/config/defaults.ts
|
6669
6672
|
var import_node_assert6 = __toESM(require("assert"));
|
6670
6673
|
var import_node_fs3 = __toESM(require("fs"));
|
6671
|
-
var
|
6674
|
+
var import_node_path10 = __toESM(require("path"));
|
6672
6675
|
|
6673
6676
|
// src/ModuleTypeConstants.ts
|
6674
6677
|
var JSON_MODULE_TYPE = "json";
|
@@ -7534,38 +7537,36 @@ function getRawExternalItem(compiler, item) {
|
|
7534
7537
|
issuer: data.contextInfo.issuer,
|
7535
7538
|
issuerLayer: data.contextInfo.issuerLayer ?? null
|
7536
7539
|
},
|
7537
|
-
getResolve:
|
7540
|
+
getResolve: (options) => (context2, request, callback) => {
|
7538
7541
|
const resolver = new Resolver(ctx.getResolver());
|
7542
|
+
const child = options ? resolver.withOptions(options) : resolver;
|
7539
7543
|
const getResolveContext = () => ({
|
7540
7544
|
fileDependencies: compiler._lastCompilation.fileDependencies,
|
7541
7545
|
missingDependencies: compiler._lastCompilation.missingDependencies,
|
7542
7546
|
contextDependencies: compiler._lastCompilation.contextDependencies
|
7543
7547
|
});
|
7544
|
-
|
7545
|
-
|
7546
|
-
|
7548
|
+
if (callback) {
|
7549
|
+
child.resolve(
|
7550
|
+
{},
|
7551
|
+
context2,
|
7552
|
+
request,
|
7553
|
+
getResolveContext(),
|
7554
|
+
callback
|
7555
|
+
);
|
7556
|
+
} else {
|
7557
|
+
return new Promise((resolve3, reject2) => {
|
7547
7558
|
child.resolve(
|
7548
7559
|
{},
|
7549
7560
|
context2,
|
7550
7561
|
request,
|
7551
7562
|
getResolveContext(),
|
7552
|
-
|
7563
|
+
(err, result2) => {
|
7564
|
+
if (err) reject2(err);
|
7565
|
+
else resolve3(result2);
|
7566
|
+
}
|
7553
7567
|
);
|
7554
|
-
}
|
7555
|
-
|
7556
|
-
child.resolve(
|
7557
|
-
{},
|
7558
|
-
context2,
|
7559
|
-
request,
|
7560
|
-
getResolveContext(),
|
7561
|
-
(err, result2) => {
|
7562
|
-
if (err) reject2(err);
|
7563
|
-
else resolve3(result2);
|
7564
|
-
}
|
7565
|
-
);
|
7566
|
-
});
|
7567
|
-
}
|
7568
|
-
};
|
7568
|
+
});
|
7569
|
+
}
|
7569
7570
|
}
|
7570
7571
|
},
|
7571
7572
|
(err, result2, type) => {
|
@@ -7753,11 +7754,11 @@ function isNonEmptyArray(value) {
|
|
7753
7754
|
return value.length !== 0;
|
7754
7755
|
}
|
7755
7756
|
var identifierRegex = /[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;
|
7756
|
-
function joinPath(
|
7757
|
-
if (
|
7758
|
-
return
|
7757
|
+
function joinPath(path12) {
|
7758
|
+
if (path12.length === 1) {
|
7759
|
+
return path12[0].toString();
|
7759
7760
|
}
|
7760
|
-
return
|
7761
|
+
return path12.reduce((acc, item) => {
|
7761
7762
|
if (typeof item === "number") {
|
7762
7763
|
return acc + "[" + item.toString() + "]";
|
7763
7764
|
}
|
@@ -8246,8 +8247,53 @@ var HttpExternalsRspackPlugin = create2(
|
|
8246
8247
|
}
|
8247
8248
|
);
|
8248
8249
|
|
8249
|
-
// src/builtin-plugin/
|
8250
|
+
// src/builtin-plugin/HttpUriPlugin.ts
|
8251
|
+
var import_node_path7 = __toESM(require("path"));
|
8250
8252
|
var import_binding37 = require("@rspack/binding");
|
8253
|
+
var defaultHttpClient = (url2, headers) => {
|
8254
|
+
return fetch(url2, { headers }).then((response) => {
|
8255
|
+
return response.arrayBuffer().then((buffer) => {
|
8256
|
+
const responseHeaders = {};
|
8257
|
+
response.headers.forEach((value, key) => {
|
8258
|
+
responseHeaders[key] = value;
|
8259
|
+
});
|
8260
|
+
return {
|
8261
|
+
status: response.status,
|
8262
|
+
headers: responseHeaders,
|
8263
|
+
body: Buffer.from(buffer)
|
8264
|
+
};
|
8265
|
+
});
|
8266
|
+
});
|
8267
|
+
};
|
8268
|
+
var HttpUriPlugin = class extends RspackBuiltinPlugin {
|
8269
|
+
constructor(options) {
|
8270
|
+
super();
|
8271
|
+
this.options = options;
|
8272
|
+
this.name = import_binding37.BuiltinPluginName.HttpUriPlugin;
|
8273
|
+
this.affectedHooks = "compilation";
|
8274
|
+
}
|
8275
|
+
raw(compiler) {
|
8276
|
+
const { options } = this;
|
8277
|
+
const lockfileLocation = options.lockfileLocation ?? import_node_path7.default.join(
|
8278
|
+
compiler.context,
|
8279
|
+
compiler.name ? `${compiler.name}.rspack.lock` : "rspack.lock"
|
8280
|
+
);
|
8281
|
+
const cacheLocation = options.cacheLocation === false ? void 0 : options.cacheLocation ?? `${lockfileLocation}.data`;
|
8282
|
+
const raw = {
|
8283
|
+
allowedUris: options.allowedUris,
|
8284
|
+
lockfileLocation,
|
8285
|
+
cacheLocation,
|
8286
|
+
upgrade: options.upgrade ?? false,
|
8287
|
+
// frozen: options.frozen,
|
8288
|
+
// proxy: options.proxy,
|
8289
|
+
httpClient: options.httpClient ?? defaultHttpClient
|
8290
|
+
};
|
8291
|
+
return createBuiltinPlugin(this.name, raw);
|
8292
|
+
}
|
8293
|
+
};
|
8294
|
+
|
8295
|
+
// src/builtin-plugin/IgnorePlugin.ts
|
8296
|
+
var import_binding38 = require("@rspack/binding");
|
8251
8297
|
var import_zod2 = require("../compiled/zod/index.js");
|
8252
8298
|
var IgnorePluginOptions = import_zod2.z.union([
|
8253
8299
|
import_zod2.z.object({
|
@@ -8259,7 +8305,7 @@ var IgnorePluginOptions = import_zod2.z.union([
|
|
8259
8305
|
})
|
8260
8306
|
]);
|
8261
8307
|
var IgnorePlugin = create2(
|
8262
|
-
|
8308
|
+
import_binding38.BuiltinPluginName.IgnorePlugin,
|
8263
8309
|
(options) => {
|
8264
8310
|
validate(options, IgnorePluginOptions);
|
8265
8311
|
return options;
|
@@ -8267,22 +8313,22 @@ var IgnorePlugin = create2(
|
|
8267
8313
|
);
|
8268
8314
|
|
8269
8315
|
// src/builtin-plugin/InferAsyncModulesPlugin.ts
|
8270
|
-
var
|
8316
|
+
var import_binding39 = require("@rspack/binding");
|
8271
8317
|
var InferAsyncModulesPlugin = create2(
|
8272
|
-
|
8318
|
+
import_binding39.BuiltinPluginName.InferAsyncModulesPlugin,
|
8273
8319
|
() => {
|
8274
8320
|
},
|
8275
8321
|
"compilation"
|
8276
8322
|
);
|
8277
8323
|
|
8278
8324
|
// src/builtin-plugin/JavascriptModulesPlugin.ts
|
8279
|
-
var
|
8325
|
+
var import_binding40 = require("@rspack/binding");
|
8280
8326
|
var liteTapable6 = __toESM(require("@rspack/lite-tapable"));
|
8281
8327
|
var compilationHooksMap3 = /* @__PURE__ */ new WeakMap();
|
8282
8328
|
var JavascriptModulesPlugin = class extends RspackBuiltinPlugin {
|
8283
8329
|
constructor() {
|
8284
8330
|
super(...arguments);
|
8285
|
-
this.name =
|
8331
|
+
this.name = import_binding40.BuiltinPluginName.JavascriptModulesPlugin;
|
8286
8332
|
this.affectedHooks = "compilation";
|
8287
8333
|
}
|
8288
8334
|
raw() {
|
@@ -8306,27 +8352,27 @@ var JavascriptModulesPlugin = class extends RspackBuiltinPlugin {
|
|
8306
8352
|
};
|
8307
8353
|
|
8308
8354
|
// src/builtin-plugin/JsLoaderRspackPlugin.ts
|
8309
|
-
var
|
8355
|
+
var import_binding41 = require("@rspack/binding");
|
8310
8356
|
var JsLoaderRspackPlugin = create2(
|
8311
|
-
|
8357
|
+
import_binding41.BuiltinPluginName.JsLoaderRspackPlugin,
|
8312
8358
|
(compiler) => runLoaders.bind(null, compiler),
|
8313
8359
|
/* Not Inheretable */
|
8314
8360
|
"thisCompilation"
|
8315
8361
|
);
|
8316
8362
|
|
8317
8363
|
// src/builtin-plugin/JsonModulesPlugin.ts
|
8318
|
-
var
|
8364
|
+
var import_binding42 = require("@rspack/binding");
|
8319
8365
|
var JsonModulesPlugin = create2(
|
8320
|
-
|
8366
|
+
import_binding42.BuiltinPluginName.JsonModulesPlugin,
|
8321
8367
|
() => {
|
8322
8368
|
},
|
8323
8369
|
"compilation"
|
8324
8370
|
);
|
8325
8371
|
|
8326
8372
|
// src/builtin-plugin/lazy-compilation/lazyCompilation.ts
|
8327
|
-
var
|
8373
|
+
var import_binding43 = require("@rspack/binding");
|
8328
8374
|
var BuiltinLazyCompilationPlugin = create2(
|
8329
|
-
|
8375
|
+
import_binding43.BuiltinPluginName.LazyCompilationPlugin,
|
8330
8376
|
(module2, cacheable, entries, imports, test) => ({ module: module2, cacheable, imports, entries, test }),
|
8331
8377
|
"thisCompilation"
|
8332
8378
|
);
|
@@ -8347,11 +8393,11 @@ var lazyCompilationMiddleware = (compiler, userOptions = {}) => {
|
|
8347
8393
|
const activeModules = /* @__PURE__ */ new Map();
|
8348
8394
|
const filesByKey = /* @__PURE__ */ new Map();
|
8349
8395
|
new BuiltinLazyCompilationPlugin(
|
8350
|
-
({ module: module2, path:
|
8396
|
+
({ module: module2, path: path12 }) => {
|
8351
8397
|
const key = encodeURIComponent(
|
8352
8398
|
module2.replace(/\\/g, "/").replace(/@/g, "_")
|
8353
8399
|
).replace(/%(2F|3A|24|26|2B|2C|3B|3D)/g, decodeURIComponent);
|
8354
|
-
filesByKey.set(key,
|
8400
|
+
filesByKey.set(key, path12);
|
8355
8401
|
const active = activeModules.get(key) === true;
|
8356
8402
|
return {
|
8357
8403
|
client: `${options.client || getDefaultClient(compiler)}?${encodeURIComponent((options.serverUrl ?? "") + LAZY_COMPILATION_PREFIX)}`,
|
@@ -8402,28 +8448,30 @@ var lazyCompilationMiddlewareInternal = (compiler, activeModules, filesByKey) =>
|
|
8402
8448
|
}).filter(Boolean)
|
8403
8449
|
);
|
8404
8450
|
if (rebuiltModules.size) {
|
8405
|
-
compiler.watching.
|
8451
|
+
compiler.watching.invalidateWithChangesAndRemovals(
|
8452
|
+
new Set(rebuiltModules)
|
8453
|
+
);
|
8406
8454
|
}
|
8407
8455
|
}
|
8408
8456
|
};
|
8409
8457
|
};
|
8410
8458
|
|
8411
8459
|
// src/builtin-plugin/LimitChunkCountPlugin.ts
|
8412
|
-
var
|
8460
|
+
var import_binding44 = require("@rspack/binding");
|
8413
8461
|
var LimitChunkCountPlugin = create2(
|
8414
|
-
|
8462
|
+
import_binding44.BuiltinPluginName.LimitChunkCountPlugin,
|
8415
8463
|
(options) => {
|
8416
8464
|
return options;
|
8417
8465
|
}
|
8418
8466
|
);
|
8419
8467
|
|
8420
8468
|
// src/builtin-plugin/MangleExportsPlugin.ts
|
8421
|
-
var
|
8469
|
+
var import_binding45 = require("@rspack/binding");
|
8422
8470
|
var MangleExportsPlugin = class extends RspackBuiltinPlugin {
|
8423
8471
|
constructor(deterministic) {
|
8424
8472
|
super();
|
8425
8473
|
this.deterministic = deterministic;
|
8426
|
-
this.name =
|
8474
|
+
this.name = import_binding45.BuiltinPluginName.MangleExportsPlugin;
|
8427
8475
|
this.affectedHooks = "compilation";
|
8428
8476
|
}
|
8429
8477
|
raw(compiler) {
|
@@ -8454,27 +8502,27 @@ var MangleExportsPlugin = class extends RspackBuiltinPlugin {
|
|
8454
8502
|
};
|
8455
8503
|
|
8456
8504
|
// src/builtin-plugin/MergeDuplicateChunksPlugin.ts
|
8457
|
-
var
|
8505
|
+
var import_binding46 = require("@rspack/binding");
|
8458
8506
|
var MergeDuplicateChunksPlugin = create2(
|
8459
|
-
|
8507
|
+
import_binding46.BuiltinPluginName.MergeDuplicateChunksPlugin,
|
8460
8508
|
() => {
|
8461
8509
|
}
|
8462
8510
|
);
|
8463
8511
|
|
8464
8512
|
// src/builtin-plugin/ModuleChunkFormatPlugin.ts
|
8465
|
-
var
|
8513
|
+
var import_binding47 = require("@rspack/binding");
|
8466
8514
|
var ModuleChunkFormatPlugin = create2(
|
8467
|
-
|
8515
|
+
import_binding47.BuiltinPluginName.ModuleChunkFormatPlugin,
|
8468
8516
|
() => {
|
8469
8517
|
}
|
8470
8518
|
);
|
8471
8519
|
|
8472
8520
|
// src/builtin-plugin/ModuleConcatenationPlugin.ts
|
8473
|
-
var
|
8521
|
+
var import_binding48 = require("@rspack/binding");
|
8474
8522
|
var ModuleConcatenationPlugin = class extends RspackBuiltinPlugin {
|
8475
8523
|
constructor() {
|
8476
8524
|
super(...arguments);
|
8477
|
-
this.name =
|
8525
|
+
this.name = import_binding48.BuiltinPluginName.ModuleConcatenationPlugin;
|
8478
8526
|
this.affectedHooks = "compilation";
|
8479
8527
|
}
|
8480
8528
|
raw(compiler) {
|
@@ -8529,29 +8577,29 @@ var ModuleConcatenationPlugin = class extends RspackBuiltinPlugin {
|
|
8529
8577
|
};
|
8530
8578
|
|
8531
8579
|
// src/builtin-plugin/NamedChunkIdsPlugin.ts
|
8532
|
-
var
|
8580
|
+
var import_binding49 = require("@rspack/binding");
|
8533
8581
|
var NamedChunkIdsPlugin = create2(
|
8534
|
-
|
8582
|
+
import_binding49.BuiltinPluginName.NamedChunkIdsPlugin,
|
8535
8583
|
() => {
|
8536
8584
|
},
|
8537
8585
|
"compilation"
|
8538
8586
|
);
|
8539
8587
|
|
8540
8588
|
// src/builtin-plugin/NamedModuleIdsPlugin.ts
|
8541
|
-
var
|
8589
|
+
var import_binding50 = require("@rspack/binding");
|
8542
8590
|
var NamedModuleIdsPlugin = create2(
|
8543
|
-
|
8591
|
+
import_binding50.BuiltinPluginName.NamedModuleIdsPlugin,
|
8544
8592
|
() => {
|
8545
8593
|
},
|
8546
8594
|
"compilation"
|
8547
8595
|
);
|
8548
8596
|
|
8549
8597
|
// src/builtin-plugin/NaturalChunkIdsPlugin.ts
|
8550
|
-
var
|
8598
|
+
var import_binding51 = require("@rspack/binding");
|
8551
8599
|
var NaturalChunkIdsPlugin = class extends RspackBuiltinPlugin {
|
8552
8600
|
constructor() {
|
8553
8601
|
super(...arguments);
|
8554
|
-
this.name =
|
8602
|
+
this.name = import_binding51.BuiltinPluginName.NaturalChunkIdsPlugin;
|
8555
8603
|
this.affectedHooks = "compilation";
|
8556
8604
|
}
|
8557
8605
|
raw(compiler) {
|
@@ -8570,11 +8618,11 @@ var NaturalChunkIdsPlugin = class extends RspackBuiltinPlugin {
|
|
8570
8618
|
};
|
8571
8619
|
|
8572
8620
|
// src/builtin-plugin/NaturalModuleIdsPlugin.ts
|
8573
|
-
var
|
8621
|
+
var import_binding52 = require("@rspack/binding");
|
8574
8622
|
var NaturalModuleIdsPlugin = class extends RspackBuiltinPlugin {
|
8575
8623
|
constructor() {
|
8576
8624
|
super(...arguments);
|
8577
|
-
this.name =
|
8625
|
+
this.name = import_binding52.BuiltinPluginName.NaturalModuleIdsPlugin;
|
8578
8626
|
this.affectedHooks = "compilation";
|
8579
8627
|
}
|
8580
8628
|
raw(compiler) {
|
@@ -8593,24 +8641,24 @@ var NaturalModuleIdsPlugin = class extends RspackBuiltinPlugin {
|
|
8593
8641
|
};
|
8594
8642
|
|
8595
8643
|
// src/builtin-plugin/NodeTargetPlugin.ts
|
8596
|
-
var
|
8644
|
+
var import_binding53 = require("@rspack/binding");
|
8597
8645
|
var NodeTargetPlugin = create2(
|
8598
|
-
|
8646
|
+
import_binding53.BuiltinPluginName.NodeTargetPlugin,
|
8599
8647
|
() => void 0
|
8600
8648
|
);
|
8601
8649
|
|
8602
8650
|
// src/builtin-plugin/OccurrenceChunkIdsPlugin.ts
|
8603
|
-
var
|
8651
|
+
var import_binding54 = require("@rspack/binding");
|
8604
8652
|
var OccurrenceChunkIdsPlugin = create2(
|
8605
|
-
|
8653
|
+
import_binding54.BuiltinPluginName.OccurrenceChunkIdsPlugin,
|
8606
8654
|
(options) => ({ ...options }),
|
8607
8655
|
"compilation"
|
8608
8656
|
);
|
8609
8657
|
|
8610
8658
|
// src/builtin-plugin/ProgressPlugin.ts
|
8611
|
-
var
|
8659
|
+
var import_binding55 = require("@rspack/binding");
|
8612
8660
|
var ProgressPlugin = create2(
|
8613
|
-
|
8661
|
+
import_binding55.BuiltinPluginName.ProgressPlugin,
|
8614
8662
|
(progress = {}) => {
|
8615
8663
|
if (typeof progress === "function") {
|
8616
8664
|
return {
|
@@ -8624,9 +8672,9 @@ var ProgressPlugin = create2(
|
|
8624
8672
|
);
|
8625
8673
|
|
8626
8674
|
// src/builtin-plugin/ProvidePlugin.ts
|
8627
|
-
var
|
8675
|
+
var import_binding56 = require("@rspack/binding");
|
8628
8676
|
var ProvidePlugin = create2(
|
8629
|
-
|
8677
|
+
import_binding56.BuiltinPluginName.ProvidePlugin,
|
8630
8678
|
(provide) => {
|
8631
8679
|
const entries = Object.entries(provide).map(([key, value]) => {
|
8632
8680
|
if (typeof value === "string") {
|
@@ -8640,27 +8688,27 @@ var ProvidePlugin = create2(
|
|
8640
8688
|
);
|
8641
8689
|
|
8642
8690
|
// src/builtin-plugin/RealContentHashPlugin.ts
|
8643
|
-
var
|
8691
|
+
var import_binding57 = require("@rspack/binding");
|
8644
8692
|
var RealContentHashPlugin = create2(
|
8645
|
-
|
8693
|
+
import_binding57.BuiltinPluginName.RealContentHashPlugin,
|
8646
8694
|
() => {
|
8647
8695
|
},
|
8648
8696
|
"compilation"
|
8649
8697
|
);
|
8650
8698
|
|
8651
8699
|
// src/builtin-plugin/RemoveEmptyChunksPlugin.ts
|
8652
|
-
var
|
8700
|
+
var import_binding58 = require("@rspack/binding");
|
8653
8701
|
var RemoveEmptyChunksPlugin = create2(
|
8654
|
-
|
8702
|
+
import_binding58.BuiltinPluginName.RemoveEmptyChunksPlugin,
|
8655
8703
|
() => {
|
8656
8704
|
},
|
8657
8705
|
"compilation"
|
8658
8706
|
);
|
8659
8707
|
|
8660
8708
|
// src/builtin-plugin/RuntimeChunkPlugin.ts
|
8661
|
-
var
|
8709
|
+
var import_binding59 = require("@rspack/binding");
|
8662
8710
|
var RuntimeChunkPlugin = create2(
|
8663
|
-
|
8711
|
+
import_binding59.BuiltinPluginName.RuntimeChunkPlugin,
|
8664
8712
|
(options) => options,
|
8665
8713
|
"thisCompilation"
|
8666
8714
|
);
|
@@ -8738,18 +8786,18 @@ var createRuntimePluginHooksRegisters = (getCompiler, createTap, createMapTap) =
|
|
8738
8786
|
};
|
8739
8787
|
|
8740
8788
|
// src/builtin-plugin/SideEffectsFlagPlugin.ts
|
8741
|
-
var
|
8789
|
+
var import_binding60 = require("@rspack/binding");
|
8742
8790
|
var SideEffectsFlagPlugin = create2(
|
8743
|
-
|
8791
|
+
import_binding60.BuiltinPluginName.SideEffectsFlagPlugin,
|
8744
8792
|
() => {
|
8745
8793
|
},
|
8746
8794
|
"compilation"
|
8747
8795
|
);
|
8748
8796
|
|
8749
8797
|
// src/builtin-plugin/SizeLimitsPlugin.ts
|
8750
|
-
var
|
8798
|
+
var import_binding61 = require("@rspack/binding");
|
8751
8799
|
var SizeLimitsPlugin = create2(
|
8752
|
-
|
8800
|
+
import_binding61.BuiltinPluginName.SizeLimitsPlugin,
|
8753
8801
|
(options) => {
|
8754
8802
|
const hints = options.hints === false ? void 0 : options.hints;
|
8755
8803
|
return { ...options, hints };
|
@@ -8757,16 +8805,16 @@ var SizeLimitsPlugin = create2(
|
|
8757
8805
|
);
|
8758
8806
|
|
8759
8807
|
// src/builtin-plugin/SourceMapDevToolPlugin.ts
|
8760
|
-
var
|
8808
|
+
var import_binding62 = require("@rspack/binding");
|
8761
8809
|
var SourceMapDevToolPlugin = create2(
|
8762
|
-
|
8810
|
+
import_binding62.BuiltinPluginName.SourceMapDevToolPlugin,
|
8763
8811
|
(options) => options,
|
8764
8812
|
"compilation"
|
8765
8813
|
);
|
8766
8814
|
|
8767
8815
|
// src/builtin-plugin/SplitChunksPlugin.ts
|
8768
8816
|
var import_node_assert5 = __toESM(require("assert"));
|
8769
|
-
var
|
8817
|
+
var import_binding63 = require("@rspack/binding");
|
8770
8818
|
|
8771
8819
|
// src/util/SplitChunkSize.ts
|
8772
8820
|
var JsSplitChunkSizes = class {
|
@@ -8789,7 +8837,7 @@ var SplitChunksPlugin = class extends RspackBuiltinPlugin {
|
|
8789
8837
|
constructor(options) {
|
8790
8838
|
super();
|
8791
8839
|
this.options = options;
|
8792
|
-
this.name =
|
8840
|
+
this.name = import_binding63.BuiltinPluginName.SplitChunksPlugin;
|
8793
8841
|
this.affectedHooks = "thisCompilation";
|
8794
8842
|
}
|
8795
8843
|
raw(compiler) {
|
@@ -8889,9 +8937,9 @@ function toRawSplitChunksOptions(sc, compiler) {
|
|
8889
8937
|
}
|
8890
8938
|
|
8891
8939
|
// src/builtin-plugin/LightningCssMinimizerRspackPlugin.ts
|
8892
|
-
var
|
8940
|
+
var import_binding64 = require("@rspack/binding");
|
8893
8941
|
var LightningCssMinimizerRspackPlugin = create2(
|
8894
|
-
|
8942
|
+
import_binding64.BuiltinPluginName.LightningCssMinimizerRspackPlugin,
|
8895
8943
|
(options) => {
|
8896
8944
|
var _a, _b, _c;
|
8897
8945
|
const { include, exclude, draft, nonStandard, pseudoClasses, drafts } = (options == null ? void 0 : options.minimizerOptions) ?? {};
|
@@ -8919,16 +8967,16 @@ var LightningCssMinimizerRspackPlugin = create2(
|
|
8919
8967
|
);
|
8920
8968
|
|
8921
8969
|
// src/builtin-plugin/RemoveDuplicateModulesPlugin.ts
|
8922
|
-
var
|
8970
|
+
var import_binding65 = require("@rspack/binding");
|
8923
8971
|
var RemoveDuplicateModulesPlugin = create2(
|
8924
|
-
|
8972
|
+
import_binding65.BuiltinPluginName.RemoveDuplicateModulesPlugin,
|
8925
8973
|
() => {
|
8926
8974
|
return {};
|
8927
8975
|
}
|
8928
8976
|
);
|
8929
8977
|
|
8930
8978
|
// src/builtin-plugin/SwcJsMinimizerPlugin.ts
|
8931
|
-
var
|
8979
|
+
var import_binding66 = require("@rspack/binding");
|
8932
8980
|
function isObject2(value) {
|
8933
8981
|
const type = typeof value;
|
8934
8982
|
return value != null && (type === "object" || type === "function");
|
@@ -8971,7 +9019,7 @@ function getRawExtractCommentsOptions(extractComments) {
|
|
8971
9019
|
return void 0;
|
8972
9020
|
}
|
8973
9021
|
var SwcJsMinimizerRspackPlugin = create2(
|
8974
|
-
|
9022
|
+
import_binding66.BuiltinPluginName.SwcJsMinimizerRspackPlugin,
|
8975
9023
|
(options) => {
|
8976
9024
|
var _a, _b, _c, _d, _e;
|
8977
9025
|
let compress = ((_a = options == null ? void 0 : options.minimizerOptions) == null ? void 0 : _a.compress) ?? true;
|
@@ -9009,20 +9057,20 @@ var SwcJsMinimizerRspackPlugin = create2(
|
|
9009
9057
|
);
|
9010
9058
|
|
9011
9059
|
// src/builtin-plugin/WarnCaseSensitiveModulesPlugin.ts
|
9012
|
-
var
|
9060
|
+
var import_binding67 = require("@rspack/binding");
|
9013
9061
|
var WarnCaseSensitiveModulesPlugin = create2(
|
9014
|
-
|
9062
|
+
import_binding67.BuiltinPluginName.WarnCaseSensitiveModulesPlugin,
|
9015
9063
|
() => {
|
9016
9064
|
},
|
9017
9065
|
"compilation"
|
9018
9066
|
);
|
9019
9067
|
|
9020
9068
|
// src/builtin-plugin/WebWorkerTemplatePlugin.ts
|
9021
|
-
var
|
9069
|
+
var import_binding68 = require("@rspack/binding");
|
9022
9070
|
var WebWorkerTemplatePlugin = class extends RspackBuiltinPlugin {
|
9023
9071
|
constructor() {
|
9024
9072
|
super(...arguments);
|
9025
|
-
this.name =
|
9073
|
+
this.name = import_binding68.BuiltinPluginName.WebWorkerTemplatePlugin;
|
9026
9074
|
}
|
9027
9075
|
raw(compiler) {
|
9028
9076
|
compiler.options.output.chunkLoading = "import-scripts";
|
@@ -9031,7 +9079,7 @@ var WebWorkerTemplatePlugin = class extends RspackBuiltinPlugin {
|
|
9031
9079
|
};
|
9032
9080
|
|
9033
9081
|
// src/builtin-plugin/WorkerPlugin.ts
|
9034
|
-
var
|
9082
|
+
var import_binding69 = require("@rspack/binding");
|
9035
9083
|
var WorkerPlugin = class extends RspackBuiltinPlugin {
|
9036
9084
|
constructor(chunkLoading2, wasmLoading2, module2, workerPublicPath2) {
|
9037
9085
|
super();
|
@@ -9039,7 +9087,7 @@ var WorkerPlugin = class extends RspackBuiltinPlugin {
|
|
9039
9087
|
this.wasmLoading = wasmLoading2;
|
9040
9088
|
this.module = module2;
|
9041
9089
|
this.workerPublicPath = workerPublicPath2;
|
9042
|
-
this.name =
|
9090
|
+
this.name = import_binding69.BuiltinPluginName.WorkerPlugin;
|
9043
9091
|
}
|
9044
9092
|
raw(compiler) {
|
9045
9093
|
if (this.chunkLoading) {
|
@@ -9053,25 +9101,25 @@ var WorkerPlugin = class extends RspackBuiltinPlugin {
|
|
9053
9101
|
};
|
9054
9102
|
|
9055
9103
|
// src/builtin-plugin/FetchCompileAsyncWasmPlugin.ts
|
9056
|
-
var
|
9104
|
+
var import_binding70 = require("@rspack/binding");
|
9057
9105
|
var FetchCompileAsyncWasmPlugin = create2(
|
9058
|
-
|
9106
|
+
import_binding70.BuiltinPluginName.FetchCompileAsyncWasmPlugin,
|
9059
9107
|
() => {
|
9060
9108
|
},
|
9061
9109
|
"thisCompilation"
|
9062
9110
|
);
|
9063
9111
|
|
9064
9112
|
// src/builtin-plugin/NoEmitOnErrorsPlugin.ts
|
9065
|
-
var
|
9113
|
+
var import_binding71 = require("@rspack/binding");
|
9066
9114
|
var NoEmitOnErrorsPlugin = create2(
|
9067
|
-
|
9115
|
+
import_binding71.BuiltinPluginName.NoEmitOnErrorsPlugin,
|
9068
9116
|
() => void 0
|
9069
9117
|
);
|
9070
9118
|
|
9071
9119
|
// src/builtin-plugin/ContextReplacementPlugin.ts
|
9072
|
-
var
|
9120
|
+
var import_binding72 = require("@rspack/binding");
|
9073
9121
|
var ContextReplacementPlugin = create2(
|
9074
|
-
|
9122
|
+
import_binding72.BuiltinPluginName.ContextReplacementPlugin,
|
9075
9123
|
(resourceRegExp, newContentResource, newContentRecursive, newContentRegExp) => {
|
9076
9124
|
const rawOptions = {
|
9077
9125
|
resourceRegExp
|
@@ -9101,26 +9149,26 @@ var ContextReplacementPlugin = create2(
|
|
9101
9149
|
);
|
9102
9150
|
|
9103
9151
|
// src/builtin-plugin/LibManifestPlugin.ts
|
9104
|
-
var
|
9152
|
+
var import_binding73 = require("@rspack/binding");
|
9105
9153
|
var LibManifestPlugin = create2(
|
9106
|
-
|
9154
|
+
import_binding73.BuiltinPluginName.LibManifestPlugin,
|
9107
9155
|
(options) => {
|
9108
|
-
const { context: context2, entryOnly, format: format3, name: name2, path:
|
9156
|
+
const { context: context2, entryOnly, format: format3, name: name2, path: path12, type } = options;
|
9109
9157
|
return {
|
9110
9158
|
context: context2,
|
9111
9159
|
entryOnly,
|
9112
9160
|
format: format3,
|
9113
9161
|
name: name2,
|
9114
|
-
path:
|
9162
|
+
path: path12,
|
9115
9163
|
type
|
9116
9164
|
};
|
9117
9165
|
}
|
9118
9166
|
);
|
9119
9167
|
|
9120
9168
|
// src/builtin-plugin/DllEntryPlugin.ts
|
9121
|
-
var
|
9169
|
+
var import_binding74 = require("@rspack/binding");
|
9122
9170
|
var DllEntryPlugin = create2(
|
9123
|
-
|
9171
|
+
import_binding74.BuiltinPluginName.DllEntryPlugin,
|
9124
9172
|
(context2, entries, options) => {
|
9125
9173
|
return {
|
9126
9174
|
context: context2,
|
@@ -9131,14 +9179,14 @@ var DllEntryPlugin = create2(
|
|
9131
9179
|
);
|
9132
9180
|
|
9133
9181
|
// src/builtin-plugin/DllReferenceAgencyPlugin.ts
|
9134
|
-
var
|
9182
|
+
var import_binding75 = require("@rspack/binding");
|
9135
9183
|
var DllReferenceAgencyPlugin = create2(
|
9136
|
-
|
9184
|
+
import_binding75.BuiltinPluginName.DllReferenceAgencyPlugin,
|
9137
9185
|
(options) => options
|
9138
9186
|
);
|
9139
9187
|
|
9140
9188
|
// src/builtin-plugin/RsdoctorPlugin.ts
|
9141
|
-
var
|
9189
|
+
var import_binding76 = require("@rspack/binding");
|
9142
9190
|
var liteTapable8 = __toESM(require("@rspack/lite-tapable"));
|
9143
9191
|
var import_zod3 = require("../compiled/zod/index.js");
|
9144
9192
|
var rsdoctorPluginSchema = import_zod3.z.strictObject({
|
@@ -9146,7 +9194,7 @@ var rsdoctorPluginSchema = import_zod3.z.strictObject({
|
|
9146
9194
|
chunkGraphFeatures: import_zod3.z.union([import_zod3.z.boolean(), import_zod3.z.array(import_zod3.z.enum(["graph", "assets"]))]).optional()
|
9147
9195
|
});
|
9148
9196
|
var RsdoctorPluginImpl = create2(
|
9149
|
-
|
9197
|
+
import_binding76.BuiltinPluginName.RsdoctorPlugin,
|
9150
9198
|
function(c = {
|
9151
9199
|
moduleGraphFeatures: true,
|
9152
9200
|
chunkGraphFeatures: true
|
@@ -9182,7 +9230,7 @@ RsdoctorPlugin.getHooks = RsdoctorPlugin.getCompilationHooks = (compilation) =>
|
|
9182
9230
|
var createRsdoctorPluginHooksRegisters = (getCompiler, createTap, createMapTap) => {
|
9183
9231
|
return {
|
9184
9232
|
registerRsdoctorPluginModuleGraphTaps: createTap(
|
9185
|
-
|
9233
|
+
import_binding76.RegisterJsTapKind.RsdoctorPluginModuleGraph,
|
9186
9234
|
function() {
|
9187
9235
|
return RsdoctorPlugin.getCompilationHooks(
|
9188
9236
|
getCompiler().__internal__get_compilation()
|
@@ -9195,7 +9243,7 @@ var createRsdoctorPluginHooksRegisters = (getCompiler, createTap, createMapTap)
|
|
9195
9243
|
}
|
9196
9244
|
),
|
9197
9245
|
registerRsdoctorPluginChunkGraphTaps: createTap(
|
9198
|
-
|
9246
|
+
import_binding76.RegisterJsTapKind.RsdoctorPluginChunkGraph,
|
9199
9247
|
function() {
|
9200
9248
|
return RsdoctorPlugin.getCompilationHooks(
|
9201
9249
|
getCompiler().__internal__get_compilation()
|
@@ -9208,7 +9256,7 @@ var createRsdoctorPluginHooksRegisters = (getCompiler, createTap, createMapTap)
|
|
9208
9256
|
}
|
9209
9257
|
),
|
9210
9258
|
registerRsdoctorPluginModuleIdsTaps: createTap(
|
9211
|
-
|
9259
|
+
import_binding76.RegisterJsTapKind.RsdoctorPluginModuleIds,
|
9212
9260
|
function() {
|
9213
9261
|
return RsdoctorPlugin.getCompilationHooks(
|
9214
9262
|
getCompiler().__internal__get_compilation()
|
@@ -9221,7 +9269,7 @@ var createRsdoctorPluginHooksRegisters = (getCompiler, createTap, createMapTap)
|
|
9221
9269
|
}
|
9222
9270
|
),
|
9223
9271
|
registerRsdoctorPluginModuleSourcesTaps: createTap(
|
9224
|
-
|
9272
|
+
import_binding76.RegisterJsTapKind.RsdoctorPluginModuleSources,
|
9225
9273
|
function() {
|
9226
9274
|
return RsdoctorPlugin.getCompilationHooks(
|
9227
9275
|
getCompiler().__internal__get_compilation()
|
@@ -9234,7 +9282,7 @@ var createRsdoctorPluginHooksRegisters = (getCompiler, createTap, createMapTap)
|
|
9234
9282
|
}
|
9235
9283
|
),
|
9236
9284
|
registerRsdoctorPluginAssetsTaps: createTap(
|
9237
|
-
|
9285
|
+
import_binding76.RegisterJsTapKind.RsdoctorPluginAssets,
|
9238
9286
|
function() {
|
9239
9287
|
return RsdoctorPlugin.getCompilationHooks(
|
9240
9288
|
getCompiler().__internal__get_compilation()
|
@@ -9252,8 +9300,8 @@ var createRsdoctorPluginHooksRegisters = (getCompiler, createTap, createMapTap)
|
|
9252
9300
|
// src/builtin-plugin/SubresourceIntegrityPlugin.ts
|
9253
9301
|
var import_node_crypto2 = require("crypto");
|
9254
9302
|
var import_node_fs2 = require("fs");
|
9255
|
-
var
|
9256
|
-
var
|
9303
|
+
var import_node_path8 = require("path");
|
9304
|
+
var import_binding77 = require("@rspack/binding");
|
9257
9305
|
var import_zod4 = require("../compiled/zod/index.js");
|
9258
9306
|
var PLUGIN_NAME2 = "SubresourceIntegrityPlugin";
|
9259
9307
|
var NATIVE_HTML_PLUGIN = "HtmlRspackPlugin";
|
@@ -9264,7 +9312,7 @@ var pluginOptionsSchema2 = import_zod4.z.object({
|
|
9264
9312
|
enabled: import_zod4.z.literal("auto").or(import_zod4.z.boolean()).optional()
|
9265
9313
|
});
|
9266
9314
|
var NativeSubresourceIntegrityPlugin = create2(
|
9267
|
-
|
9315
|
+
import_binding77.BuiltinPluginName.SubresourceIntegrityPlugin,
|
9268
9316
|
function(options) {
|
9269
9317
|
let htmlPlugin = "Disabled";
|
9270
9318
|
if (options.htmlPlugin === NATIVE_HTML_PLUGIN) {
|
@@ -9334,7 +9382,7 @@ var SubresourceIntegrityPlugin = class extends NativeSubresourceIntegrityPlugin
|
|
9334
9382
|
for (const asset of assets.js) {
|
9335
9383
|
jsIntegrity.push(
|
9336
9384
|
this.getIntegrityChecksumForAsset(
|
9337
|
-
(0,
|
9385
|
+
(0, import_node_path8.relative)(publicPath2, decodeURIComponent(asset))
|
9338
9386
|
)
|
9339
9387
|
);
|
9340
9388
|
}
|
@@ -9342,7 +9390,7 @@ var SubresourceIntegrityPlugin = class extends NativeSubresourceIntegrityPlugin
|
|
9342
9390
|
for (const asset of assets.css) {
|
9343
9391
|
cssIntegrity.push(
|
9344
9392
|
this.getIntegrityChecksumForAsset(
|
9345
|
-
(0,
|
9393
|
+
(0, import_node_path8.relative)(publicPath2, decodeURIComponent(asset))
|
9346
9394
|
)
|
9347
9395
|
);
|
9348
9396
|
}
|
@@ -9362,10 +9410,10 @@ var SubresourceIntegrityPlugin = class extends NativeSubresourceIntegrityPlugin
|
|
9362
9410
|
if (!tagSrc) {
|
9363
9411
|
return;
|
9364
9412
|
}
|
9365
|
-
const src = (0,
|
9413
|
+
const src = (0, import_node_path8.relative)(publicPath2, decodeURIComponent(tagSrc));
|
9366
9414
|
tag.attributes.integrity = this.getIntegrityChecksumForAsset(src) || computeIntegrity(
|
9367
9415
|
this.options.hashFuncNames,
|
9368
|
-
(0, import_node_fs2.readFileSync)((0,
|
9416
|
+
(0, import_node_fs2.readFileSync)((0, import_node_path8.join)(outputPath, src))
|
9369
9417
|
);
|
9370
9418
|
tag.attributes.crossorigin = crossOriginLoading2 || "anonymous";
|
9371
9419
|
}
|
@@ -9465,14 +9513,14 @@ function computeIntegrity(hashFuncNames, source) {
|
|
9465
9513
|
).join(" ");
|
9466
9514
|
return result2;
|
9467
9515
|
}
|
9468
|
-
function normalizePath(
|
9469
|
-
return
|
9516
|
+
function normalizePath(path12) {
|
9517
|
+
return path12.replace(/\?.*$/, "").split(import_node_path8.sep).join("/");
|
9470
9518
|
}
|
9471
9519
|
|
9472
9520
|
// src/builtin-plugin/ModuleInfoHeaderPlugin.ts
|
9473
|
-
var
|
9521
|
+
var import_binding78 = require("@rspack/binding");
|
9474
9522
|
var ModuleInfoHeaderPlugin = create2(
|
9475
|
-
|
9523
|
+
import_binding78.BuiltinPluginName.ModuleInfoHeaderPlugin,
|
9476
9524
|
(verbose) => verbose,
|
9477
9525
|
"compilation"
|
9478
9526
|
);
|
@@ -9811,13 +9859,13 @@ __export(browserslistTargetHandler_exports, {
|
|
9811
9859
|
load: () => load,
|
9812
9860
|
resolve: () => resolve
|
9813
9861
|
});
|
9814
|
-
var
|
9862
|
+
var import_node_path9 = __toESM(require("path"));
|
9815
9863
|
var inputRx = /^(?:((?:[A-Z]:)?[/\\].*?))?(?::(.+?))?$/i;
|
9816
9864
|
var parse = (input, context2) => {
|
9817
9865
|
if (!input) {
|
9818
9866
|
return {};
|
9819
9867
|
}
|
9820
|
-
if (
|
9868
|
+
if (import_node_path9.default.isAbsolute(input)) {
|
9821
9869
|
const [, configPath, env] = inputRx.exec(input) || [];
|
9822
9870
|
return { configPath, env };
|
9823
9871
|
}
|
@@ -10416,7 +10464,8 @@ var applyRspackOptionsDefaults = (options) => {
|
|
10416
10464
|
options.output.library
|
10417
10465
|
);
|
10418
10466
|
applyExternalsPresetsDefaults(options.externalsPresets, {
|
10419
|
-
targetProperties
|
10467
|
+
targetProperties,
|
10468
|
+
buildHttp: Boolean(options.experiments.buildHttp)
|
10420
10469
|
});
|
10421
10470
|
F(options, "externalsType", () => {
|
10422
10471
|
return options.output.library ? (
|
@@ -10479,6 +10528,10 @@ var applyExperimentsDefaults = (experiments3, { production, development }) => {
|
|
10479
10528
|
D(experiments3, "css", experiments3.futureDefaults ? true : void 0);
|
10480
10529
|
D(experiments3, "layers", false);
|
10481
10530
|
D(experiments3, "topLevelAwait", true);
|
10531
|
+
D(experiments3, "buildHttp", void 0);
|
10532
|
+
if (experiments3.buildHttp && typeof experiments3.buildHttp === "object") {
|
10533
|
+
D(experiments3.buildHttp, "upgrade", false);
|
10534
|
+
}
|
10482
10535
|
D(experiments3, "incremental", !production ? {} : false);
|
10483
10536
|
if (typeof experiments3.incremental === "object") {
|
10484
10537
|
D(experiments3.incremental, "make", true);
|
@@ -10498,7 +10551,7 @@ var applyExperimentsDefaults = (experiments3, { production, development }) => {
|
|
10498
10551
|
D(experiments3.incremental, "emitAssets", true);
|
10499
10552
|
}
|
10500
10553
|
D(experiments3, "rspackFuture", {});
|
10501
|
-
D(experiments3, "parallelCodeSplitting",
|
10554
|
+
D(experiments3, "parallelCodeSplitting", true);
|
10502
10555
|
};
|
10503
10556
|
var applybundlerInfoDefaults = (rspackFuture, library3) => {
|
10504
10557
|
if (typeof rspackFuture === "object") {
|
@@ -10761,7 +10814,7 @@ var applyOutputDefaults = (output2, {
|
|
10761
10814
|
}
|
10762
10815
|
);
|
10763
10816
|
if (libraryName2) return libraryName2;
|
10764
|
-
const pkgPath =
|
10817
|
+
const pkgPath = import_node_path10.default.resolve(context2, "package.json");
|
10765
10818
|
try {
|
10766
10819
|
const packageInfo = JSON.parse(import_node_fs3.default.readFileSync(pkgPath, "utf-8"));
|
10767
10820
|
return packageInfo.name || "";
|
@@ -10817,7 +10870,7 @@ while determining default 'output.uniqueName' from 'name' in ${pkgPath}`;
|
|
10817
10870
|
D(output2, "assetModuleFilename", "[hash][ext][query]");
|
10818
10871
|
D(output2, "webassemblyModuleFilename", "[hash].module.wasm");
|
10819
10872
|
D(output2, "compareBeforeEmit", true);
|
10820
|
-
F(output2, "path", () =>
|
10873
|
+
F(output2, "path", () => import_node_path10.default.join(process.cwd(), "dist"));
|
10821
10874
|
F(output2, "pathinfo", () => development);
|
10822
10875
|
D(
|
10823
10876
|
output2,
|
@@ -11020,8 +11073,8 @@ ${helpMessage}`
|
|
11020
11073
|
);
|
11021
11074
|
F(environment2, "document", () => tp && optimistic(tp.document));
|
11022
11075
|
};
|
11023
|
-
var applyExternalsPresetsDefaults = (externalsPresets2, { targetProperties }) => {
|
11024
|
-
D(externalsPresets2, "web", targetProperties == null ? void 0 : targetProperties.web);
|
11076
|
+
var applyExternalsPresetsDefaults = (externalsPresets2, { targetProperties, buildHttp }) => {
|
11077
|
+
D(externalsPresets2, "web", !buildHttp && (targetProperties == null ? void 0 : targetProperties.web));
|
11025
11078
|
D(externalsPresets2, "node", targetProperties == null ? void 0 : targetProperties.node);
|
11026
11079
|
D(externalsPresets2, "electron", targetProperties == null ? void 0 : targetProperties.electron);
|
11027
11080
|
D(
|
@@ -11088,7 +11141,7 @@ var applyOptimizationDefaults = (optimization2, {
|
|
11088
11141
|
development,
|
11089
11142
|
css
|
11090
11143
|
}) => {
|
11091
|
-
D(optimization2, "removeAvailableModules",
|
11144
|
+
D(optimization2, "removeAvailableModules", true);
|
11092
11145
|
D(optimization2, "removeEmptyChunks", true);
|
11093
11146
|
D(optimization2, "mergeDuplicateChunks", true);
|
11094
11147
|
F(optimization2, "moduleIds", () => {
|
@@ -11292,7 +11345,7 @@ var getPnpDefault = () => {
|
|
11292
11345
|
};
|
11293
11346
|
|
11294
11347
|
// src/config/normalization.ts
|
11295
|
-
var
|
11348
|
+
var import_node_path11 = __toESM(require("path"));
|
11296
11349
|
var import_node_util5 = __toESM(require("util"));
|
11297
11350
|
var getNormalizedRspackOptions = (config2) => {
|
11298
11351
|
return {
|
@@ -11482,7 +11535,7 @@ var getNormalizedRspackOptions = (config2) => {
|
|
11482
11535
|
type: "persistent",
|
11483
11536
|
buildDependencies: nestedArray(
|
11484
11537
|
cache.buildDependencies,
|
11485
|
-
(deps) => deps.map((d) =>
|
11538
|
+
(deps) => deps.map((d) => import_node_path11.default.resolve(config2.context || process.cwd(), d))
|
11486
11539
|
),
|
11487
11540
|
version: cache.version || "",
|
11488
11541
|
snapshot: {
|
@@ -11494,7 +11547,7 @@ var getNormalizedRspackOptions = (config2) => {
|
|
11494
11547
|
},
|
11495
11548
|
storage: {
|
11496
11549
|
type: "filesystem",
|
11497
|
-
directory:
|
11550
|
+
directory: import_node_path11.default.resolve(
|
11498
11551
|
config2.context || process.cwd(),
|
11499
11552
|
((_a = cache.storage) == null ? void 0 : _a.directory) || "node_modules/.cache/rspack"
|
11500
11553
|
)
|
@@ -11525,7 +11578,8 @@ var getNormalizedRspackOptions = (config2) => {
|
|
11525
11578
|
emitAssets: true
|
11526
11579
|
} : options
|
11527
11580
|
),
|
11528
|
-
parallelCodeSplitting: experiments3.parallelCodeSplitting
|
11581
|
+
parallelCodeSplitting: experiments3.parallelCodeSplitting,
|
11582
|
+
buildHttp: experiments3.buildHttp
|
11529
11583
|
})),
|
11530
11584
|
watch: config2.watch,
|
11531
11585
|
watchOptions: cloneObject(config2.watchOptions),
|
@@ -11631,14 +11685,14 @@ var Resolver = class _Resolver {
|
|
11631
11685
|
constructor(binding14) {
|
11632
11686
|
this.binding = binding14;
|
11633
11687
|
}
|
11634
|
-
resolveSync(context2,
|
11635
|
-
const data = this.binding.resolveSync(
|
11688
|
+
resolveSync(context2, path12, request) {
|
11689
|
+
const data = this.binding.resolveSync(path12, request);
|
11636
11690
|
if (data === false) return data;
|
11637
11691
|
return data.resource;
|
11638
11692
|
}
|
11639
|
-
resolve(context2,
|
11693
|
+
resolve(context2, path12, request, resolveContext, callback) {
|
11640
11694
|
try {
|
11641
|
-
const data = this.binding.resolveSync(
|
11695
|
+
const data = this.binding.resolveSync(path12, request);
|
11642
11696
|
if (data === false) {
|
11643
11697
|
callback(null, false);
|
11644
11698
|
return;
|
@@ -11820,8 +11874,19 @@ var Watching = class {
|
|
11820
11874
|
this.onChange();
|
11821
11875
|
this.#invalidate();
|
11822
11876
|
}
|
11823
|
-
|
11824
|
-
|
11877
|
+
/**
|
11878
|
+
* @internal This is not a public API yet, still unstable, might change in the future
|
11879
|
+
*/
|
11880
|
+
invalidateWithChangesAndRemovals(changedFiles, removedFiles, callback) {
|
11881
|
+
if (callback) {
|
11882
|
+
this.callbacks.push(callback);
|
11883
|
+
}
|
11884
|
+
if (!this.#invalidReported) {
|
11885
|
+
this.#invalidReported = true;
|
11886
|
+
this.compiler.hooks.invalid.call(null, Date.now());
|
11887
|
+
}
|
11888
|
+
this.onChange();
|
11889
|
+
this.#invalidate(void 0, void 0, changedFiles, removedFiles);
|
11825
11890
|
}
|
11826
11891
|
#invalidate(fileTimeInfoEntries, contextTimeInfoEntries, changedFiles, removedFiles) {
|
11827
11892
|
this.#mergeWithCollected(changedFiles, removedFiles);
|
@@ -11942,16 +12007,18 @@ var Watching = class {
|
|
11942
12007
|
});
|
11943
12008
|
}
|
11944
12009
|
#mergeWithCollected(changedFiles, removedFiles) {
|
11945
|
-
if (!changedFiles) return;
|
11946
|
-
if (!removedFiles) return;
|
11947
12010
|
if (!this.#collectedChangedFiles || !this.#collectedRemovedFiles) {
|
11948
12011
|
this.#collectedChangedFiles = new Set(changedFiles);
|
11949
12012
|
this.#collectedRemovedFiles = new Set(removedFiles);
|
11950
|
-
|
12013
|
+
return;
|
12014
|
+
}
|
12015
|
+
if (changedFiles) {
|
11951
12016
|
for (const file of changedFiles) {
|
11952
12017
|
this.#collectedChangedFiles.add(file);
|
11953
12018
|
this.#collectedRemovedFiles.delete(file);
|
11954
12019
|
}
|
12020
|
+
}
|
12021
|
+
if (removedFiles) {
|
11955
12022
|
for (const file of removedFiles) {
|
11956
12023
|
this.#collectedChangedFiles.delete(file);
|
11957
12024
|
this.#collectedRemovedFiles.add(file);
|
@@ -11971,7 +12038,7 @@ var Watching = class {
|
|
11971
12038
|
|
11972
12039
|
// src/util/bindingVersionCheck.ts
|
11973
12040
|
var import_node_fs4 = require("fs");
|
11974
|
-
var
|
12041
|
+
var import_node_path12 = __toESM(require("path"));
|
11975
12042
|
var NodePlatformArchToAbi = {
|
11976
12043
|
android: {
|
11977
12044
|
arm64: "",
|
@@ -12043,7 +12110,7 @@ var checkVersion = () => {
|
|
12043
12110
|
}
|
12044
12111
|
let ADDON_VERSION;
|
12045
12112
|
try {
|
12046
|
-
const BINDING_PKG_DIR =
|
12113
|
+
const BINDING_PKG_DIR = import_node_path12.default.dirname(
|
12047
12114
|
require.resolve("@rspack/binding/package.json")
|
12048
12115
|
);
|
12049
12116
|
const isLocal = (0, import_node_fs4.readdirSync)(BINDING_PKG_DIR).some(
|
@@ -12219,7 +12286,7 @@ var binding6 = __toESM(require("@rspack/binding"));
|
|
12219
12286
|
|
12220
12287
|
// src/Module.ts
|
12221
12288
|
var binding5 = __toESM(require("@rspack/binding"));
|
12222
|
-
var
|
12289
|
+
var import_binding79 = require("@rspack/binding");
|
12223
12290
|
var ContextModuleFactoryBeforeResolveData = class _ContextModuleFactoryBeforeResolveData {
|
12224
12291
|
#inner;
|
12225
12292
|
static __from_binding(binding14) {
|
@@ -15116,17 +15183,17 @@ var ASSETS_GROUPERS = {
|
|
15116
15183
|
const extensionMatch = groupAssetsByExtension && GROUP_EXTENSION_REGEXP.exec(asset.name);
|
15117
15184
|
const extension = extensionMatch ? extensionMatch[1] : "";
|
15118
15185
|
const pathMatch = groupAssetsByPath && GROUP_PATH_REGEXP.exec(asset.name);
|
15119
|
-
const
|
15186
|
+
const path12 = pathMatch ? pathMatch[1].split(/[/\\]/) : [];
|
15120
15187
|
const keys = [];
|
15121
15188
|
if (groupAssetsByPath) {
|
15122
15189
|
keys.push(".");
|
15123
15190
|
if (extension)
|
15124
15191
|
keys.push(
|
15125
|
-
|
15192
|
+
path12.length ? `${path12.join("/")}/*${extension}` : `*${extension}`
|
15126
15193
|
);
|
15127
|
-
while (
|
15128
|
-
keys.push(`${
|
15129
|
-
|
15194
|
+
while (path12.length > 0) {
|
15195
|
+
keys.push(`${path12.join("/")}/`);
|
15196
|
+
path12.pop();
|
15130
15197
|
}
|
15131
15198
|
} else {
|
15132
15199
|
if (extension) keys.push(`*${extension}`);
|
@@ -15312,16 +15379,16 @@ var MODULES_GROUPERS = (type) => ({
|
|
15312
15379
|
const extensionMatch = groupModulesByExtension && GROUP_EXTENSION_REGEXP.exec(resource);
|
15313
15380
|
const extension = extensionMatch ? extensionMatch[1] : "";
|
15314
15381
|
const pathMatch = groupModulesByPath && GROUP_PATH_REGEXP.exec(resource);
|
15315
|
-
const
|
15382
|
+
const path12 = pathMatch ? pathMatch[1].split(/[/\\]/) : [];
|
15316
15383
|
const keys = [];
|
15317
15384
|
if (groupModulesByPath) {
|
15318
15385
|
if (extension)
|
15319
15386
|
keys.push(
|
15320
|
-
|
15387
|
+
path12.length ? `${path12.join("/")}/*${extension}` : `*${extension}`
|
15321
15388
|
);
|
15322
|
-
while (
|
15323
|
-
keys.push(`${
|
15324
|
-
|
15389
|
+
while (path12.length > 0) {
|
15390
|
+
keys.push(`${path12.join("/")}/`);
|
15391
|
+
path12.pop();
|
15325
15392
|
}
|
15326
15393
|
} else {
|
15327
15394
|
if (extension) keys.push(`*${extension}`);
|
@@ -17762,6 +17829,9 @@ var RspackOptionsApply = class {
|
|
17762
17829
|
new APIPlugin().apply(compiler);
|
17763
17830
|
new DataUriPlugin().apply(compiler);
|
17764
17831
|
new FileUriPlugin().apply(compiler);
|
17832
|
+
if (options.experiments.buildHttp) {
|
17833
|
+
new HttpUriPlugin(options.experiments.buildHttp).apply(compiler);
|
17834
|
+
}
|
17765
17835
|
new EnsureChunkConditionsPlugin().apply(compiler);
|
17766
17836
|
if (options.optimization.mergeDuplicateChunks) {
|
17767
17837
|
new MergeDuplicateChunksPlugin().apply(compiler);
|
@@ -17896,7 +17966,7 @@ var RspackOptionsApply = class {
|
|
17896
17966
|
|
17897
17967
|
// src/ContextModule.ts
|
17898
17968
|
var binding11 = __toESM(require("@rspack/binding"));
|
17899
|
-
var
|
17969
|
+
var import_binding80 = require("@rspack/binding");
|
17900
17970
|
Object.defineProperty(binding11.ContextModule.prototype, "originalSource", {
|
17901
17971
|
enumerable: true,
|
17902
17972
|
configurable: true,
|
@@ -17918,7 +17988,7 @@ Object.defineProperty(binding11.ContextModule.prototype, "emitFile", {
|
|
17918
17988
|
|
17919
17989
|
// src/ConcatenatedModule.ts
|
17920
17990
|
var binding12 = __toESM(require("@rspack/binding"));
|
17921
|
-
var
|
17991
|
+
var import_binding81 = require("@rspack/binding");
|
17922
17992
|
Object.defineProperty(binding12.ConcatenatedModule.prototype, "originalSource", {
|
17923
17993
|
enumerable: true,
|
17924
17994
|
configurable: true,
|
@@ -17940,7 +18010,7 @@ Object.defineProperty(binding12.ConcatenatedModule.prototype, "emitFile", {
|
|
17940
18010
|
|
17941
18011
|
// src/ExternalModule.ts
|
17942
18012
|
var binding13 = __toESM(require("@rspack/binding"));
|
17943
|
-
var
|
18013
|
+
var import_binding82 = require("@rspack/binding");
|
17944
18014
|
Object.defineProperty(binding13.ExternalModule.prototype, "originalSource", {
|
17945
18015
|
enumerable: true,
|
17946
18016
|
configurable: true,
|
@@ -17961,7 +18031,7 @@ Object.defineProperty(binding13.ExternalModule.prototype, "emitFile", {
|
|
17961
18031
|
});
|
17962
18032
|
|
17963
18033
|
// src/exports.ts
|
17964
|
-
var
|
18034
|
+
var import_binding90 = require("@rspack/binding");
|
17965
18035
|
|
17966
18036
|
// src/lib/ModuleFilenameHelpers.ts
|
17967
18037
|
var ModuleFilenameHelpers_exports = {};
|
@@ -18006,9 +18076,9 @@ var matchObject = (obj, str) => {
|
|
18006
18076
|
var import_zod5 = __toESM(require("../compiled/zod/index.js"));
|
18007
18077
|
|
18008
18078
|
// src/builtin-plugin/FlagAllModulesAsUsedPlugin.ts
|
18009
|
-
var
|
18079
|
+
var import_binding83 = require("@rspack/binding");
|
18010
18080
|
var FlagAllModulesAsUsedPlugin = create2(
|
18011
|
-
|
18081
|
+
import_binding83.BuiltinPluginName.FlagAllModulesAsUsedPlugin,
|
18012
18082
|
(explanation) => {
|
18013
18083
|
return {
|
18014
18084
|
explanation
|
@@ -18897,7 +18967,7 @@ var NodeTemplatePlugin = class {
|
|
18897
18967
|
};
|
18898
18968
|
|
18899
18969
|
// src/config/zod.ts
|
18900
|
-
var
|
18970
|
+
var import_node_path13 = __toESM(require("path"));
|
18901
18971
|
var import_zod8 = require("../compiled/zod/index.js");
|
18902
18972
|
|
18903
18973
|
// src/config/utils.ts
|
@@ -19055,7 +19125,7 @@ var filename = filenameTemplate.or(
|
|
19055
19125
|
var name = import_zod8.z.string();
|
19056
19126
|
var dependencies = import_zod8.z.array(name);
|
19057
19127
|
var context = import_zod8.z.string().refine(
|
19058
|
-
(val) =>
|
19128
|
+
(val) => import_node_path13.default.isAbsolute(val),
|
19059
19129
|
(val) => ({
|
19060
19130
|
message: `The provided value ${JSON.stringify(val)} must be an absolute path.`
|
19061
19131
|
})
|
@@ -19154,7 +19224,7 @@ var entryDynamic = import_zod8.z.function().returns(
|
|
19154
19224
|
entryStatic.or(import_zod8.z.promise(entryStatic))
|
19155
19225
|
);
|
19156
19226
|
var entry = entryStatic.or(entryDynamic);
|
19157
|
-
var
|
19227
|
+
var path11 = import_zod8.z.string();
|
19158
19228
|
var pathinfo = import_zod8.z.boolean().or(import_zod8.z.literal("verbose"));
|
19159
19229
|
var assetModuleFilename = filename;
|
19160
19230
|
var webassemblyModuleFilename = import_zod8.z.string();
|
@@ -19228,7 +19298,7 @@ var environment = import_zod8.z.strictObject({
|
|
19228
19298
|
templateLiteral: import_zod8.z.boolean().optional()
|
19229
19299
|
});
|
19230
19300
|
var output = import_zod8.z.strictObject({
|
19231
|
-
path:
|
19301
|
+
path: path11.optional(),
|
19232
19302
|
pathinfo: pathinfo.optional(),
|
19233
19303
|
clean: clean.optional(),
|
19234
19304
|
publicPath: publicPath.optional(),
|
@@ -19284,7 +19354,7 @@ var output = import_zod8.z.strictObject({
|
|
19284
19354
|
});
|
19285
19355
|
var resolveAlias = import_zod8.z.record(
|
19286
19356
|
import_zod8.z.literal(false).or(import_zod8.z.string()).or(import_zod8.z.array(import_zod8.z.string().or(import_zod8.z.literal(false))))
|
19287
|
-
);
|
19357
|
+
).or(import_zod8.z.literal(false));
|
19288
19358
|
var resolveTsConfigFile = import_zod8.z.string();
|
19289
19359
|
var resolveTsConfig = resolveTsConfigFile.or(
|
19290
19360
|
import_zod8.z.strictObject({
|
@@ -19865,7 +19935,7 @@ var optimizationRuntimeChunk = import_zod8.z.enum(["single", "multiple"]).or(imp
|
|
19865
19935
|
).optional()
|
19866
19936
|
})
|
19867
19937
|
);
|
19868
|
-
var optimizationSplitChunksNameFunction = import_zod8.z.function().args(import_zod8.z.instanceof(
|
19938
|
+
var optimizationSplitChunksNameFunction = import_zod8.z.function().args(import_zod8.z.instanceof(import_binding79.Module), import_zod8.z.array(import_zod8.z.instanceof(Chunk)), import_zod8.z.string()).returns(
|
19869
19939
|
import_zod8.z.string().optional()
|
19870
19940
|
);
|
19871
19941
|
var optimizationSplitChunksName = import_zod8.z.string().or(import_zod8.z.literal(false)).or(optimizationSplitChunksNameFunction);
|
@@ -19892,7 +19962,7 @@ var sharedOptimizationSplitChunksCacheGroup = {
|
|
19892
19962
|
var optimizationSplitChunksCacheGroup = import_zod8.z.strictObject({
|
19893
19963
|
test: import_zod8.z.string().or(import_zod8.z.instanceof(RegExp)).or(
|
19894
19964
|
import_zod8.z.function().args(
|
19895
|
-
import_zod8.z.instanceof(
|
19965
|
+
import_zod8.z.instanceof(import_binding79.Module),
|
19896
19966
|
import_zod8.z.object({
|
19897
19967
|
moduleGraph: import_zod8.z.instanceof(ModuleGraph),
|
19898
19968
|
chunkGraph: import_zod8.z.instanceof(ChunkGraph)
|
@@ -19990,6 +20060,23 @@ var incremental = import_zod8.z.strictObject({
|
|
19990
20060
|
chunksRender: import_zod8.z.boolean().optional(),
|
19991
20061
|
emitAssets: import_zod8.z.boolean().optional()
|
19992
20062
|
});
|
20063
|
+
var buildHttpOptions = import_zod8.z.object({
|
20064
|
+
allowedUris: import_zod8.z.array(import_zod8.z.union([import_zod8.z.string(), import_zod8.z.instanceof(RegExp)])),
|
20065
|
+
lockfileLocation: import_zod8.z.string().optional(),
|
20066
|
+
cacheLocation: import_zod8.z.union([import_zod8.z.string(), import_zod8.z.literal(false)]).optional(),
|
20067
|
+
upgrade: import_zod8.z.boolean().optional(),
|
20068
|
+
// proxy: z.string().optional(),
|
20069
|
+
// frozen: z.boolean().optional(),
|
20070
|
+
httpClient: import_zod8.z.function().args(import_zod8.z.string(), import_zod8.z.record(import_zod8.z.string())).returns(
|
20071
|
+
import_zod8.z.promise(
|
20072
|
+
import_zod8.z.object({
|
20073
|
+
status: import_zod8.z.number(),
|
20074
|
+
headers: import_zod8.z.record(import_zod8.z.string()),
|
20075
|
+
body: import_zod8.z.instanceof(Buffer)
|
20076
|
+
})
|
20077
|
+
)
|
20078
|
+
).optional()
|
20079
|
+
});
|
19993
20080
|
var experiments = import_zod8.z.strictObject({
|
19994
20081
|
cache: import_zod8.z.boolean().optional().or(experimentCacheOptions),
|
19995
20082
|
lazyCompilation: import_zod8.z.boolean().optional().or(lazyCompilationOptions),
|
@@ -20001,7 +20088,8 @@ var experiments = import_zod8.z.strictObject({
|
|
20001
20088
|
incremental: import_zod8.z.boolean().or(incremental).optional(),
|
20002
20089
|
parallelCodeSplitting: import_zod8.z.boolean().optional(),
|
20003
20090
|
futureDefaults: import_zod8.z.boolean().optional(),
|
20004
|
-
rspackFuture: rspackFutureOptions.optional()
|
20091
|
+
rspackFuture: rspackFutureOptions.optional(),
|
20092
|
+
buildHttp: buildHttpOptions.optional()
|
20005
20093
|
});
|
20006
20094
|
var watch = import_zod8.z.boolean();
|
20007
20095
|
var watchOptions = import_zod8.z.strictObject({
|
@@ -20060,9 +20148,9 @@ var rspackOptions = import_zod8.z.strictObject({
|
|
20060
20148
|
});
|
20061
20149
|
|
20062
20150
|
// src/container/ModuleFederationRuntimePlugin.ts
|
20063
|
-
var
|
20151
|
+
var import_binding84 = require("@rspack/binding");
|
20064
20152
|
var ModuleFederationRuntimePlugin = create2(
|
20065
|
-
|
20153
|
+
import_binding84.BuiltinPluginName.ModuleFederationRuntimePlugin,
|
20066
20154
|
() => {
|
20067
20155
|
}
|
20068
20156
|
);
|
@@ -20258,10 +20346,10 @@ function getDefaultEntryRuntime(paths, options, compiler) {
|
|
20258
20346
|
}
|
20259
20347
|
|
20260
20348
|
// src/sharing/ConsumeSharedPlugin.ts
|
20261
|
-
var
|
20349
|
+
var import_binding86 = require("@rspack/binding");
|
20262
20350
|
|
20263
20351
|
// src/sharing/ShareRuntimePlugin.ts
|
20264
|
-
var
|
20352
|
+
var import_binding85 = require("@rspack/binding");
|
20265
20353
|
var compilerSet = /* @__PURE__ */ new WeakSet();
|
20266
20354
|
function isSingleton(compiler) {
|
20267
20355
|
return compilerSet.has(compiler);
|
@@ -20273,7 +20361,7 @@ var ShareRuntimePlugin = class extends RspackBuiltinPlugin {
|
|
20273
20361
|
constructor(enhanced = false) {
|
20274
20362
|
super();
|
20275
20363
|
this.enhanced = enhanced;
|
20276
|
-
this.name =
|
20364
|
+
this.name = import_binding85.BuiltinPluginName.ShareRuntimePlugin;
|
20277
20365
|
}
|
20278
20366
|
raw(compiler) {
|
20279
20367
|
if (isSingleton(compiler)) return;
|
@@ -20292,7 +20380,7 @@ function isRequiredVersion(str) {
|
|
20292
20380
|
var ConsumeSharedPlugin = class extends RspackBuiltinPlugin {
|
20293
20381
|
constructor(options) {
|
20294
20382
|
super();
|
20295
|
-
this.name =
|
20383
|
+
this.name = import_binding86.BuiltinPluginName.ConsumeSharedPlugin;
|
20296
20384
|
this._options = {
|
20297
20385
|
consumes: parseOptions(
|
20298
20386
|
options.consumes,
|
@@ -20355,11 +20443,11 @@ var ConsumeSharedPlugin = class extends RspackBuiltinPlugin {
|
|
20355
20443
|
};
|
20356
20444
|
|
20357
20445
|
// src/sharing/ProvideSharedPlugin.ts
|
20358
|
-
var
|
20446
|
+
var import_binding87 = require("@rspack/binding");
|
20359
20447
|
var ProvideSharedPlugin = class extends RspackBuiltinPlugin {
|
20360
20448
|
constructor(options) {
|
20361
20449
|
super();
|
20362
|
-
this.name =
|
20450
|
+
this.name = import_binding87.BuiltinPluginName.ProvideSharedPlugin;
|
20363
20451
|
this._provides = parseOptions(
|
20364
20452
|
options.provides,
|
20365
20453
|
(item) => {
|
@@ -20464,11 +20552,11 @@ var SharePlugin = class {
|
|
20464
20552
|
};
|
20465
20553
|
|
20466
20554
|
// src/container/ContainerPlugin.ts
|
20467
|
-
var
|
20555
|
+
var import_binding88 = require("@rspack/binding");
|
20468
20556
|
var ContainerPlugin = class extends RspackBuiltinPlugin {
|
20469
20557
|
constructor(options) {
|
20470
20558
|
super();
|
20471
|
-
this.name =
|
20559
|
+
this.name = import_binding88.BuiltinPluginName.ContainerPlugin;
|
20472
20560
|
this._options = {
|
20473
20561
|
name: options.name,
|
20474
20562
|
shareScope: options.shareScope || "default",
|
@@ -20512,11 +20600,11 @@ var ContainerPlugin = class extends RspackBuiltinPlugin {
|
|
20512
20600
|
};
|
20513
20601
|
|
20514
20602
|
// src/container/ContainerReferencePlugin.ts
|
20515
|
-
var
|
20603
|
+
var import_binding89 = require("@rspack/binding");
|
20516
20604
|
var ContainerReferencePlugin = class extends RspackBuiltinPlugin {
|
20517
20605
|
constructor(options) {
|
20518
20606
|
super();
|
20519
|
-
this.name =
|
20607
|
+
this.name = import_binding89.BuiltinPluginName.ContainerReferencePlugin;
|
20520
20608
|
this._options = {
|
20521
20609
|
remoteType: options.remoteType,
|
20522
20610
|
remotes: parseOptions(
|
@@ -20601,7 +20689,7 @@ var ModuleFederationPluginV1 = class {
|
|
20601
20689
|
};
|
20602
20690
|
|
20603
20691
|
// src/exports.ts
|
20604
|
-
var
|
20692
|
+
var import_binding91 = require("@rspack/binding");
|
20605
20693
|
var rspackVersion = import_package.version;
|
20606
20694
|
var version = import_package.webpackVersion;
|
20607
20695
|
var WebpackError2 = Error;
|
@@ -20648,7 +20736,7 @@ var sharing = {
|
|
20648
20736
|
var experiments2 = {
|
20649
20737
|
globalTrace: {
|
20650
20738
|
async register(filter, layer2, output2) {
|
20651
|
-
(0,
|
20739
|
+
(0, import_binding91.registerGlobalTrace)(filter, layer2, output2);
|
20652
20740
|
if (layer2 === "otel") {
|
20653
20741
|
try {
|
20654
20742
|
const { initOpenTelemetry } = await import("@rspack/tracing");
|
@@ -20662,7 +20750,7 @@ var experiments2 = {
|
|
20662
20750
|
}
|
20663
20751
|
},
|
20664
20752
|
async cleanup() {
|
20665
|
-
(0,
|
20753
|
+
(0, import_binding91.cleanupGlobalTrace)();
|
20666
20754
|
try {
|
20667
20755
|
const { shutdownOpenTelemetry } = await import("@rspack/tracing");
|
20668
20756
|
await shutdownOpenTelemetry();
|