@rspack-canary/core 1.5.9-canary-a915dabc-20251013174148 → 1.6.0-canary-5bacb922-20251015173619
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/Compilation.d.ts +13 -16
- package/dist/config/devServer.d.ts +1 -1
- package/dist/config/types.d.ts +2 -0
- package/dist/index.js +311 -341
- package/dist/util/fs.d.ts +2 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
"../../node_modules/.pnpm/enhanced-resolve@5.18.3/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js": function(
|
|
3
|
+
"../../node_modules/.pnpm/enhanced-resolve@5.18.3/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js": function(module1, __unused_webpack_exports, __webpack_require__) {
|
|
4
4
|
let { nextTick } = __webpack_require__("process"), dirname = (path)=>{
|
|
5
5
|
let idx = path.length - 1;
|
|
6
6
|
for(; idx >= 0;){
|
|
@@ -156,7 +156,7 @@ var __webpack_modules__ = {
|
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
let createBackend = (duration, provider, syncProvider, providerContext)=>duration > 0 ? new CacheBackend(duration, provider, syncProvider, providerContext) : new OperationMergerBackend(provider, syncProvider, providerContext);
|
|
159
|
-
|
|
159
|
+
module1.exports = class {
|
|
160
160
|
constructor(fileSystem, duration){
|
|
161
161
|
this.fileSystem = fileSystem, this._lstatBackend = createBackend(duration, this.fileSystem.lstat, this.fileSystem.lstatSync, this.fileSystem);
|
|
162
162
|
const lstat = this._lstatBackend.provide;
|
|
@@ -205,136 +205,63 @@ var __webpack_modules__ = {
|
|
|
205
205
|
}
|
|
206
206
|
};
|
|
207
207
|
},
|
|
208
|
-
"
|
|
209
|
-
|
|
210
|
-
Gp: ()=>canInherentFromParent,
|
|
211
|
-
Xj: ()=>RspackBuiltinPlugin,
|
|
212
|
-
dE: ()=>createNativePlugin,
|
|
213
|
-
no: ()=>createBuiltinPlugin,
|
|
214
|
-
vt: ()=>create
|
|
215
|
-
});
|
|
216
|
-
var _rspack_binding__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("@rspack/binding"), _rspack_binding__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(_rspack_binding__WEBPACK_IMPORTED_MODULE_0__);
|
|
217
|
-
let HOOKS_CAN_NOT_INHERENT_FROM_PARENT = [
|
|
218
|
-
"make",
|
|
219
|
-
"compile",
|
|
220
|
-
"emit",
|
|
221
|
-
"afterEmit",
|
|
222
|
-
"invalid",
|
|
223
|
-
"done",
|
|
224
|
-
"thisCompilation"
|
|
225
|
-
];
|
|
226
|
-
function canInherentFromParent(affectedHooks) {
|
|
227
|
-
return void 0 !== affectedHooks && !HOOKS_CAN_NOT_INHERENT_FROM_PARENT.includes(affectedHooks);
|
|
228
|
-
}
|
|
229
|
-
class RspackBuiltinPlugin {
|
|
230
|
-
affectedHooks;
|
|
231
|
-
apply(compiler) {
|
|
232
|
-
let raw = this.raw(compiler);
|
|
233
|
-
raw && (raw.canInherentFromParent = canInherentFromParent(this.affectedHooks), compiler.__internal__registerBuiltinPlugin(raw));
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
function createBuiltinPlugin(name, options) {
|
|
237
|
-
return {
|
|
238
|
-
name: name,
|
|
239
|
-
options: options ?? !1
|
|
240
|
-
};
|
|
241
|
-
}
|
|
242
|
-
function create(name, resolve, affectedHooks) {
|
|
243
|
-
class Plugin extends RspackBuiltinPlugin {
|
|
244
|
-
name = name;
|
|
245
|
-
_args;
|
|
246
|
-
affectedHooks = affectedHooks;
|
|
247
|
-
constructor(...args){
|
|
248
|
-
super(), this._args = args;
|
|
249
|
-
}
|
|
250
|
-
raw(compiler) {
|
|
251
|
-
return createBuiltinPlugin(name, resolve.apply(compiler, this._args));
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
return Object.defineProperty(Plugin, "name", {
|
|
255
|
-
value: name
|
|
256
|
-
}), Plugin;
|
|
257
|
-
}
|
|
258
|
-
let INTERNAL_PLUGIN_NAMES = Object.keys(_rspack_binding__WEBPACK_IMPORTED_MODULE_0___default().BuiltinPluginName);
|
|
259
|
-
function createNativePlugin(name, resolve, affectedHooks) {
|
|
260
|
-
if (INTERNAL_PLUGIN_NAMES.includes(name)) throw Error(`Cannot register native plugin with name '${name}', it conflicts with internal plugin names.`);
|
|
261
|
-
return create(name, resolve, affectedHooks);
|
|
262
|
-
}
|
|
208
|
+
"browserslist-load-config": function(module1) {
|
|
209
|
+
module1.exports = require("../compiled/browserslist-load-config/index.js");
|
|
263
210
|
},
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
a: ()=>BuiltinLazyCompilationPlugin
|
|
267
|
-
});
|
|
268
|
-
var _rspack_binding__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("@rspack/binding"), _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./src/builtin-plugin/base.ts");
|
|
269
|
-
module = __webpack_require__.hmd(module);
|
|
270
|
-
let BuiltinLazyCompilationPlugin = (0, _base__WEBPACK_IMPORTED_MODULE_1__.vt)(_rspack_binding__WEBPACK_IMPORTED_MODULE_0__.BuiltinPluginName.LazyCompilationPlugin, (currentActiveModules, entries, imports, client, test)=>({
|
|
271
|
-
module,
|
|
272
|
-
imports,
|
|
273
|
-
entries,
|
|
274
|
-
test,
|
|
275
|
-
client,
|
|
276
|
-
currentActiveModules
|
|
277
|
-
}), "thisCompilation");
|
|
278
|
-
},
|
|
279
|
-
"browserslist-load-config": function(module) {
|
|
280
|
-
module.exports = require("../compiled/browserslist-load-config/index.js");
|
|
211
|
+
watchpack: function(module1) {
|
|
212
|
+
module1.exports = require("../compiled/watchpack/index.js");
|
|
281
213
|
},
|
|
282
|
-
|
|
283
|
-
|
|
214
|
+
"webpack-sources": function(module1) {
|
|
215
|
+
module1.exports = require("../compiled/webpack-sources/index.js");
|
|
284
216
|
},
|
|
285
|
-
"
|
|
286
|
-
|
|
217
|
+
"./moduleFederationDefaultRuntime.js": function(module1) {
|
|
218
|
+
module1.exports = require("./moduleFederationDefaultRuntime.js");
|
|
287
219
|
},
|
|
288
|
-
"
|
|
289
|
-
|
|
220
|
+
"@rspack/binding": function(module1) {
|
|
221
|
+
module1.exports = require(process.env.RSPACK_BINDING ? process.env.RSPACK_BINDING : "@rspack/binding");
|
|
290
222
|
},
|
|
291
|
-
"
|
|
292
|
-
|
|
223
|
+
"node:http": function(module1) {
|
|
224
|
+
module1.exports = require("node:http");
|
|
293
225
|
},
|
|
294
|
-
"node:
|
|
295
|
-
|
|
226
|
+
"node:https": function(module1) {
|
|
227
|
+
module1.exports = require("node:https");
|
|
296
228
|
},
|
|
297
|
-
"node:
|
|
298
|
-
|
|
229
|
+
"node:os": function(module1) {
|
|
230
|
+
module1.exports = require("node:os");
|
|
299
231
|
},
|
|
300
|
-
"node:
|
|
301
|
-
|
|
232
|
+
"node:url": function(module1) {
|
|
233
|
+
module1.exports = require("node:url");
|
|
302
234
|
},
|
|
303
|
-
"node:
|
|
304
|
-
|
|
235
|
+
"node:vm": function(module1) {
|
|
236
|
+
module1.exports = require("node:vm");
|
|
305
237
|
},
|
|
306
|
-
"node:
|
|
307
|
-
|
|
238
|
+
"node:zlib": function(module1) {
|
|
239
|
+
module1.exports = require("node:zlib");
|
|
308
240
|
},
|
|
309
|
-
|
|
310
|
-
|
|
241
|
+
process: function(module1) {
|
|
242
|
+
module1.exports = require("process");
|
|
311
243
|
},
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
tinypool: function(module) {
|
|
316
|
-
module.exports = import("../compiled/tinypool/dist/index.js").then(function(module) {
|
|
317
|
-
return module;
|
|
244
|
+
tinypool: function(module1) {
|
|
245
|
+
module1.exports = import("../compiled/tinypool/dist/index.js").then(function(module1) {
|
|
246
|
+
return module1;
|
|
318
247
|
});
|
|
319
248
|
},
|
|
320
|
-
"node:inspector": function(
|
|
321
|
-
|
|
322
|
-
return
|
|
249
|
+
"node:inspector": function(module1) {
|
|
250
|
+
module1.exports = import("node:inspector").then(function(module1) {
|
|
251
|
+
return module1;
|
|
323
252
|
});
|
|
324
253
|
}
|
|
325
254
|
}, __webpack_module_cache__ = {};
|
|
326
255
|
function __webpack_require__(moduleId) {
|
|
327
256
|
var cachedModule = __webpack_module_cache__[moduleId];
|
|
328
257
|
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
329
|
-
var
|
|
330
|
-
id: moduleId,
|
|
331
|
-
loaded: !1,
|
|
258
|
+
var module1 = __webpack_module_cache__[moduleId] = {
|
|
332
259
|
exports: {}
|
|
333
260
|
};
|
|
334
|
-
return __webpack_modules__[moduleId](
|
|
261
|
+
return __webpack_modules__[moduleId](module1, module1.exports, __webpack_require__), module1.exports;
|
|
335
262
|
}
|
|
336
|
-
__webpack_require__.n = (
|
|
337
|
-
var getter =
|
|
263
|
+
__webpack_require__.n = (module1)=>{
|
|
264
|
+
var getter = module1 && module1.__esModule ? ()=>module1.default : ()=>module1;
|
|
338
265
|
return __webpack_require__.d(getter, {
|
|
339
266
|
a: getter
|
|
340
267
|
}), getter;
|
|
@@ -343,12 +270,7 @@ __webpack_require__.n = (module)=>{
|
|
|
343
270
|
enumerable: !0,
|
|
344
271
|
get: definition[key]
|
|
345
272
|
});
|
|
346
|
-
}, __webpack_require__.
|
|
347
|
-
enumerable: !0,
|
|
348
|
-
set: ()=>{
|
|
349
|
-
throw Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);
|
|
350
|
-
}
|
|
351
|
-
}), module), __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop), __webpack_require__.r = (exports1)=>{
|
|
273
|
+
}, __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop), __webpack_require__.r = (exports1)=>{
|
|
352
274
|
'undefined' != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
353
275
|
value: 'Module'
|
|
354
276
|
}), Object.defineProperty(exports1, '__esModule', {
|
|
@@ -696,29 +618,29 @@ for(var __webpack_i__ in (()=>{
|
|
|
696
618
|
getParentModule(dependency) {
|
|
697
619
|
return this.#inner.getParentModule(dependency);
|
|
698
620
|
}
|
|
699
|
-
getIssuer(
|
|
700
|
-
return this.#inner.getIssuer(
|
|
621
|
+
getIssuer(module1) {
|
|
622
|
+
return this.#inner.getIssuer(module1);
|
|
701
623
|
}
|
|
702
|
-
getExportsInfo(
|
|
703
|
-
return ExportsInfo.__from_binding(this.#inner.getExportsInfo(
|
|
624
|
+
getExportsInfo(module1) {
|
|
625
|
+
return ExportsInfo.__from_binding(this.#inner.getExportsInfo(module1));
|
|
704
626
|
}
|
|
705
627
|
getConnection(dependency) {
|
|
706
628
|
return this.#inner.getConnection(dependency);
|
|
707
629
|
}
|
|
708
|
-
getOutgoingConnections(
|
|
709
|
-
return this.#inner.getOutgoingConnections(
|
|
630
|
+
getOutgoingConnections(module1) {
|
|
631
|
+
return this.#inner.getOutgoingConnections(module1);
|
|
710
632
|
}
|
|
711
|
-
getIncomingConnections(
|
|
712
|
-
return this.#inner.getIncomingConnections(
|
|
633
|
+
getIncomingConnections(module1) {
|
|
634
|
+
return this.#inner.getIncomingConnections(module1);
|
|
713
635
|
}
|
|
714
636
|
getParentBlockIndex(dependency) {
|
|
715
637
|
return this.#inner.getParentBlockIndex(dependency);
|
|
716
638
|
}
|
|
717
|
-
isAsync(
|
|
718
|
-
return this.#inner.isAsync(
|
|
639
|
+
isAsync(module1) {
|
|
640
|
+
return this.#inner.isAsync(module1);
|
|
719
641
|
}
|
|
720
|
-
getOutgoingConnectionsInOrder(
|
|
721
|
-
return this.#inner.getOutgoingConnectionsInOrder(
|
|
642
|
+
getOutgoingConnectionsInOrder(module1) {
|
|
643
|
+
return this.#inner.getOutgoingConnectionsInOrder(module1);
|
|
722
644
|
}
|
|
723
645
|
}
|
|
724
646
|
class RuntimeModule {
|
|
@@ -726,14 +648,14 @@ for(var __webpack_i__ in (()=>{
|
|
|
726
648
|
static STAGE_BASIC = 5;
|
|
727
649
|
static STAGE_ATTACH = 10;
|
|
728
650
|
static STAGE_TRIGGER = 20;
|
|
729
|
-
static __to_binding(
|
|
651
|
+
static __to_binding(module1) {
|
|
730
652
|
return {
|
|
731
|
-
name:
|
|
732
|
-
stage:
|
|
733
|
-
generator:
|
|
734
|
-
fullHash:
|
|
735
|
-
dependentHash:
|
|
736
|
-
isolate:
|
|
653
|
+
name: module1.name,
|
|
654
|
+
stage: module1.stage,
|
|
655
|
+
generator: module1.generate.bind(module1),
|
|
656
|
+
fullHash: module1.fullHash,
|
|
657
|
+
dependentHash: module1.dependentHash,
|
|
658
|
+
isolate: module1.shouldIsolate()
|
|
737
659
|
};
|
|
738
660
|
}
|
|
739
661
|
_name;
|
|
@@ -1400,8 +1322,8 @@ for(var __webpack_i__ in (()=>{
|
|
|
1400
1322
|
}), Object.defineProperty(binding_.ChunkGraph.prototype, "getModuleChunksIterable", {
|
|
1401
1323
|
enumerable: !0,
|
|
1402
1324
|
configurable: !0,
|
|
1403
|
-
value (
|
|
1404
|
-
return this.getModuleChunks(
|
|
1325
|
+
value (module1) {
|
|
1326
|
+
return this.getModuleChunks(module1);
|
|
1405
1327
|
}
|
|
1406
1328
|
}), Object.defineProperty(binding_.ChunkGraph.prototype, "getOrderedChunkModulesIterable", {
|
|
1407
1329
|
enumerable: !0,
|
|
@@ -1413,8 +1335,8 @@ for(var __webpack_i__ in (()=>{
|
|
|
1413
1335
|
}), Object.defineProperty(binding_.ChunkGraph.prototype, "getModuleHash", {
|
|
1414
1336
|
enumerable: !0,
|
|
1415
1337
|
configurable: !0,
|
|
1416
|
-
value (
|
|
1417
|
-
return this._getModuleHash(
|
|
1338
|
+
value (module1, runtime) {
|
|
1339
|
+
return this._getModuleHash(module1, toJsRuntimeSpec(runtime));
|
|
1418
1340
|
}
|
|
1419
1341
|
}), Object.defineProperty(binding_default().Sources.prototype, "get", {
|
|
1420
1342
|
enumerable: !0,
|
|
@@ -1866,14 +1788,14 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
1866
1788
|
err ? doneWork(Array(moduleIdentifiers.length).fill([
|
|
1867
1789
|
err,
|
|
1868
1790
|
null
|
|
1869
|
-
])) : doneWork(modules.map((
|
|
1791
|
+
])) : doneWork(modules.map((module1)=>[
|
|
1870
1792
|
null,
|
|
1871
|
-
|
|
1793
|
+
module1
|
|
1872
1794
|
]));
|
|
1873
1795
|
});
|
|
1874
1796
|
});
|
|
1875
|
-
rebuildModule(
|
|
1876
|
-
this.#rebuildModuleTask.exec(
|
|
1797
|
+
rebuildModule(module1, f) {
|
|
1798
|
+
this.#rebuildModuleTask.exec(module1.identifier(), f);
|
|
1877
1799
|
}
|
|
1878
1800
|
addRuntimeModule(chunk, runtimeModule) {
|
|
1879
1801
|
runtimeModule.attach(this, chunk, this.chunkGraph), this.#inner.addRuntimeModule(chunk, RuntimeModule.__to_binding(runtimeModule));
|
|
@@ -1953,8 +1875,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
1953
1875
|
return;
|
|
1954
1876
|
}
|
|
1955
1877
|
for(let i = 0; i < results.length; i++){
|
|
1956
|
-
let [errMsg,
|
|
1957
|
-
(0, cbs[i])(errMsg ? new WebpackError(errMsg) : null,
|
|
1878
|
+
let [errMsg, module1] = results[i];
|
|
1879
|
+
(0, cbs[i])(errMsg ? new WebpackError(errMsg) : null, module1);
|
|
1958
1880
|
}
|
|
1959
1881
|
});
|
|
1960
1882
|
};
|
|
@@ -2010,9 +1932,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
2010
1932
|
[_computedKey1]() {
|
|
2011
1933
|
return this.entries();
|
|
2012
1934
|
}
|
|
2013
|
-
|
|
2014
|
-
return "Map";
|
|
2015
|
-
}
|
|
1935
|
+
[_computedKey2] = "Map";
|
|
2016
1936
|
has(key) {
|
|
2017
1937
|
return this.#data.has(key);
|
|
2018
1938
|
}
|
|
@@ -2030,8 +1950,48 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
2030
1950
|
return this.#data.keys()[Symbol.iterator]();
|
|
2031
1951
|
}
|
|
2032
1952
|
}
|
|
2033
|
-
|
|
2034
|
-
|
|
1953
|
+
let HOOKS_CAN_NOT_INHERENT_FROM_PARENT = [
|
|
1954
|
+
"make",
|
|
1955
|
+
"compile",
|
|
1956
|
+
"emit",
|
|
1957
|
+
"afterEmit",
|
|
1958
|
+
"invalid",
|
|
1959
|
+
"done",
|
|
1960
|
+
"thisCompilation"
|
|
1961
|
+
];
|
|
1962
|
+
function canInherentFromParent(affectedHooks) {
|
|
1963
|
+
return void 0 !== affectedHooks && !HOOKS_CAN_NOT_INHERENT_FROM_PARENT.includes(affectedHooks);
|
|
1964
|
+
}
|
|
1965
|
+
class RspackBuiltinPlugin {
|
|
1966
|
+
affectedHooks;
|
|
1967
|
+
apply(compiler) {
|
|
1968
|
+
let raw = this.raw(compiler);
|
|
1969
|
+
raw && (raw.canInherentFromParent = canInherentFromParent(this.affectedHooks), compiler.__internal__registerBuiltinPlugin(raw));
|
|
1970
|
+
}
|
|
1971
|
+
}
|
|
1972
|
+
function createBuiltinPlugin(name, options) {
|
|
1973
|
+
return {
|
|
1974
|
+
name: name,
|
|
1975
|
+
options: options ?? !1
|
|
1976
|
+
};
|
|
1977
|
+
}
|
|
1978
|
+
function base_create(name, resolve, affectedHooks) {
|
|
1979
|
+
class Plugin extends RspackBuiltinPlugin {
|
|
1980
|
+
name = name;
|
|
1981
|
+
_args;
|
|
1982
|
+
affectedHooks = affectedHooks;
|
|
1983
|
+
constructor(...args){
|
|
1984
|
+
super(), this._args = args;
|
|
1985
|
+
}
|
|
1986
|
+
raw(compiler) {
|
|
1987
|
+
return createBuiltinPlugin(name, resolve.apply(compiler, this._args));
|
|
1988
|
+
}
|
|
1989
|
+
}
|
|
1990
|
+
return Object.defineProperty(Plugin, "name", {
|
|
1991
|
+
value: name
|
|
1992
|
+
}), Plugin;
|
|
1993
|
+
}
|
|
1994
|
+
let INTERNAL_PLUGIN_NAMES = Object.keys(binding_default().BuiltinPluginName), APIPlugin = base_create(binding_.BuiltinPluginName.APIPlugin, ()=>{}), ArrayPushCallbackChunkFormatPlugin = base_create(binding_.BuiltinPluginName.ArrayPushCallbackChunkFormatPlugin, ()=>{}), AssetModulesPlugin = base_create(binding_.BuiltinPluginName.AssetModulesPlugin, ()=>{}, "compilation"), AsyncWebAssemblyModulesPlugin = base_create(binding_.BuiltinPluginName.AsyncWebAssemblyModulesPlugin, ()=>{}, "compilation"), BannerPlugin = base_create(binding_.BuiltinPluginName.BannerPlugin, (args)=>"string" == typeof args || "function" == typeof args ? {
|
|
2035
1995
|
banner: args
|
|
2036
1996
|
} : {
|
|
2037
1997
|
banner: args.banner,
|
|
@@ -2042,12 +2002,12 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
2042
2002
|
stage: args.stage,
|
|
2043
2003
|
include: args.include,
|
|
2044
2004
|
exclude: args.exclude
|
|
2045
|
-
}), BundlerInfoRspackPlugin = (
|
|
2005
|
+
}), BundlerInfoRspackPlugin = base_create(binding_.BuiltinPluginName.BundlerInfoRspackPlugin, (options)=>({
|
|
2046
2006
|
version: options.version || "unknown",
|
|
2047
2007
|
bundler: options.bundler || "rspack",
|
|
2048
2008
|
force: options.force ?? !0
|
|
2049
|
-
})), ChunkPrefetchPreloadPlugin = (
|
|
2050
|
-
class CircularDependencyRspackPlugin extends
|
|
2009
|
+
})), ChunkPrefetchPreloadPlugin = base_create(binding_.BuiltinPluginName.ChunkPrefetchPreloadPlugin, ()=>{});
|
|
2010
|
+
class CircularDependencyRspackPlugin extends RspackBuiltinPlugin {
|
|
2051
2011
|
name = binding_.BuiltinPluginName.CircularDependencyRspackPlugin;
|
|
2052
2012
|
_options;
|
|
2053
2013
|
constructor(options){
|
|
@@ -2076,15 +2036,15 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
2076
2036
|
this._options.onEnd(compilation);
|
|
2077
2037
|
} : void 0
|
|
2078
2038
|
};
|
|
2079
|
-
return (
|
|
2039
|
+
return createBuiltinPlugin(this.name, rawOptions);
|
|
2080
2040
|
}
|
|
2081
2041
|
}
|
|
2082
|
-
let CommonJsChunkFormatPlugin = (
|
|
2042
|
+
let CommonJsChunkFormatPlugin = base_create(binding_.BuiltinPluginName.CommonJsChunkFormatPlugin, ()=>{}), ContextReplacementPlugin = base_create(binding_.BuiltinPluginName.ContextReplacementPlugin, (resourceRegExp, newContentResource, newContentRecursive, newContentRegExp)=>{
|
|
2083
2043
|
let rawOptions = {
|
|
2084
2044
|
resourceRegExp
|
|
2085
2045
|
};
|
|
2086
2046
|
return "function" == typeof newContentResource || ("string" == typeof newContentResource && "object" == typeof newContentRecursive ? (rawOptions.newContentResource = newContentResource, rawOptions.newContentCreateContextMap = newContentRecursive) : "string" == typeof newContentResource && "function" == typeof newContentRecursive ? rawOptions.newContentResource = newContentResource : ("string" != typeof newContentResource && (newContentRegExp = newContentRecursive, newContentRecursive = newContentResource, newContentResource = void 0), "boolean" != typeof newContentRecursive && (newContentRegExp = newContentRecursive, newContentRecursive = void 0), rawOptions.newContentResource = newContentResource, rawOptions.newContentRecursive = newContentRecursive, rawOptions.newContentRegExp = newContentRegExp)), rawOptions;
|
|
2087
|
-
}), CopyRspackPlugin = (
|
|
2047
|
+
}), CopyRspackPlugin = base_create(binding_.BuiltinPluginName.CopyRspackPlugin, (copy)=>{
|
|
2088
2048
|
let ret = {
|
|
2089
2049
|
patterns: []
|
|
2090
2050
|
};
|
|
@@ -2095,7 +2055,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
2095
2055
|
let originalTransform = pattern.transform;
|
|
2096
2056
|
return originalTransform && ("object" == typeof originalTransform ? pattern.transform = (input, absoluteFilename)=>Promise.resolve(originalTransform.transformer(input, absoluteFilename)) : pattern.transform = (input, absoluteFilename)=>Promise.resolve(originalTransform(input, absoluteFilename))), pattern;
|
|
2097
2057
|
}), ret;
|
|
2098
|
-
}), CssChunkingPlugin = (
|
|
2058
|
+
}), CssChunkingPlugin = base_create(binding_default().BuiltinPluginName.CssChunkingPlugin, function(options = {}) {
|
|
2099
2059
|
if (options.nextjs) return {
|
|
2100
2060
|
strict: options.strict,
|
|
2101
2061
|
minSize: options.minSize,
|
|
@@ -2110,7 +2070,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
2110
2070
|
cssIndex && splitChunks.defaultSizeTypes.splice(cssIndex, 1);
|
|
2111
2071
|
}
|
|
2112
2072
|
return options;
|
|
2113
|
-
}), CssModulesPlugin = (
|
|
2073
|
+
}), CssModulesPlugin = base_create(binding_.BuiltinPluginName.CssModulesPlugin, ()=>{}, "compilation"), external_node_path_namespaceObject = require("node:path");
|
|
2114
2074
|
var external_node_path_default = __webpack_require__.n(external_node_path_namespaceObject);
|
|
2115
2075
|
let DEFAULT_FILENAME = "[name].css", LOADER_PATH = (0, external_node_path_namespaceObject.join)(__dirname, "cssExtractLoader.js");
|
|
2116
2076
|
class CssExtractRspackPlugin {
|
|
@@ -2152,7 +2112,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
2152
2112
|
};
|
|
2153
2113
|
}
|
|
2154
2114
|
}
|
|
2155
|
-
let DataUriPlugin = (
|
|
2115
|
+
let DataUriPlugin = base_create(binding_.BuiltinPluginName.DataUriPlugin, ()=>{}, "compilation"), DefinePlugin = base_create(binding_.BuiltinPluginName.DefinePlugin, function(define) {
|
|
2156
2116
|
return normalizeValue(define, this.options.output.environment?.bigIntLiteral ?? !1);
|
|
2157
2117
|
}, "compilation"), normalizeValue = (define, supportsBigIntLiteral)=>{
|
|
2158
2118
|
let normalizePrimitive = (p)=>void 0 === p ? "undefined" : Object.is(p, -0) ? "-0" : p instanceof RegExp ? p.toString() : "function" == typeof p ? `(${p.toString()})` : "bigint" == typeof p ? supportsBigIntLiteral ? `${p}n` : `BigInt("${p}")` : p, normalizeObject = (define)=>Array.isArray(define) ? define.map(normalizeObject) : define instanceof RegExp ? normalizePrimitive(define) : define && "object" == typeof define ? Object.fromEntries(Object.keys(define).map((k)=>[
|
|
@@ -2161,25 +2121,25 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
2161
2121
|
])) : normalizePrimitive(define);
|
|
2162
2122
|
return normalizeObject(define);
|
|
2163
2123
|
};
|
|
2164
|
-
class DeterministicChunkIdsPlugin extends
|
|
2124
|
+
class DeterministicChunkIdsPlugin extends RspackBuiltinPlugin {
|
|
2165
2125
|
name = binding_.BuiltinPluginName.DeterministicChunkIdsPlugin;
|
|
2166
2126
|
affectedHooks = "compilation";
|
|
2167
2127
|
raw() {
|
|
2168
|
-
return (
|
|
2128
|
+
return createBuiltinPlugin(this.name, void 0);
|
|
2169
2129
|
}
|
|
2170
2130
|
}
|
|
2171
|
-
class DeterministicModuleIdsPlugin extends
|
|
2131
|
+
class DeterministicModuleIdsPlugin extends RspackBuiltinPlugin {
|
|
2172
2132
|
name = binding_.BuiltinPluginName.DeterministicModuleIdsPlugin;
|
|
2173
2133
|
affectedHooks = "compilation";
|
|
2174
2134
|
raw() {
|
|
2175
|
-
return (
|
|
2135
|
+
return createBuiltinPlugin(this.name, void 0);
|
|
2176
2136
|
}
|
|
2177
2137
|
}
|
|
2178
|
-
let DllEntryPlugin = (
|
|
2138
|
+
let DllEntryPlugin = base_create(binding_.BuiltinPluginName.DllEntryPlugin, (context, entries, options)=>({
|
|
2179
2139
|
context,
|
|
2180
2140
|
entries,
|
|
2181
2141
|
name: options.name
|
|
2182
|
-
})), DllReferenceAgencyPlugin = (
|
|
2142
|
+
})), DllReferenceAgencyPlugin = base_create(binding_.BuiltinPluginName.DllReferenceAgencyPlugin, (options)=>options), external_node_assert_namespaceObject = require("node:assert");
|
|
2183
2143
|
var external_node_assert_default = __webpack_require__.n(external_node_assert_namespaceObject);
|
|
2184
2144
|
class EntryOptionPlugin {
|
|
2185
2145
|
apply(compiler) {
|
|
@@ -2207,7 +2167,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
2207
2167
|
};
|
|
2208
2168
|
}
|
|
2209
2169
|
}
|
|
2210
|
-
let lib_EntryOptionPlugin = EntryOptionPlugin, EntryPlugin = (
|
|
2170
|
+
let lib_EntryOptionPlugin = EntryOptionPlugin, EntryPlugin = base_create(binding_.BuiltinPluginName.EntryPlugin, (context, entry, options = "")=>({
|
|
2211
2171
|
context,
|
|
2212
2172
|
entry,
|
|
2213
2173
|
options: getRawEntryOptions("string" == typeof options ? {
|
|
@@ -2230,7 +2190,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
2230
2190
|
};
|
|
2231
2191
|
}
|
|
2232
2192
|
EntryPlugin.createDependency = (request)=>new binding_.EntryDependency(request);
|
|
2233
|
-
class DynamicEntryPlugin extends
|
|
2193
|
+
class DynamicEntryPlugin extends RspackBuiltinPlugin {
|
|
2234
2194
|
context;
|
|
2235
2195
|
entry;
|
|
2236
2196
|
name = binding_.BuiltinPluginName.DynamicEntryPlugin;
|
|
@@ -2249,10 +2209,10 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
2249
2209
|
};
|
|
2250
2210
|
})
|
|
2251
2211
|
};
|
|
2252
|
-
return (
|
|
2212
|
+
return createBuiltinPlugin(this.name, raw);
|
|
2253
2213
|
}
|
|
2254
2214
|
}
|
|
2255
|
-
let ElectronTargetPlugin = (
|
|
2215
|
+
let ElectronTargetPlugin = base_create(binding_.BuiltinPluginName.ElectronTargetPlugin, (context)=>context ?? "none"), EnableChunkLoadingPluginInner = base_create(binding_.BuiltinPluginName.EnableChunkLoadingPlugin, (type)=>type), enabledTypes = new WeakMap(), getEnabledTypes = (compiler)=>{
|
|
2256
2216
|
let set = enabledTypes.get(compiler);
|
|
2257
2217
|
return void 0 === set && (set = new Set(), enabledTypes.set(compiler, set)), set;
|
|
2258
2218
|
};
|
|
@@ -2282,7 +2242,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
2282
2242
|
let set = EnableLibraryPlugin_enabledTypes.get(compiler);
|
|
2283
2243
|
return void 0 === set && (set = new Set(), EnableLibraryPlugin_enabledTypes.set(compiler, set)), set;
|
|
2284
2244
|
};
|
|
2285
|
-
class EnableLibraryPlugin extends
|
|
2245
|
+
class EnableLibraryPlugin extends RspackBuiltinPlugin {
|
|
2286
2246
|
type;
|
|
2287
2247
|
name = binding_.BuiltinPluginName.EnableLibraryPlugin;
|
|
2288
2248
|
constructor(type){
|
|
@@ -2296,10 +2256,10 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
2296
2256
|
}
|
|
2297
2257
|
raw(compiler) {
|
|
2298
2258
|
let type = this.type, enabled = EnableLibraryPlugin_getEnabledTypes(compiler);
|
|
2299
|
-
if (!enabled.has(type)) return enabled.add(type), (
|
|
2259
|
+
if (!enabled.has(type)) return enabled.add(type), createBuiltinPlugin(this.name, type);
|
|
2300
2260
|
}
|
|
2301
2261
|
}
|
|
2302
|
-
let EnableWasmLoadingPlugin = (
|
|
2262
|
+
let EnableWasmLoadingPlugin = base_create(binding_.BuiltinPluginName.EnableWasmLoadingPlugin, (type)=>type), EnsureChunkConditionsPlugin = base_create(binding_.BuiltinPluginName.EnsureChunkConditionsPlugin, ()=>{}), RemoveDuplicateModulesPlugin = base_create(binding_.BuiltinPluginName.RemoveDuplicateModulesPlugin, ()=>({}));
|
|
2303
2263
|
class EsmLibraryPlugin {
|
|
2304
2264
|
static PLUGIN_NAME = "EsmLibraryPlugin";
|
|
2305
2265
|
apply(compiler) {
|
|
@@ -2314,7 +2274,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
2314
2274
|
});
|
|
2315
2275
|
}
|
|
2316
2276
|
}
|
|
2317
|
-
let EvalDevToolModulePlugin = (
|
|
2277
|
+
let EvalDevToolModulePlugin = base_create(binding_.BuiltinPluginName.EvalDevToolModulePlugin, (options)=>options, "compilation"), EvalSourceMapDevToolPlugin = base_create(binding_.BuiltinPluginName.EvalSourceMapDevToolPlugin, (options)=>options, "compilation");
|
|
2318
2278
|
function isNil(value) {
|
|
2319
2279
|
return null == value;
|
|
2320
2280
|
}
|
|
@@ -2993,7 +2953,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
2993
2953
|
});
|
|
2994
2954
|
}));
|
|
2995
2955
|
}), mainPort.on("messageerror", handleError), mainSyncPort.on("message", async (message)=>{
|
|
2996
|
-
let result, sharedBufferView = new Int32Array(
|
|
2956
|
+
let result, { sharedBuffer } = message, sharedBufferView = new Int32Array(sharedBuffer);
|
|
2997
2957
|
try {
|
|
2998
2958
|
if ("WaitForPendingRequest" === message.requestType) {
|
|
2999
2959
|
let pendingRequestId = message.data[0], isArray = Array.isArray(pendingRequestId), ids = isArray ? pendingRequestId : [
|
|
@@ -3052,26 +3012,26 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
3052
3012
|
};
|
|
3053
3013
|
function loadLoader(loader, compiler, callback) {
|
|
3054
3014
|
if ("module" === loader.type) try {
|
|
3055
|
-
void 0 === loadLoader_url && (loadLoader_url = __webpack_require__("node:url")), import(loadLoader_url.pathToFileURL(loader.path).toString()).then((
|
|
3056
|
-
handleResult(loader,
|
|
3015
|
+
void 0 === loadLoader_url && (loadLoader_url = __webpack_require__("node:url")), import(loadLoader_url.pathToFileURL(loader.path).toString()).then((module1)=>{
|
|
3016
|
+
handleResult(loader, module1, callback);
|
|
3057
3017
|
}, callback);
|
|
3058
3018
|
return;
|
|
3059
3019
|
} catch (e) {
|
|
3060
3020
|
callback(e);
|
|
3061
3021
|
}
|
|
3062
3022
|
else {
|
|
3063
|
-
let
|
|
3023
|
+
let module1;
|
|
3064
3024
|
try {
|
|
3065
|
-
|
|
3025
|
+
module1 = require(loader.path);
|
|
3066
3026
|
} catch (e) {
|
|
3067
3027
|
if (e instanceof Error && "EMFILE" === e.code) return void setImmediate(loadLoader.bind(null, loader, compiler, callback));
|
|
3068
3028
|
return callback(e);
|
|
3069
3029
|
}
|
|
3070
|
-
return handleResult(loader,
|
|
3030
|
+
return handleResult(loader, module1, callback);
|
|
3071
3031
|
}
|
|
3072
3032
|
}
|
|
3073
|
-
function handleResult(loader,
|
|
3074
|
-
return "function" != typeof
|
|
3033
|
+
function handleResult(loader, module1, callback) {
|
|
3034
|
+
return "function" != typeof module1 && "object" != typeof module1 ? callback(new LoaderLoadingError(`Module '${loader.path}' is not a loader (export function or es6 module)`)) : (loader.normal = "function" == typeof module1 ? module1 : module1.default, loader.pitch = module1.pitch, loader.raw = module1.raw, loader.pitch || (loader.noPitch = !0), "function" != typeof loader.normal && "function" != typeof loader.pitch) ? callback(new LoaderLoadingError(`Module '${loader.path}' is not a loader (must have normal or pitch function)`)) : void callback();
|
|
3075
3035
|
}
|
|
3076
3036
|
let decoder = new TextDecoder(), utils_loadLoader = (0, external_node_util_namespaceObject.promisify)(loadLoader), utils_runSyncOrAsync = (0, external_node_util_namespaceObject.promisify)(function(fn, context, args, callback) {
|
|
3077
3037
|
let isSync = !0, isDone = !1, isError = !1, reportedError = !1;
|
|
@@ -3848,7 +3808,8 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
3848
3808
|
resolve: rule.resolve ? getRawResolve(rule.resolve) : void 0,
|
|
3849
3809
|
oneOf: rule.oneOf ? rule.oneOf.filter(Boolean).map((rule, index)=>getRawModuleRule(rule, `${path}.oneOf[${index}]`, options, rule.type ?? upperType)) : void 0,
|
|
3850
3810
|
rules: rule.rules ? rule.rules.filter(Boolean).map((rule, index)=>getRawModuleRule(rule, `${path}.rules[${index}]`, options, rule.type ?? upperType)) : void 0,
|
|
3851
|
-
enforce: rule.enforce
|
|
3811
|
+
enforce: rule.enforce,
|
|
3812
|
+
extractSourceMap: rule.extractSourceMap
|
|
3852
3813
|
};
|
|
3853
3814
|
return ("function" == typeof rule.test || "function" == typeof rule.resource || "function" == typeof rule.resourceQuery || "function" == typeof rule.resourceFragment) && (delete rawModuleRule.test, delete rawModuleRule.resource, delete rawModuleRule.resourceQuery, delete rawModuleRule.resourceFragment, rawModuleRule.rspackResource = getRawRuleSetCondition((resourceQueryFragment)=>{
|
|
3854
3815
|
let { path, query, fragment } = parseResource(resourceQueryFragment);
|
|
@@ -4062,7 +4023,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
4062
4023
|
esModule: options.esModule
|
|
4063
4024
|
};
|
|
4064
4025
|
}
|
|
4065
|
-
class ExternalsPlugin extends
|
|
4026
|
+
class ExternalsPlugin extends RspackBuiltinPlugin {
|
|
4066
4027
|
type;
|
|
4067
4028
|
externals;
|
|
4068
4029
|
placeInInitial;
|
|
@@ -4079,7 +4040,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
4079
4040
|
]).filter(Boolean).map((item)=>this.#getRawExternalItem(item)),
|
|
4080
4041
|
placeInInitial: this.placeInInitial ?? !1
|
|
4081
4042
|
};
|
|
4082
|
-
return (
|
|
4043
|
+
return createBuiltinPlugin(this.name, raw);
|
|
4083
4044
|
}
|
|
4084
4045
|
#processResolveResult = (text)=>{
|
|
4085
4046
|
if (!text) return;
|
|
@@ -4156,8 +4117,8 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
4156
4117
|
]
|
|
4157
4118
|
])) : value;
|
|
4158
4119
|
}
|
|
4159
|
-
let FetchCompileAsyncWasmPlugin = (
|
|
4160
|
-
class FlagDependencyUsagePlugin extends
|
|
4120
|
+
let FetchCompileAsyncWasmPlugin = base_create(binding_.BuiltinPluginName.FetchCompileAsyncWasmPlugin, ()=>{}, "thisCompilation"), FileUriPlugin = base_create(binding_.BuiltinPluginName.FileUriPlugin, ()=>{}, "compilation"), FlagDependencyExportsPlugin = base_create(binding_.BuiltinPluginName.FlagDependencyExportsPlugin, ()=>{}, "compilation");
|
|
4121
|
+
class FlagDependencyUsagePlugin extends RspackBuiltinPlugin {
|
|
4161
4122
|
global;
|
|
4162
4123
|
name = binding_.BuiltinPluginName.FlagDependencyUsagePlugin;
|
|
4163
4124
|
affectedHooks = "compilation";
|
|
@@ -4165,16 +4126,16 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
4165
4126
|
super(), this.global = global;
|
|
4166
4127
|
}
|
|
4167
4128
|
raw() {
|
|
4168
|
-
return (
|
|
4129
|
+
return createBuiltinPlugin(this.name, this.global);
|
|
4169
4130
|
}
|
|
4170
4131
|
}
|
|
4171
|
-
class HotModuleReplacementPlugin extends
|
|
4132
|
+
class HotModuleReplacementPlugin extends RspackBuiltinPlugin {
|
|
4172
4133
|
name = binding_.BuiltinPluginName.HotModuleReplacementPlugin;
|
|
4173
4134
|
raw(compiler) {
|
|
4174
|
-
return void 0 === compiler.options.output.strictModuleErrorHandling && (compiler.options.output.strictModuleErrorHandling = !0), (
|
|
4135
|
+
return void 0 === compiler.options.output.strictModuleErrorHandling && (compiler.options.output.strictModuleErrorHandling = !0), createBuiltinPlugin(this.name, void 0);
|
|
4175
4136
|
}
|
|
4176
4137
|
}
|
|
4177
|
-
let HttpExternalsRspackPlugin = (
|
|
4138
|
+
let HttpExternalsRspackPlugin = base_create(binding_.BuiltinPluginName.HttpExternalsRspackPlugin, (css, webAsync)=>({
|
|
4178
4139
|
css,
|
|
4179
4140
|
webAsync
|
|
4180
4141
|
})), getHttp = memoize(()=>__webpack_require__("node:http")), getHttps = memoize(()=>__webpack_require__("node:https")), defaultHttpClientForNode = async (url, headers)=>{
|
|
@@ -4206,7 +4167,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
4206
4167
|
body: Buffer.from(body)
|
|
4207
4168
|
};
|
|
4208
4169
|
};
|
|
4209
|
-
class HttpUriPlugin extends
|
|
4170
|
+
class HttpUriPlugin extends RspackBuiltinPlugin {
|
|
4210
4171
|
options;
|
|
4211
4172
|
name = binding_.BuiltinPluginName.HttpUriPlugin;
|
|
4212
4173
|
affectedHooks = "compilation";
|
|
@@ -4221,7 +4182,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
4221
4182
|
upgrade: options.upgrade ?? !1,
|
|
4222
4183
|
httpClient: options.httpClient ?? defaultHttpClientForNode
|
|
4223
4184
|
};
|
|
4224
|
-
return (
|
|
4185
|
+
return createBuiltinPlugin(this.name, raw);
|
|
4225
4186
|
}
|
|
4226
4187
|
}
|
|
4227
4188
|
function $constructor(name, initializer, params) {
|
|
@@ -7146,7 +7107,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7146
7107
|
}
|
|
7147
7108
|
let compilationOptionsMap = new WeakMap(), external_node_fs_namespaceObject = require("node:fs");
|
|
7148
7109
|
var external_node_fs_default = __webpack_require__.n(external_node_fs_namespaceObject);
|
|
7149
|
-
let hooks_compilationHooksMap = new WeakMap(), HTML_PLUGIN_UID = 0, HtmlRspackPluginImpl = (
|
|
7110
|
+
let hooks_compilationHooksMap = new WeakMap(), HTML_PLUGIN_UID = 0, HtmlRspackPluginImpl = base_create(binding_.BuiltinPluginName.HtmlRspackPlugin, function(c = {}) {
|
|
7150
7111
|
let templateFn, templateParameters, filenames;
|
|
7151
7112
|
validate(c, getHtmlPluginOptionsSchema);
|
|
7152
7113
|
let uid = HTML_PLUGIN_UID++, meta = {};
|
|
@@ -7296,12 +7257,12 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7296
7257
|
])
|
|
7297
7258
|
}, hooks_compilationHooksMap.set(compilation, hooks)), hooks;
|
|
7298
7259
|
}, HtmlRspackPlugin.version = 5;
|
|
7299
|
-
let IgnorePlugin = (
|
|
7300
|
-
class JavascriptModulesPlugin extends
|
|
7260
|
+
let IgnorePlugin = base_create(binding_.BuiltinPluginName.IgnorePlugin, (options)=>(validate(options, getIgnorePluginOptionsSchema), options)), InferAsyncModulesPlugin = base_create(binding_.BuiltinPluginName.InferAsyncModulesPlugin, ()=>{}, "compilation"), JavascriptModulesPlugin_compilationHooksMap = new WeakMap();
|
|
7261
|
+
class JavascriptModulesPlugin extends RspackBuiltinPlugin {
|
|
7301
7262
|
name = binding_.BuiltinPluginName.JavascriptModulesPlugin;
|
|
7302
7263
|
affectedHooks = "compilation";
|
|
7303
7264
|
raw() {
|
|
7304
|
-
return (
|
|
7265
|
+
return createBuiltinPlugin(this.name, void 0);
|
|
7305
7266
|
}
|
|
7306
7267
|
static getCompilationHooks(compilation) {
|
|
7307
7268
|
checkCompilation(compilation);
|
|
@@ -7314,7 +7275,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7314
7275
|
}, JavascriptModulesPlugin_compilationHooksMap.set(compilation, hooks)), hooks;
|
|
7315
7276
|
}
|
|
7316
7277
|
}
|
|
7317
|
-
let JsLoaderRspackPlugin = (
|
|
7278
|
+
let JsLoaderRspackPlugin = base_create(binding_.BuiltinPluginName.JsLoaderRspackPlugin, (compiler)=>runLoaders.bind(null, compiler), "thisCompilation"), JsonModulesPlugin = base_create(binding_.BuiltinPluginName.JsonModulesPlugin, ()=>{}, "compilation"), LibManifestPlugin = base_create(binding_.BuiltinPluginName.LibManifestPlugin, (options)=>{
|
|
7318
7279
|
let { context, entryOnly, format, name, path, type } = options;
|
|
7319
7280
|
return {
|
|
7320
7281
|
context,
|
|
@@ -7324,7 +7285,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7324
7285
|
path,
|
|
7325
7286
|
type
|
|
7326
7287
|
};
|
|
7327
|
-
}), LightningCssMinimizerRspackPlugin = (
|
|
7288
|
+
}), LightningCssMinimizerRspackPlugin = base_create(binding_.BuiltinPluginName.LightningCssMinimizerRspackPlugin, (options)=>{
|
|
7328
7289
|
let { include, exclude, draft, nonStandard, pseudoClasses, drafts } = options?.minimizerOptions ?? {}, targets = options?.minimizerOptions?.targets ?? "fully supports es6";
|
|
7329
7290
|
return {
|
|
7330
7291
|
test: options?.test,
|
|
@@ -7351,14 +7312,19 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7351
7312
|
pseudoClasses
|
|
7352
7313
|
}
|
|
7353
7314
|
};
|
|
7354
|
-
}), LimitChunkCountPlugin = (
|
|
7355
|
-
|
|
7356
|
-
|
|
7315
|
+
}), LimitChunkCountPlugin = base_create(binding_.BuiltinPluginName.LimitChunkCountPlugin, (options)=>options), BuiltinLazyCompilationPlugin = base_create(binding_.BuiltinPluginName.LazyCompilationPlugin, (currentActiveModules, entries, imports, client, test)=>({
|
|
7316
|
+
module,
|
|
7317
|
+
imports,
|
|
7318
|
+
entries,
|
|
7319
|
+
test,
|
|
7320
|
+
client,
|
|
7321
|
+
currentActiveModules
|
|
7322
|
+
}), "thisCompilation"), LAZY_COMPILATION_PREFIX = "/lazy-compilation-using-", noop = (_req, _res, next)=>{
|
|
7357
7323
|
"function" == typeof next && next();
|
|
7358
7324
|
}, DEPRECATED_LAZY_COMPILATION_OPTIONS_WARN = "The `experiments.lazyCompilation` option is deprecated, please use the configuration top level `lazyCompilation` instead.", REPEAT_LAZY_COMPILATION_OPTIONS_WARN = "Both top-level `lazyCompilation` and `experiments.lazyCompilation` options are set. The top-level `lazyCompilation` configuration will take precedence.";
|
|
7359
7325
|
function applyPlugin(compiler, options, activeModules) {
|
|
7360
7326
|
let compiler1;
|
|
7361
|
-
new
|
|
7327
|
+
new BuiltinLazyCompilationPlugin(()=>{
|
|
7362
7328
|
let res = new Set(activeModules);
|
|
7363
7329
|
return activeModules.clear(), res;
|
|
7364
7330
|
}, options.entries ?? !0, options.imports ?? !0, `${options.client || (compiler1 = compiler, require.resolve(`../hot/lazy-compilation-${compiler1.options.externalsPresets.node ? "node" : "web"}.js`))}?${encodeURIComponent((({ serverUrl, prefix })=>{
|
|
@@ -7380,7 +7346,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7380
7346
|
moduleActivated.length && compiler.watching && compiler.watching.invalidate();
|
|
7381
7347
|
};
|
|
7382
7348
|
};
|
|
7383
|
-
class MangleExportsPlugin extends
|
|
7349
|
+
class MangleExportsPlugin extends RspackBuiltinPlugin {
|
|
7384
7350
|
deterministic;
|
|
7385
7351
|
name = binding_.BuiltinPluginName.MangleExportsPlugin;
|
|
7386
7352
|
affectedHooks = "compilation";
|
|
@@ -7388,47 +7354,47 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7388
7354
|
super(), this.deterministic = deterministic;
|
|
7389
7355
|
}
|
|
7390
7356
|
raw() {
|
|
7391
|
-
return (
|
|
7357
|
+
return createBuiltinPlugin(this.name, this.deterministic);
|
|
7392
7358
|
}
|
|
7393
7359
|
}
|
|
7394
|
-
let MergeDuplicateChunksPlugin = (
|
|
7395
|
-
class ModuleConcatenationPlugin extends
|
|
7360
|
+
let MergeDuplicateChunksPlugin = base_create(binding_.BuiltinPluginName.MergeDuplicateChunksPlugin, ()=>{}), ModuleChunkFormatPlugin = base_create(binding_.BuiltinPluginName.ModuleChunkFormatPlugin, ()=>{});
|
|
7361
|
+
class ModuleConcatenationPlugin extends RspackBuiltinPlugin {
|
|
7396
7362
|
name = binding_.BuiltinPluginName.ModuleConcatenationPlugin;
|
|
7397
7363
|
affectedHooks = "compilation";
|
|
7398
7364
|
raw() {
|
|
7399
|
-
return (
|
|
7365
|
+
return createBuiltinPlugin(this.name, void 0);
|
|
7400
7366
|
}
|
|
7401
7367
|
}
|
|
7402
|
-
let ModuleInfoHeaderPlugin = (
|
|
7403
|
-
class NaturalChunkIdsPlugin extends
|
|
7368
|
+
let ModuleInfoHeaderPlugin = base_create(binding_.BuiltinPluginName.ModuleInfoHeaderPlugin, (verbose)=>verbose, "compilation"), NamedChunkIdsPlugin = base_create(binding_.BuiltinPluginName.NamedChunkIdsPlugin, ()=>{}, "compilation"), NamedModuleIdsPlugin = base_create(binding_.BuiltinPluginName.NamedModuleIdsPlugin, ()=>{}, "compilation");
|
|
7369
|
+
class NaturalChunkIdsPlugin extends RspackBuiltinPlugin {
|
|
7404
7370
|
name = binding_.BuiltinPluginName.NaturalChunkIdsPlugin;
|
|
7405
7371
|
affectedHooks = "compilation";
|
|
7406
7372
|
raw() {
|
|
7407
|
-
return (
|
|
7373
|
+
return createBuiltinPlugin(this.name, void 0);
|
|
7408
7374
|
}
|
|
7409
7375
|
}
|
|
7410
|
-
class NaturalModuleIdsPlugin extends
|
|
7376
|
+
class NaturalModuleIdsPlugin extends RspackBuiltinPlugin {
|
|
7411
7377
|
name = binding_.BuiltinPluginName.NaturalModuleIdsPlugin;
|
|
7412
7378
|
affectedHooks = "compilation";
|
|
7413
7379
|
raw() {
|
|
7414
|
-
return (
|
|
7380
|
+
return createBuiltinPlugin(this.name, void 0);
|
|
7415
7381
|
}
|
|
7416
7382
|
}
|
|
7417
|
-
let NodeTargetPlugin = (
|
|
7383
|
+
let NodeTargetPlugin = base_create(binding_.BuiltinPluginName.NodeTargetPlugin, ()=>void 0), NoEmitOnErrorsPlugin = base_create(binding_.BuiltinPluginName.NoEmitOnErrorsPlugin, ()=>void 0), NormalModuleReplacementPlugin = base_create(binding_.BuiltinPluginName.NormalModuleReplacementPlugin, (resourceRegExp, newResource)=>({
|
|
7418
7384
|
resourceRegExp,
|
|
7419
7385
|
newResource: "function" == typeof newResource ? (data)=>(newResource(data), data) : newResource
|
|
7420
|
-
})), OccurrenceChunkIdsPlugin = (
|
|
7386
|
+
})), OccurrenceChunkIdsPlugin = base_create(binding_.BuiltinPluginName.OccurrenceChunkIdsPlugin, (options)=>({
|
|
7421
7387
|
...options
|
|
7422
|
-
}), "compilation"), ProgressPlugin = (
|
|
7388
|
+
}), "compilation"), ProgressPlugin = base_create(binding_.BuiltinPluginName.ProgressPlugin, (progress = {})=>"function" == typeof progress ? {
|
|
7423
7389
|
handler: (percentage, msg, items)=>{
|
|
7424
7390
|
progress(percentage, msg, ...items);
|
|
7425
7391
|
}
|
|
7426
|
-
} : progress), ProvidePlugin = (
|
|
7392
|
+
} : progress), ProvidePlugin = base_create(binding_.BuiltinPluginName.ProvidePlugin, (provide)=>Object.fromEntries(Object.entries(provide).map(([key, value])=>("string" == typeof value && (value = [
|
|
7427
7393
|
value
|
|
7428
7394
|
]), [
|
|
7429
7395
|
key,
|
|
7430
7396
|
value
|
|
7431
|
-
]))), "compilation"), RealContentHashPlugin = (
|
|
7397
|
+
]))), "compilation"), RealContentHashPlugin = base_create(binding_.BuiltinPluginName.RealContentHashPlugin, ()=>{}, "compilation"), RemoveEmptyChunksPlugin = base_create(binding_.BuiltinPluginName.RemoveEmptyChunksPlugin, ()=>{}, "compilation"), RsdoctorPluginImpl = base_create(binding_.BuiltinPluginName.RsdoctorPlugin, function(c = {
|
|
7432
7398
|
moduleGraphFeatures: !0,
|
|
7433
7399
|
chunkGraphFeatures: !0
|
|
7434
7400
|
}) {
|
|
@@ -7459,7 +7425,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7459
7425
|
])
|
|
7460
7426
|
}, RsdoctorPlugin_compilationHooksMap.set(compilation, hooks)), hooks;
|
|
7461
7427
|
};
|
|
7462
|
-
let RslibPlugin = (
|
|
7428
|
+
let RslibPlugin = base_create(binding_.BuiltinPluginName.RslibPlugin, (rslib)=>rslib), RstestPlugin = base_create(binding_.BuiltinPluginName.RstestPlugin, (rstest)=>rstest), RuntimeChunkPlugin = base_create(binding_.BuiltinPluginName.RuntimeChunkPlugin, (options)=>options, "thisCompilation"), RuntimePlugin = base_create(binding_default().BuiltinPluginName.RuntimePlugin, ()=>{}, "compilation"), RuntimePlugin_compilationHooksMap = new WeakMap();
|
|
7463
7429
|
RuntimePlugin.getHooks = RuntimePlugin.getCompilationHooks = (compilation)=>{
|
|
7464
7430
|
checkCompilation(compilation);
|
|
7465
7431
|
let hooks = RuntimePlugin_compilationHooksMap.get(compilation);
|
|
@@ -7478,13 +7444,13 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7478
7444
|
])
|
|
7479
7445
|
}, RuntimePlugin_compilationHooksMap.set(compilation, hooks)), hooks;
|
|
7480
7446
|
};
|
|
7481
|
-
let SideEffectsFlagPlugin = (
|
|
7447
|
+
let SideEffectsFlagPlugin = base_create(binding_.BuiltinPluginName.SideEffectsFlagPlugin, ()=>{}, "compilation"), SizeLimitsPlugin = base_create(binding_.BuiltinPluginName.SizeLimitsPlugin, (options)=>{
|
|
7482
7448
|
let hints = !1 === options.hints ? void 0 : options.hints;
|
|
7483
7449
|
return {
|
|
7484
7450
|
...options,
|
|
7485
7451
|
hints
|
|
7486
7452
|
};
|
|
7487
|
-
}), SourceMapDevToolPlugin = (
|
|
7453
|
+
}), SourceMapDevToolPlugin = base_create(binding_.BuiltinPluginName.SourceMapDevToolPlugin, (options)=>options, "compilation");
|
|
7488
7454
|
class JsSplitChunkSizes {
|
|
7489
7455
|
static __to_binding(sizes) {
|
|
7490
7456
|
return "number" == typeof sizes ? sizes : sizes && "object" == typeof sizes ? {
|
|
@@ -7492,7 +7458,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7492
7458
|
} : sizes;
|
|
7493
7459
|
}
|
|
7494
7460
|
}
|
|
7495
|
-
class SplitChunksPlugin extends
|
|
7461
|
+
class SplitChunksPlugin extends RspackBuiltinPlugin {
|
|
7496
7462
|
options;
|
|
7497
7463
|
name = binding_.BuiltinPluginName.SplitChunksPlugin;
|
|
7498
7464
|
affectedHooks = "thisCompilation";
|
|
@@ -7550,10 +7516,10 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7550
7516
|
...passThrough
|
|
7551
7517
|
};
|
|
7552
7518
|
}(this.options, compiler);
|
|
7553
|
-
return external_node_assert_default()(void 0 !== rawOptions), (
|
|
7519
|
+
return external_node_assert_default()(void 0 !== rawOptions), createBuiltinPlugin(this.name, rawOptions);
|
|
7554
7520
|
}
|
|
7555
7521
|
}
|
|
7556
|
-
let SubresourceIntegrityPlugin_PLUGIN_NAME = "SubresourceIntegrityPlugin", NATIVE_HTML_PLUGIN = "HtmlRspackPlugin", NativeSubresourceIntegrityPlugin = (
|
|
7522
|
+
let SubresourceIntegrityPlugin_PLUGIN_NAME = "SubresourceIntegrityPlugin", NATIVE_HTML_PLUGIN = "HtmlRspackPlugin", NativeSubresourceIntegrityPlugin = base_create(binding_.BuiltinPluginName.SubresourceIntegrityPlugin, function(options) {
|
|
7557
7523
|
let htmlPlugin = "Disabled";
|
|
7558
7524
|
return options.htmlPlugin === NATIVE_HTML_PLUGIN ? htmlPlugin = "Native" : "string" == typeof options.htmlPlugin && (htmlPlugin = "JavaScript"), {
|
|
7559
7525
|
hashFuncNames: options.hashFuncNames,
|
|
@@ -7679,7 +7645,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7679
7645
|
function normalizePath(path) {
|
|
7680
7646
|
return path.replace(/\?.*$/, "").split(external_node_path_namespaceObject.sep).join("/");
|
|
7681
7647
|
}
|
|
7682
|
-
let SwcJsMinimizerRspackPlugin = (
|
|
7648
|
+
let SwcJsMinimizerRspackPlugin = base_create(binding_.BuiltinPluginName.SwcJsMinimizerRspackPlugin, (options)=>{
|
|
7683
7649
|
let compress = options?.minimizerOptions?.compress ?? !0, mangle = options?.minimizerOptions?.mangle ?? !0, ecma = options?.minimizerOptions?.ecma ?? 5, format = {
|
|
7684
7650
|
comments: !1,
|
|
7685
7651
|
...options?.minimizerOptions?.format
|
|
@@ -7726,24 +7692,24 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7726
7692
|
module: options?.minimizerOptions?.module
|
|
7727
7693
|
}
|
|
7728
7694
|
};
|
|
7729
|
-
}, "compilation"), URLPlugin = (
|
|
7730
|
-
class WebWorkerTemplatePlugin extends
|
|
7695
|
+
}, "compilation"), URLPlugin = base_create(binding_.BuiltinPluginName.URLPlugin, ()=>{}, "compilation"), WarnCaseSensitiveModulesPlugin = base_create(binding_.BuiltinPluginName.WarnCaseSensitiveModulesPlugin, ()=>{}, "compilation");
|
|
7696
|
+
class WebWorkerTemplatePlugin extends RspackBuiltinPlugin {
|
|
7731
7697
|
name = binding_.BuiltinPluginName.WebWorkerTemplatePlugin;
|
|
7732
7698
|
raw(compiler) {
|
|
7733
|
-
return compiler.options.output.chunkLoading = "import-scripts", (
|
|
7699
|
+
return compiler.options.output.chunkLoading = "import-scripts", createBuiltinPlugin(this.name, void 0);
|
|
7734
7700
|
}
|
|
7735
7701
|
}
|
|
7736
|
-
class WorkerPlugin extends
|
|
7702
|
+
class WorkerPlugin extends RspackBuiltinPlugin {
|
|
7737
7703
|
chunkLoading;
|
|
7738
7704
|
wasmLoading;
|
|
7739
7705
|
module;
|
|
7740
7706
|
workerPublicPath;
|
|
7741
7707
|
name = binding_.BuiltinPluginName.WorkerPlugin;
|
|
7742
|
-
constructor(chunkLoading, wasmLoading,
|
|
7743
|
-
super(), this.chunkLoading = chunkLoading, this.wasmLoading = wasmLoading, this.module =
|
|
7708
|
+
constructor(chunkLoading, wasmLoading, module1, workerPublicPath){
|
|
7709
|
+
super(), this.chunkLoading = chunkLoading, this.wasmLoading = wasmLoading, this.module = module1, this.workerPublicPath = workerPublicPath;
|
|
7744
7710
|
}
|
|
7745
7711
|
raw(compiler) {
|
|
7746
|
-
return this.chunkLoading && new EnableChunkLoadingPlugin(this.chunkLoading).apply(compiler), this.wasmLoading && new EnableWasmLoadingPlugin(this.wasmLoading).apply(compiler), (
|
|
7712
|
+
return this.chunkLoading && new EnableChunkLoadingPlugin(this.chunkLoading).apply(compiler), this.wasmLoading && new EnableWasmLoadingPlugin(this.wasmLoading).apply(compiler), createBuiltinPlugin(this.name, void 0);
|
|
7747
7713
|
}
|
|
7748
7714
|
}
|
|
7749
7715
|
class ContextModuleFactory {
|
|
@@ -7759,7 +7725,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7759
7725
|
};
|
|
7760
7726
|
}
|
|
7761
7727
|
}
|
|
7762
|
-
let
|
|
7728
|
+
let DELTA_A_TO_Z = 26, NUMBER_OF_IDENTIFIER_START_CHARS = 54, NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS = 64, FUNCTION_CONTENT_REGEX = /^function\s?\(\)\s?\{\r?\n?|\r?\n?\}$/g, INDENT_MULTILINE_REGEX = /^\t/gm, LINE_SEPARATOR_REGEX = /\r?\n/g, IDENTIFIER_NAME_REPLACE_REGEX = /^([^a-zA-Z$_])/, IDENTIFIER_ALPHA_NUMERIC_NAME_REPLACE_REGEX = /[^a-zA-Z0-9$]+/g, COMMENT_END_REGEX = /\*\//g, PATH_NAME_NORMALIZE_REPLACE_REGEX = /[^a-zA-Z0-9_!§$()=\-^°]+/g, MATCH_PADDED_HYPHENS_REPLACE_REGEX = /^-|-$/g;
|
|
7763
7729
|
class Template {
|
|
7764
7730
|
static getFunctionContent(fn) {
|
|
7765
7731
|
return fn.toString().replace(FUNCTION_CONTENT_REGEX, "").replace(INDENT_MULTILINE_REGEX, "").replace(LINE_SEPARATOR_REGEX, "\n");
|
|
@@ -7798,14 +7764,14 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7798
7764
|
}
|
|
7799
7765
|
static getModulesArrayBounds(modules) {
|
|
7800
7766
|
let maxId = -1 / 0, minId = 1 / 0;
|
|
7801
|
-
for (let
|
|
7802
|
-
let moduleId =
|
|
7767
|
+
for (let module1 of modules){
|
|
7768
|
+
let moduleId = module1.id;
|
|
7803
7769
|
if ("number" != typeof moduleId) return !1;
|
|
7804
7770
|
maxId < moduleId && (maxId = moduleId), minId > moduleId && (minId = moduleId);
|
|
7805
7771
|
}
|
|
7806
7772
|
minId < 16 + `${minId}`.length && (minId = 0);
|
|
7807
7773
|
let objectOverhead = -1;
|
|
7808
|
-
for (let
|
|
7774
|
+
for (let module1 of modules)objectOverhead += `${module1.id}`.length + 2;
|
|
7809
7775
|
return (0 === minId ? maxId : 16 + `${minId}`.length + maxId) < objectOverhead && [
|
|
7810
7776
|
minId,
|
|
7811
7777
|
maxId
|
|
@@ -8658,23 +8624,23 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
8658
8624
|
let tty = infrastructureLogging.stream?.isTTY && "dumb" !== process.env.TERM;
|
|
8659
8625
|
D(infrastructureLogging, "level", "info"), D(infrastructureLogging, "debug", !1), D(infrastructureLogging, "colors", tty), D(infrastructureLogging, "appendOnly", !tty);
|
|
8660
8626
|
}, applyExperimentsDefaults = (experiments, { development })=>{
|
|
8661
|
-
defaults_F(experiments, "cache", ()=>development), D(experiments, "futureDefaults", !1), D(experiments, "lazyCompilation", !1), D(experiments, "asyncWebAssembly", experiments.futureDefaults), D(experiments, "css", !!experiments.futureDefaults || void 0),
|
|
8627
|
+
defaults_F(experiments, "cache", ()=>development), D(experiments, "futureDefaults", !1), D(experiments, "lazyCompilation", !1), D(experiments, "asyncWebAssembly", experiments.futureDefaults), D(experiments, "css", !!experiments.futureDefaults || void 0), D(experiments, "topLevelAwait", !0), D(experiments, "buildHttp", void 0), experiments.buildHttp && "object" == typeof experiments.buildHttp && D(experiments.buildHttp, "upgrade", !1), D(experiments, "incremental", {}), "object" == typeof experiments.incremental && (D(experiments.incremental, "silent", !0), D(experiments.incremental, "make", !0), D(experiments.incremental, "inferAsyncModules", !0), D(experiments.incremental, "providedExports", !0), D(experiments.incremental, "dependenciesDiagnostics", !0), D(experiments.incremental, "sideEffects", !0), D(experiments.incremental, "buildChunkGraph", !1), D(experiments.incremental, "moduleIds", !0), D(experiments.incremental, "chunkIds", !0), D(experiments.incremental, "modulesHashes", !0), D(experiments.incremental, "modulesCodegen", !0), D(experiments.incremental, "modulesRuntimeRequirements", !0), D(experiments.incremental, "chunksRuntimeRequirements", !0), D(experiments.incremental, "chunksHashes", !0), D(experiments.incremental, "chunksRender", !0), D(experiments.incremental, "emitAssets", !0)), D(experiments, "rspackFuture", {}), D(experiments, "parallelCodeSplitting", !1), D(experiments, "parallelLoader", !1), D(experiments, "useInputFileSystem", !1), D(experiments, "inlineConst", !1), D(experiments, "inlineEnum", !1), D(experiments, "typeReexportsPresence", !1), D(experiments, "lazyBarrel", !0);
|
|
8662
8628
|
}, applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
8663
|
-
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.
|
|
8664
|
-
}, applySnapshotDefaults = (_snapshot, _env)=>{}, applyModuleDefaults = (
|
|
8665
|
-
if (assertNotNill(
|
|
8629
|
+
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.6.0-canary-5bacb922-20251015173619"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
|
|
8630
|
+
}, applySnapshotDefaults = (_snapshot, _env)=>{}, applyModuleDefaults = (module1, { asyncWebAssembly, css, targetProperties, mode, uniqueName, usedExports, inlineConst })=>{
|
|
8631
|
+
if (assertNotNill(module1.parser), assertNotNill(module1.generator), defaults_F(module1.parser, "asset", ()=>({})), assertNotNill(module1.parser.asset), defaults_F(module1.parser.asset, "dataUrlCondition", ()=>({})), "object" == typeof module1.parser.asset.dataUrlCondition && D(module1.parser.asset.dataUrlCondition, "maxSize", 8096), defaults_F(module1.parser, "javascript", ()=>({})), assertNotNill(module1.parser.javascript), ((parserOptions, { usedExports, inlineConst })=>{
|
|
8666
8632
|
D(parserOptions, "dynamicImportMode", "lazy"), D(parserOptions, "dynamicImportPrefetch", !1), D(parserOptions, "dynamicImportPreload", !1), D(parserOptions, "url", !0), D(parserOptions, "exprContextCritical", !0), D(parserOptions, "unknownContextCritical", !0), D(parserOptions, "wrappedContextCritical", !1), D(parserOptions, "wrappedContextRegExp", /.*/), D(parserOptions, "strictExportPresence", !1), D(parserOptions, "requireAsExpression", !0), D(parserOptions, "requireDynamic", !0), D(parserOptions, "requireResolve", !0), D(parserOptions, "commonjs", !0), D(parserOptions, "importDynamic", !0), D(parserOptions, "worker", [
|
|
8667
8633
|
"..."
|
|
8668
8634
|
]), D(parserOptions, "importMeta", !0), D(parserOptions, "inlineConst", usedExports && inlineConst), D(parserOptions, "typeReexportsPresence", "no-tolerant"), D(parserOptions, "jsx", !1);
|
|
8669
|
-
})(
|
|
8635
|
+
})(module1.parser.javascript, {
|
|
8670
8636
|
usedExports,
|
|
8671
8637
|
inlineConst
|
|
8672
|
-
}), defaults_F(
|
|
8673
|
-
defaults_F(
|
|
8638
|
+
}), defaults_F(module1.parser, "json", ()=>({})), assertNotNill(module1.parser.json), D(module1.parser.json, "exportsDepth", "development" === mode ? 1 : Number.MAX_SAFE_INTEGER), defaults_F(module1.generator, "json", ()=>({})), assertNotNill(module1.generator.json), D(module1.generator.json, "JSONParse", !0), css) {
|
|
8639
|
+
defaults_F(module1.parser, "css", ()=>({})), assertNotNill(module1.parser.css), D(module1.parser.css, "namedExports", !0), D(module1.parser.css, "url", !0), defaults_F(module1.parser, "css/auto", ()=>({})), assertNotNill(module1.parser["css/auto"]), D(module1.parser["css/auto"], "namedExports", !0), D(module1.parser["css/auto"], "url", !0), defaults_F(module1.parser, "css/module", ()=>({})), assertNotNill(module1.parser["css/module"]), D(module1.parser["css/module"], "namedExports", !0), D(module1.parser["css/module"], "url", !0), defaults_F(module1.generator, "css", ()=>({})), assertNotNill(module1.generator.css), D(module1.generator.css, "exportsOnly", !targetProperties || !targetProperties.document), D(module1.generator.css, "esModule", !0), defaults_F(module1.generator, "css/auto", ()=>({})), assertNotNill(module1.generator["css/auto"]), D(module1.generator["css/auto"], "exportsOnly", !targetProperties || !targetProperties.document), D(module1.generator["css/auto"], "exportsConvention", "as-is");
|
|
8674
8640
|
let localIdentName = uniqueName && uniqueName.length > 0 ? "[uniqueName]-[id]-[local]" : "[id]-[local]";
|
|
8675
|
-
D(
|
|
8641
|
+
D(module1.generator["css/auto"], "localIdentName", localIdentName), D(module1.generator["css/auto"], "esModule", !0), defaults_F(module1.generator, "css/module", ()=>({})), assertNotNill(module1.generator["css/module"]), D(module1.generator["css/module"], "exportsOnly", !targetProperties || !targetProperties.document), D(module1.generator["css/module"], "exportsConvention", "as-is"), D(module1.generator["css/module"], "localIdentName", localIdentName), D(module1.generator["css/module"], "esModule", !0);
|
|
8676
8642
|
}
|
|
8677
|
-
A(
|
|
8643
|
+
A(module1, "defaultRules", ()=>{
|
|
8678
8644
|
let esm = {
|
|
8679
8645
|
type: "javascript/esm",
|
|
8680
8646
|
resolve: {
|
|
@@ -9218,14 +9184,14 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
9218
9184
|
configFile: tsConfig
|
|
9219
9185
|
} : tsConfig)
|
|
9220
9186
|
})),
|
|
9221
|
-
module: nestedConfig(config.module, (
|
|
9222
|
-
noParse:
|
|
9223
|
-
parser: keyedNestedConfig(
|
|
9224
|
-
generator: keyedNestedConfig(
|
|
9225
|
-
defaultRules: optionalNestedArray(
|
|
9187
|
+
module: nestedConfig(config.module, (module1)=>({
|
|
9188
|
+
noParse: module1.noParse,
|
|
9189
|
+
parser: keyedNestedConfig(module1.parser, cloneObject, {}),
|
|
9190
|
+
generator: keyedNestedConfig(module1.generator, cloneObject, {}),
|
|
9191
|
+
defaultRules: optionalNestedArray(module1.defaultRules, (r)=>[
|
|
9226
9192
|
...r
|
|
9227
9193
|
]),
|
|
9228
|
-
rules: nestedArray(
|
|
9194
|
+
rules: nestedArray(module1.rules, (r)=>[
|
|
9229
9195
|
...r
|
|
9230
9196
|
])
|
|
9231
9197
|
})),
|
|
@@ -9267,7 +9233,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
9267
9233
|
plugins: nestedArray(config.plugins, (p)=>[
|
|
9268
9234
|
...p
|
|
9269
9235
|
]),
|
|
9270
|
-
experiments: nestedConfig(config.experiments, (experiments)=>({
|
|
9236
|
+
experiments: nestedConfig(config.experiments, (experiments)=>(experiments.layers && external_node_util_default().deprecate(()=>{}, "`experiments.layers` config has been deprecated and will be removed in Rspack v2.0. Feature layers will be always enabled. Please remove this option from your Rspack configuration.")(), !1 === experiments.topLevelAwait && external_node_util_default().deprecate(()=>{}, "`experiments.topLevelAwait` config has been deprecated and will be removed in Rspack v2.0. Top-level await will be always enabled. Please remove this option from your Rspack configuration.")(), {
|
|
9271
9237
|
...experiments,
|
|
9272
9238
|
cache: optionalNestedConfig(experiments.cache, (cache)=>{
|
|
9273
9239
|
if ("boolean" == typeof cache || "memory" === cache.type) return cache;
|
|
@@ -10301,7 +10267,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
10301
10267
|
});
|
|
10302
10268
|
}
|
|
10303
10269
|
}
|
|
10304
|
-
let CORE_VERSION = "1.
|
|
10270
|
+
let CORE_VERSION = "1.6.0-canary-5bacb922-20251015173619", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
|
|
10305
10271
|
|
|
10306
10272
|
Help:
|
|
10307
10273
|
Looks like you are using a custom binding (via environment variable 'RSPACK_BINDING=${process.env.RSPACK_BINDING}').
|
|
@@ -10816,7 +10782,7 @@ Help:
|
|
|
10816
10782
|
for(let hookName in childCompiler.#builtinPlugins = [
|
|
10817
10783
|
...childCompiler.#builtinPlugins,
|
|
10818
10784
|
...this.#builtinPlugins.filter((plugin)=>!0 === plugin.canInherentFromParent)
|
|
10819
|
-
], this.hooks)(
|
|
10785
|
+
], this.hooks)canInherentFromParent(hookName) && childCompiler.hooks[hookName] && (childCompiler.hooks[hookName].taps = this.hooks[hookName].taps.slice());
|
|
10820
10786
|
return compilation.hooks.childCompiler.call(childCompiler, compilerName, compilerIndex), childCompiler;
|
|
10821
10787
|
}
|
|
10822
10788
|
isChild() {
|
|
@@ -10881,7 +10847,7 @@ Help:
|
|
|
10881
10847
|
return this.#compilationParams = params, params;
|
|
10882
10848
|
}
|
|
10883
10849
|
#getInstance(callback) {
|
|
10884
|
-
var options, compiler, output,
|
|
10850
|
+
var options, compiler, output, module1, options1, parser, generator, stats;
|
|
10885
10851
|
let mode, experiments, error = CORE_VERSION === binding_default().EXPECTED_RSPACK_CORE_VERSION || CORE_VERSION.includes("canary") ? null : Error(bindingVersionCheck_errorMessage(CORE_VERSION, binding_default().EXPECTED_RSPACK_CORE_VERSION));
|
|
10886
10852
|
if (error) return callback(error);
|
|
10887
10853
|
if (this.#instance) return callback(null, this.#instance);
|
|
@@ -10911,29 +10877,29 @@ Help:
|
|
|
10911
10877
|
},
|
|
10912
10878
|
resolve: getRawResolve(options.resolve),
|
|
10913
10879
|
resolveLoader: getRawResolve(options.resolveLoader),
|
|
10914
|
-
module: (
|
|
10880
|
+
module: (module1 = options.module, options1 = {
|
|
10915
10881
|
compiler,
|
|
10916
10882
|
mode,
|
|
10917
10883
|
context: options.context,
|
|
10918
10884
|
experiments
|
|
10919
|
-
}, external_node_assert_default()(!isNil(
|
|
10885
|
+
}, external_node_assert_default()(!isNil(module1.defaultRules), "module.defaultRules should not be nil after defaults"), {
|
|
10920
10886
|
rules: [
|
|
10921
10887
|
{
|
|
10922
|
-
rules:
|
|
10888
|
+
rules: module1.defaultRules
|
|
10923
10889
|
},
|
|
10924
10890
|
{
|
|
10925
|
-
rules:
|
|
10891
|
+
rules: module1.rules
|
|
10926
10892
|
}
|
|
10927
10893
|
].map((rule, index)=>getRawModuleRule(rule, `ruleSet[${index}]`, options1, "javascript/auto")),
|
|
10928
|
-
parser: Object.fromEntries(Object.entries(parser =
|
|
10894
|
+
parser: Object.fromEntries(Object.entries(parser = module1.parser).map(([k, v])=>[
|
|
10929
10895
|
k,
|
|
10930
10896
|
getRawParserOptions(v, k)
|
|
10931
10897
|
]).filter(([k, v])=>void 0 !== v)),
|
|
10932
|
-
generator: Object.fromEntries(Object.entries(generator =
|
|
10898
|
+
generator: Object.fromEntries(Object.entries(generator = module1.generator).map(([k, v])=>[
|
|
10933
10899
|
k,
|
|
10934
10900
|
getRawGeneratorOptions(v, k)
|
|
10935
10901
|
]).filter(([k, v])=>void 0 !== v)),
|
|
10936
|
-
noParse:
|
|
10902
|
+
noParse: module1.noParse
|
|
10937
10903
|
}),
|
|
10938
10904
|
optimization: options.optimization,
|
|
10939
10905
|
stats: {
|
|
@@ -11070,32 +11036,32 @@ Help:
|
|
|
11070
11036
|
registerCompilationRuntimeModuleTaps: createTap2(binding_default().RegisterJsTapKind.CompilationRuntimeModule, function() {
|
|
11071
11037
|
return getCompiler2().__internal__get_compilation().hooks.runtimeModule;
|
|
11072
11038
|
}, function(queried) {
|
|
11073
|
-
return function({ module, chunk }) {
|
|
11074
|
-
let originSource =
|
|
11075
|
-
queried.call(
|
|
11076
|
-
let newSource =
|
|
11077
|
-
if (newSource && newSource !== originSource) return
|
|
11039
|
+
return function({ module: module1, chunk }) {
|
|
11040
|
+
let originSource = module1.source?.source;
|
|
11041
|
+
queried.call(module1, chunk);
|
|
11042
|
+
let newSource = module1.source?.source;
|
|
11043
|
+
if (newSource && newSource !== originSource) return module1;
|
|
11078
11044
|
};
|
|
11079
11045
|
}),
|
|
11080
11046
|
registerCompilationBuildModuleTaps: createTap2(binding_default().RegisterJsTapKind.CompilationBuildModule, function() {
|
|
11081
11047
|
return getCompiler2().__internal__get_compilation().hooks.buildModule;
|
|
11082
11048
|
}, function(queried) {
|
|
11083
|
-
return function(
|
|
11084
|
-
return queried.call(
|
|
11049
|
+
return function(module1) {
|
|
11050
|
+
return queried.call(module1);
|
|
11085
11051
|
};
|
|
11086
11052
|
}),
|
|
11087
11053
|
registerCompilationStillValidModuleTaps: createTap2(binding_default().RegisterJsTapKind.CompilationStillValidModule, function() {
|
|
11088
11054
|
return getCompiler2().__internal__get_compilation().hooks.stillValidModule;
|
|
11089
11055
|
}, function(queried) {
|
|
11090
|
-
return function(
|
|
11091
|
-
return queried.call(
|
|
11056
|
+
return function(module1) {
|
|
11057
|
+
return queried.call(module1);
|
|
11092
11058
|
};
|
|
11093
11059
|
}),
|
|
11094
11060
|
registerCompilationSucceedModuleTaps: createTap2(binding_default().RegisterJsTapKind.CompilationSucceedModule, function() {
|
|
11095
11061
|
return getCompiler2().__internal__get_compilation().hooks.succeedModule;
|
|
11096
11062
|
}, function(queried) {
|
|
11097
|
-
return function(
|
|
11098
|
-
return queried.call(
|
|
11063
|
+
return function(module1) {
|
|
11064
|
+
return queried.call(module1);
|
|
11099
11065
|
};
|
|
11100
11066
|
}),
|
|
11101
11067
|
registerCompilationExecuteModuleTaps: createTap2(binding_default().RegisterJsTapKind.CompilationExecuteModule, function() {
|
|
@@ -11579,7 +11545,7 @@ Help:
|
|
|
11579
11545
|
obj.children = this.stats.map((stat, idx)=>{
|
|
11580
11546
|
let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
|
|
11581
11547
|
return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
|
|
11582
|
-
}), childOptions.version && (obj.rspackVersion = "1.
|
|
11548
|
+
}), childOptions.version && (obj.rspackVersion = "1.6.0-canary-5bacb922-20251015173619", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
|
|
11583
11549
|
let mapError = (j, obj)=>({
|
|
11584
11550
|
...obj,
|
|
11585
11551
|
compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
|
|
@@ -12024,7 +11990,7 @@ Help:
|
|
|
12024
11990
|
};
|
|
12025
11991
|
}, moduleGroup = (children)=>{
|
|
12026
11992
|
let size = 0, sizes = {};
|
|
12027
|
-
for (let
|
|
11993
|
+
for (let module1 of children)for (let key of (size += module1.size, Object.keys(module1.sizes)))sizes[key] = (sizes[key] || 0) + module1.sizes[key];
|
|
12028
11994
|
return {
|
|
12029
11995
|
size,
|
|
12030
11996
|
sizes
|
|
@@ -12195,7 +12161,7 @@ Help:
|
|
|
12195
12161
|
_: (groupConfigs, _context, options)=>{
|
|
12196
12162
|
let groupByFlag = (name, type, exclude)=>{
|
|
12197
12163
|
groupConfigs.push({
|
|
12198
|
-
getKeys: (
|
|
12164
|
+
getKeys: (module1)=>module1[name] ? [
|
|
12199
12165
|
"1"
|
|
12200
12166
|
] : void 0,
|
|
12201
12167
|
getOptions: ()=>({
|
|
@@ -12215,8 +12181,8 @@ Help:
|
|
|
12215
12181
|
});
|
|
12216
12182
|
}, { groupModulesByCacheStatus, groupModulesByAttributes, groupModulesByType, groupModulesByPath, groupModulesByLayer, groupModulesByExtension } = options;
|
|
12217
12183
|
groupModulesByAttributes && (groupByFlag("errors", "modules with errors"), groupByFlag("warnings", "modules with warnings"), groupByFlag("assets", "modules with assets"), groupByFlag("optional", "optional modules")), groupModulesByCacheStatus && (groupByFlag("cacheable", "cacheable modules"), groupByFlag("built", "built modules"), groupByFlag("codeGenerated", "code generated modules")), (groupModulesByCacheStatus || !options.cachedModules) && groupByFlag("cached", "cached modules", !options.cachedModules), (groupModulesByAttributes || !options.orphanModules) && groupByFlag("orphan", "orphan modules", !options.orphanModules), (groupModulesByAttributes || !options.dependentModules) && groupByFlag("dependent", "dependent modules", !options.dependentModules), (groupModulesByType || !options.runtimeModules) && groupConfigs.push({
|
|
12218
|
-
getKeys: (
|
|
12219
|
-
let moduleType =
|
|
12184
|
+
getKeys: (module1)=>{
|
|
12185
|
+
let moduleType = module1.moduleType;
|
|
12220
12186
|
if (moduleType) {
|
|
12221
12187
|
if (groupModulesByType) return [
|
|
12222
12188
|
moduleType.split("/", 1)[0]
|
|
@@ -12247,8 +12213,8 @@ Help:
|
|
|
12247
12213
|
};
|
|
12248
12214
|
}
|
|
12249
12215
|
}), groupModulesByLayer && groupConfigs.push({
|
|
12250
|
-
getKeys: (
|
|
12251
|
-
|
|
12216
|
+
getKeys: (module1)=>[
|
|
12217
|
+
module1.layer
|
|
12252
12218
|
],
|
|
12253
12219
|
createGroup: (key, children, _modules)=>({
|
|
12254
12220
|
type: "modules by layer",
|
|
@@ -12257,9 +12223,9 @@ Help:
|
|
|
12257
12223
|
...moduleGroup(children)
|
|
12258
12224
|
})
|
|
12259
12225
|
}), (groupModulesByPath || groupModulesByExtension) && groupConfigs.push({
|
|
12260
|
-
getKeys: (
|
|
12261
|
-
if (!
|
|
12262
|
-
let resource = parseResource(
|
|
12226
|
+
getKeys: (module1)=>{
|
|
12227
|
+
if (!module1.name) return;
|
|
12228
|
+
let resource = parseResource(module1.name.split("!").pop()).path, dataUrl = /^data:[^,;]+/.exec(resource);
|
|
12263
12229
|
if (dataUrl) return [
|
|
12264
12230
|
dataUrl[0]
|
|
12265
12231
|
];
|
|
@@ -12281,9 +12247,9 @@ Help:
|
|
|
12281
12247
|
},
|
|
12282
12248
|
excludeModules: (groupConfigs, _context, { excludeModules })=>{
|
|
12283
12249
|
groupConfigs.push({
|
|
12284
|
-
getKeys: (
|
|
12285
|
-
let name =
|
|
12286
|
-
if (name && excludeModules.some((fn)=>fn(name,
|
|
12250
|
+
getKeys: (module1)=>{
|
|
12251
|
+
let name = module1.name;
|
|
12252
|
+
if (name && excludeModules.some((fn)=>fn(name, module1, type))) return [
|
|
12287
12253
|
"1"
|
|
12288
12254
|
];
|
|
12289
12255
|
},
|
|
@@ -12475,7 +12441,7 @@ Help:
|
|
|
12475
12441
|
object.hash = context.getStatsCompilation(compilation).hash;
|
|
12476
12442
|
},
|
|
12477
12443
|
version: (object)=>{
|
|
12478
|
-
object.version = "5.75.0", object.rspackVersion = "1.
|
|
12444
|
+
object.version = "5.75.0", object.rspackVersion = "1.6.0-canary-5bacb922-20251015173619";
|
|
12479
12445
|
},
|
|
12480
12446
|
env: (object, _compilation, _context, { _env })=>{
|
|
12481
12447
|
object.env = _env;
|
|
@@ -12611,53 +12577,53 @@ Help:
|
|
|
12611
12577
|
}
|
|
12612
12578
|
},
|
|
12613
12579
|
module: {
|
|
12614
|
-
_: (object,
|
|
12615
|
-
let { type } = context, { commonAttributes } =
|
|
12580
|
+
_: (object, module1, context, options, factory)=>{
|
|
12581
|
+
let { type } = context, { commonAttributes } = module1;
|
|
12616
12582
|
object.type = commonAttributes.type, object.moduleType = commonAttributes.moduleType, object.layer = commonAttributes.layer, object.size = commonAttributes.size;
|
|
12617
12583
|
let sizes = commonAttributes.sizes.map(({ sourceType, size })=>[
|
|
12618
12584
|
sourceType,
|
|
12619
12585
|
size
|
|
12620
12586
|
]);
|
|
12621
|
-
sizes.sort((a, b)=>-compareIds(a, b)), object.sizes = Object.fromEntries(sizes), object.built = commonAttributes.built, object.codeGenerated = commonAttributes.codeGenerated, object.buildTimeExecuted = commonAttributes.buildTimeExecuted, object.cached = commonAttributes.cached, (commonAttributes.built || commonAttributes.codeGenerated || options.cachedModules) && Object.assign(object, factory.create(`${type}$visible`,
|
|
12587
|
+
sizes.sort((a, b)=>-compareIds(a, b)), object.sizes = Object.fromEntries(sizes), object.built = commonAttributes.built, object.codeGenerated = commonAttributes.codeGenerated, object.buildTimeExecuted = commonAttributes.buildTimeExecuted, object.cached = commonAttributes.cached, (commonAttributes.built || commonAttributes.codeGenerated || options.cachedModules) && Object.assign(object, factory.create(`${type}$visible`, module1, context));
|
|
12622
12588
|
}
|
|
12623
12589
|
},
|
|
12624
12590
|
module$visible: {
|
|
12625
|
-
_: (object,
|
|
12626
|
-
let { type } = context, { commonAttributes } =
|
|
12627
|
-
commonAttributes.moduleDescriptor && (object.identifier = commonAttributes.moduleDescriptor.identifier, object.name = commonAttributes.moduleDescriptor.name), object.nameForCondition = commonAttributes.nameForCondition, object.index = commonAttributes.preOrderIndex, object.preOrderIndex = commonAttributes.preOrderIndex, object.index2 = commonAttributes.postOrderIndex, object.postOrderIndex = commonAttributes.postOrderIndex, object.cacheable = commonAttributes.cacheable, object.optional = commonAttributes.optional, object.orphan = commonAttributes.orphan, object.dependent =
|
|
12591
|
+
_: (object, module1, context, _options, factory)=>{
|
|
12592
|
+
let { type } = context, { commonAttributes } = module1;
|
|
12593
|
+
commonAttributes.moduleDescriptor && (object.identifier = commonAttributes.moduleDescriptor.identifier, object.name = commonAttributes.moduleDescriptor.name), object.nameForCondition = commonAttributes.nameForCondition, object.index = commonAttributes.preOrderIndex, object.preOrderIndex = commonAttributes.preOrderIndex, object.index2 = commonAttributes.postOrderIndex, object.postOrderIndex = commonAttributes.postOrderIndex, object.cacheable = commonAttributes.cacheable, object.optional = commonAttributes.optional, object.orphan = commonAttributes.orphan, object.dependent = module1.dependent, object.issuer = module1.issuerDescriptor?.identifier, object.issuerName = module1.issuerDescriptor?.name, object.issuerPath = module1.issuerDescriptor && factory.create(`${type.slice(0, -8)}.issuerPath`, module1.issuerPath, context), object.failed = commonAttributes.failed, object.errors = commonAttributes.errors, object.warnings = commonAttributes.warnings;
|
|
12628
12594
|
let profile = commonAttributes.profile;
|
|
12629
12595
|
profile && (object.profile = factory.create(`${type}.profile`, profile, context));
|
|
12630
12596
|
},
|
|
12631
|
-
ids: (object,
|
|
12632
|
-
let { commonAttributes } =
|
|
12633
|
-
commonAttributes.moduleDescriptor && (object.id = commonAttributes.moduleDescriptor.id), object.issuerId =
|
|
12597
|
+
ids: (object, module1)=>{
|
|
12598
|
+
let { commonAttributes } = module1;
|
|
12599
|
+
commonAttributes.moduleDescriptor && (object.id = commonAttributes.moduleDescriptor.id), object.issuerId = module1.issuerDescriptor?.id, object.chunks = commonAttributes.chunks;
|
|
12634
12600
|
},
|
|
12635
|
-
moduleAssets: (object,
|
|
12636
|
-
object.assets =
|
|
12601
|
+
moduleAssets: (object, module1)=>{
|
|
12602
|
+
object.assets = module1.commonAttributes.assets;
|
|
12637
12603
|
},
|
|
12638
|
-
reasons: (object,
|
|
12639
|
-
let { type } = context, limited = spaceLimited(factory.create(`${type.slice(0, -8)}.reasons`,
|
|
12604
|
+
reasons: (object, module1, context, options, factory)=>{
|
|
12605
|
+
let { type } = context, limited = spaceLimited(factory.create(`${type.slice(0, -8)}.reasons`, module1.commonAttributes.reasons, context), options.reasonsSpace);
|
|
12640
12606
|
object.reasons = limited.children, object.filteredReasons = limited.filteredChildren;
|
|
12641
12607
|
},
|
|
12642
|
-
source: (object,
|
|
12643
|
-
let { commonAttributes } =
|
|
12608
|
+
source: (object, module1)=>{
|
|
12609
|
+
let { commonAttributes } = module1;
|
|
12644
12610
|
object.source = commonAttributes.source;
|
|
12645
12611
|
},
|
|
12646
|
-
usedExports: (object,
|
|
12647
|
-
"string" == typeof
|
|
12612
|
+
usedExports: (object, module1)=>{
|
|
12613
|
+
"string" == typeof module1.usedExports ? "null" === module1.usedExports ? object.usedExports = null : object.usedExports = "true" === module1.usedExports : Array.isArray(module1.usedExports) ? object.usedExports = module1.usedExports : object.usedExports = null;
|
|
12648
12614
|
},
|
|
12649
|
-
providedExports: (object,
|
|
12650
|
-
let { commonAttributes } =
|
|
12615
|
+
providedExports: (object, module1)=>{
|
|
12616
|
+
let { commonAttributes } = module1;
|
|
12651
12617
|
Array.isArray(commonAttributes.providedExports) ? object.providedExports = commonAttributes.providedExports : object.providedExports = null;
|
|
12652
12618
|
},
|
|
12653
|
-
optimizationBailout: (object,
|
|
12654
|
-
object.optimizationBailout =
|
|
12619
|
+
optimizationBailout: (object, module1)=>{
|
|
12620
|
+
object.optimizationBailout = module1.commonAttributes.optimizationBailout || null;
|
|
12655
12621
|
},
|
|
12656
|
-
depth: (object,
|
|
12657
|
-
object.depth =
|
|
12622
|
+
depth: (object, module1)=>{
|
|
12623
|
+
object.depth = module1.commonAttributes.depth;
|
|
12658
12624
|
},
|
|
12659
|
-
nestedModules: (object,
|
|
12660
|
-
let { type } = context, innerModules =
|
|
12625
|
+
nestedModules: (object, module1, context, options, factory)=>{
|
|
12626
|
+
let { type } = context, innerModules = module1.modules;
|
|
12661
12627
|
if (Array.isArray(innerModules) && innerModules.length > 0) {
|
|
12662
12628
|
let limited = spaceLimited(factory.create(`${type.slice(0, -8)}.modules`, innerModules, context), options.nestedModulesSpace);
|
|
12663
12629
|
object.modules = limited.children, object.filteredModules = limited.filteredChildren;
|
|
@@ -12675,11 +12641,11 @@ Help:
|
|
|
12675
12641
|
}
|
|
12676
12642
|
},
|
|
12677
12643
|
moduleIssuer: {
|
|
12678
|
-
_: (object,
|
|
12679
|
-
|
|
12644
|
+
_: (object, module1, _context, _options, _factory)=>{
|
|
12645
|
+
module1.moduleDescriptor && (object.identifier = module1.moduleDescriptor.identifier, object.name = module1.moduleDescriptor.name);
|
|
12680
12646
|
},
|
|
12681
|
-
ids: (object,
|
|
12682
|
-
object.id =
|
|
12647
|
+
ids: (object, module1)=>{
|
|
12648
|
+
object.id = module1.moduleDescriptor.id;
|
|
12683
12649
|
}
|
|
12684
12650
|
},
|
|
12685
12651
|
moduleReason: {
|
|
@@ -12730,12 +12696,12 @@ Help:
|
|
|
12730
12696
|
error: EXTRACT_ERROR,
|
|
12731
12697
|
warning: EXTRACT_ERROR,
|
|
12732
12698
|
moduleTraceItem: {
|
|
12733
|
-
_: (object, { origin, module, dependencies }, context, _, factory)=>{
|
|
12699
|
+
_: (object, { origin, module: module1, dependencies }, context, _, factory)=>{
|
|
12734
12700
|
let { type } = context;
|
|
12735
|
-
origin.moduleDescriptor && (object.originIdentifier = origin.moduleDescriptor.identifier, object.originName = origin.moduleDescriptor.name),
|
|
12701
|
+
origin.moduleDescriptor && (object.originIdentifier = origin.moduleDescriptor.identifier, object.originName = origin.moduleDescriptor.name), module1.moduleDescriptor && (object.moduleIdentifier = module1.moduleDescriptor.identifier, object.moduleName = module1.moduleDescriptor.name), object.dependencies = factory.create(`${type}.dependencies`, dependencies, context);
|
|
12736
12702
|
},
|
|
12737
|
-
ids: (object, { origin, module })=>{
|
|
12738
|
-
object.originId = origin.moduleDescriptor.id, object.moduleId =
|
|
12703
|
+
ids: (object, { origin, module: module1 })=>{
|
|
12704
|
+
object.originId = origin.moduleDescriptor.id, object.moduleId = module1.moduleDescriptor.id;
|
|
12739
12705
|
}
|
|
12740
12706
|
},
|
|
12741
12707
|
moduleTraceDependency: {
|
|
@@ -13104,19 +13070,19 @@ Help:
|
|
|
13104
13070
|
"module.providedExports": (providedExports, { formatFlag, cyan })=>{
|
|
13105
13071
|
if (Array.isArray(providedExports)) return 0 === providedExports.length ? cyan(formatFlag("no exports")) : cyan(formatFlag(`exports: ${providedExports.join(", ")}`));
|
|
13106
13072
|
},
|
|
13107
|
-
"module.usedExports": (usedExports, { formatFlag, cyan, module })=>{
|
|
13073
|
+
"module.usedExports": (usedExports, { formatFlag, cyan, module: module1 })=>{
|
|
13108
13074
|
if (!0 !== usedExports) {
|
|
13109
13075
|
if (null === usedExports) return cyan(formatFlag("used exports unknown"));
|
|
13110
13076
|
if (!1 === usedExports) return cyan(formatFlag("module unused"));
|
|
13111
13077
|
if (Array.isArray(usedExports)) {
|
|
13112
13078
|
if (0 === usedExports.length) return cyan(formatFlag("no exports used"));
|
|
13113
|
-
let providedExportsCount = Array.isArray(
|
|
13079
|
+
let providedExportsCount = Array.isArray(module1.providedExports) ? module1.providedExports.length : null;
|
|
13114
13080
|
return null !== providedExportsCount && providedExportsCount === usedExports.length ? cyan(formatFlag("all exports used")) : cyan(formatFlag(`only some exports used: ${usedExports.join(", ")}`));
|
|
13115
13081
|
}
|
|
13116
13082
|
}
|
|
13117
13083
|
},
|
|
13118
13084
|
"module.optimizationBailout[]": (optimizationBailout, { yellow })=>yellow(optimizationBailout),
|
|
13119
|
-
"module.issuerPath": (_issuerPath, { module })=>
|
|
13085
|
+
"module.issuerPath": (_issuerPath, { module: module1 })=>module1.profile ? void 0 : "",
|
|
13120
13086
|
"module.profile": (_profile)=>void 0,
|
|
13121
13087
|
"module.filteredModules": (filteredModules, { module: { modules } })=>filteredModules > 0 ? `${moreCount(modules, filteredModules)} nested ${DefaultStatsPrinterPlugin_plural(filteredModules, "module", "modules")}` : void 0,
|
|
13122
13088
|
"module.filteredReasons": (filteredReasons, { module: { reasons } })=>filteredReasons > 0 ? `${moreCount(reasons, filteredReasons)} ${DefaultStatsPrinterPlugin_plural(filteredReasons, "reason", "reasons")}` : void 0,
|
|
@@ -13130,11 +13096,11 @@ Help:
|
|
|
13130
13096
|
let id;
|
|
13131
13097
|
return "number" == typeof (id = moduleId) || id ? formatModuleId(moduleId) : void 0;
|
|
13132
13098
|
},
|
|
13133
|
-
"moduleReason.module": (
|
|
13099
|
+
"moduleReason.module": (module1, { magenta })=>magenta(module1),
|
|
13134
13100
|
"moduleReason.loc": (loc)=>loc,
|
|
13135
13101
|
"moduleReason.explanation": (explanation, { cyan })=>cyan(explanation),
|
|
13136
13102
|
"moduleReason.active": (active, { formatFlag })=>active ? void 0 : formatFlag("inactive"),
|
|
13137
|
-
"moduleReason.resolvedModule": (
|
|
13103
|
+
"moduleReason.resolvedModule": (module1, { magenta })=>magenta(module1),
|
|
13138
13104
|
"moduleReason.filteredChildren": (filteredChildren, { moduleReason: { children } })=>filteredChildren > 0 ? `${moreCount(children, filteredChildren)} ${DefaultStatsPrinterPlugin_plural(filteredChildren, "reason", "reasons")}` : void 0,
|
|
13139
13105
|
"module.profile.total": (value, { formatTime })=>formatTime(value),
|
|
13140
13106
|
"module.profile.resolving": (value, { formatTime })=>`resolving: ${formatTime(value)}`,
|
|
@@ -13533,12 +13499,12 @@ Help:
|
|
|
13533
13499
|
content: `\n${item.content}\n`
|
|
13534
13500
|
} : item), " "),
|
|
13535
13501
|
"asset.info": joinOneLine,
|
|
13536
|
-
module: (items, { module })=>{
|
|
13502
|
+
module: (items, { module: module1 })=>{
|
|
13537
13503
|
let hasName = !1;
|
|
13538
13504
|
return joinExplicitNewLine(items.map((item)=>{
|
|
13539
13505
|
switch(item.element){
|
|
13540
13506
|
case "id":
|
|
13541
|
-
if (
|
|
13507
|
+
if (module1 && module1.id === module1.name) {
|
|
13542
13508
|
if (hasName) return !1;
|
|
13543
13509
|
item.content && (hasName = !0);
|
|
13544
13510
|
}
|
|
@@ -13668,7 +13634,7 @@ Help:
|
|
|
13668
13634
|
formatFlag: (flag)=>`[${flag}]`,
|
|
13669
13635
|
formatLayer: (layer)=>`(in ${layer})`,
|
|
13670
13636
|
formatSize: (size)=>{
|
|
13671
|
-
if ("number" != typeof size ||
|
|
13637
|
+
if ("number" != typeof size || Number.isNaN(size)) return "unknown size";
|
|
13672
13638
|
if (size <= 0) return "0 bytes";
|
|
13673
13639
|
let index = Math.floor(Math.log(size) / Math.log(1024));
|
|
13674
13640
|
return `${+(size / 1024 ** index).toPrecision(3)} ${[
|
|
@@ -13935,7 +13901,7 @@ Help:
|
|
|
13935
13901
|
return this._emitFile(filename, JsSource.__to_binding(source), assetInfo);
|
|
13936
13902
|
}
|
|
13937
13903
|
});
|
|
13938
|
-
let asRegExp = (test)=>"string" == typeof test ? RegExp(`^${test.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")}`) : test, matchPart = (str, test)=>!test || (Array.isArray(test) ? test.map(asRegExp).some((regExp)=>regExp.test(str)) : asRegExp(test).test(str)), matchObject = (obj, str)=>!(obj.test && !matchPart(str, obj.test) || obj.include && !matchPart(str, obj.include) || obj.exclude && matchPart(str, obj.exclude)), FlagAllModulesAsUsedPlugin = (
|
|
13904
|
+
let asRegExp = (test)=>"string" == typeof test ? RegExp(`^${test.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")}`) : test, matchPart = (str, test)=>!test || (Array.isArray(test) ? test.map(asRegExp).some((regExp)=>regExp.test(str)) : asRegExp(test).test(str)), matchObject = (obj, str)=>!(obj.test && !matchPart(str, obj.test) || obj.include && !matchPart(str, obj.include) || obj.exclude && matchPart(str, obj.exclude)), FlagAllModulesAsUsedPlugin = base_create(binding_.BuiltinPluginName.FlagAllModulesAsUsedPlugin, (explanation)=>({
|
|
13939
13905
|
explanation
|
|
13940
13906
|
}));
|
|
13941
13907
|
class DllPlugin {
|
|
@@ -14959,7 +14925,8 @@ Help:
|
|
|
14959
14925
|
generator: schemas_record(schemas_string(), any()),
|
|
14960
14926
|
resolve: resolveOptions,
|
|
14961
14927
|
sideEffects: schemas_boolean(),
|
|
14962
|
-
enforce: literal("pre").or(literal("post"))
|
|
14928
|
+
enforce: literal("pre").or(literal("post")),
|
|
14929
|
+
extractSourceMap: schemas_boolean()
|
|
14963
14930
|
}).partial().extend({
|
|
14964
14931
|
oneOf: lazy(()=>ruleSetRule.or(falsy).array()).optional(),
|
|
14965
14932
|
rules: lazy(()=>ruleSetRule.or(falsy).array()).optional()
|
|
@@ -15537,7 +15504,7 @@ Help:
|
|
|
15537
15504
|
"externals"
|
|
15538
15505
|
]));
|
|
15539
15506
|
});
|
|
15540
|
-
}), ModuleFederationRuntimePlugin = (
|
|
15507
|
+
}), ModuleFederationRuntimePlugin = base_create(binding_.BuiltinPluginName.ModuleFederationRuntimePlugin, (options = {})=>options), parseOptions = (options, normalizeSimple, normalizeOptions)=>{
|
|
15541
15508
|
let items = [];
|
|
15542
15509
|
var options1 = options, normalizeSimple1 = normalizeSimple, normalizeOptions1 = normalizeOptions, fn = (key, value)=>{
|
|
15543
15510
|
items.push([
|
|
@@ -15557,7 +15524,7 @@ Help:
|
|
|
15557
15524
|
else throw Error("Unexpected options format");
|
|
15558
15525
|
return items;
|
|
15559
15526
|
}, compilerSet = new WeakSet();
|
|
15560
|
-
class ShareRuntimePlugin extends
|
|
15527
|
+
class ShareRuntimePlugin extends RspackBuiltinPlugin {
|
|
15561
15528
|
enhanced;
|
|
15562
15529
|
name = binding_.BuiltinPluginName.ShareRuntimePlugin;
|
|
15563
15530
|
constructor(enhanced = !1){
|
|
@@ -15565,11 +15532,11 @@ Help:
|
|
|
15565
15532
|
}
|
|
15566
15533
|
raw(compiler) {
|
|
15567
15534
|
var compiler1, compiler2;
|
|
15568
|
-
if (compiler1 = compiler, !compilerSet.has(compiler1)) return compiler2 = compiler, compilerSet.add(compiler2), (
|
|
15535
|
+
if (compiler1 = compiler, !compilerSet.has(compiler1)) return compiler2 = compiler, compilerSet.add(compiler2), createBuiltinPlugin(this.name, this.enhanced);
|
|
15569
15536
|
}
|
|
15570
15537
|
}
|
|
15571
15538
|
let VERSION_PATTERN_REGEXP = /^([\d^=v<>~]|[*xX]$)/;
|
|
15572
|
-
class ConsumeSharedPlugin extends
|
|
15539
|
+
class ConsumeSharedPlugin extends RspackBuiltinPlugin {
|
|
15573
15540
|
name = binding_.BuiltinPluginName.ConsumeSharedPlugin;
|
|
15574
15541
|
_options;
|
|
15575
15542
|
constructor(options){
|
|
@@ -15618,10 +15585,10 @@ Help:
|
|
|
15618
15585
|
})),
|
|
15619
15586
|
enhanced: this._options.enhanced
|
|
15620
15587
|
};
|
|
15621
|
-
return (
|
|
15588
|
+
return createBuiltinPlugin(this.name, rawOptions);
|
|
15622
15589
|
}
|
|
15623
15590
|
}
|
|
15624
|
-
class ProvideSharedPlugin extends
|
|
15591
|
+
class ProvideSharedPlugin extends RspackBuiltinPlugin {
|
|
15625
15592
|
name = binding_.BuiltinPluginName.ProvideSharedPlugin;
|
|
15626
15593
|
_provides;
|
|
15627
15594
|
_enhanced;
|
|
@@ -15655,7 +15622,7 @@ Help:
|
|
|
15655
15622
|
key,
|
|
15656
15623
|
...v
|
|
15657
15624
|
}));
|
|
15658
|
-
return (
|
|
15625
|
+
return createBuiltinPlugin(this.name, rawOptions);
|
|
15659
15626
|
}
|
|
15660
15627
|
}
|
|
15661
15628
|
class SharePlugin {
|
|
@@ -15709,7 +15676,7 @@ Help:
|
|
|
15709
15676
|
}).apply(compiler);
|
|
15710
15677
|
}
|
|
15711
15678
|
}
|
|
15712
|
-
class ContainerPlugin extends
|
|
15679
|
+
class ContainerPlugin extends RspackBuiltinPlugin {
|
|
15713
15680
|
name = binding_.BuiltinPluginName.ContainerPlugin;
|
|
15714
15681
|
_options;
|
|
15715
15682
|
constructor(options){
|
|
@@ -15751,10 +15718,10 @@ Help:
|
|
|
15751
15718
|
})),
|
|
15752
15719
|
enhanced
|
|
15753
15720
|
};
|
|
15754
|
-
return (
|
|
15721
|
+
return createBuiltinPlugin(this.name, rawOptions);
|
|
15755
15722
|
}
|
|
15756
15723
|
}
|
|
15757
|
-
class ContainerReferencePlugin extends
|
|
15724
|
+
class ContainerReferencePlugin extends RspackBuiltinPlugin {
|
|
15758
15725
|
name = binding_.BuiltinPluginName.ContainerReferencePlugin;
|
|
15759
15726
|
_options;
|
|
15760
15727
|
constructor(options){
|
|
@@ -15789,7 +15756,7 @@ Help:
|
|
|
15789
15756
|
})),
|
|
15790
15757
|
enhanced: this._options.enhanced
|
|
15791
15758
|
};
|
|
15792
|
-
return (
|
|
15759
|
+
return createBuiltinPlugin(this.name, rawOptions);
|
|
15793
15760
|
}
|
|
15794
15761
|
}
|
|
15795
15762
|
async function minify(source, options) {
|
|
@@ -15800,7 +15767,7 @@ Help:
|
|
|
15800
15767
|
let _options = JSON.stringify(options || {});
|
|
15801
15768
|
return binding_default().transform(source, _options);
|
|
15802
15769
|
}
|
|
15803
|
-
let exports_rspackVersion = "1.
|
|
15770
|
+
let exports_rspackVersion = "1.6.0-canary-5bacb922-20251015173619", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
|
|
15804
15771
|
getNormalizedRspackOptions: getNormalizedRspackOptions,
|
|
15805
15772
|
applyRspackOptionsDefaults: applyRspackOptionsDefaults,
|
|
15806
15773
|
getNormalizedWebpackOptions: getNormalizedRspackOptions,
|
|
@@ -16045,7 +16012,10 @@ Help:
|
|
|
16045
16012
|
sync: binding_.sync
|
|
16046
16013
|
},
|
|
16047
16014
|
CssChunkingPlugin: CssChunkingPlugin,
|
|
16048
|
-
createNativePlugin:
|
|
16015
|
+
createNativePlugin: function(name, resolve, affectedHooks) {
|
|
16016
|
+
if (INTERNAL_PLUGIN_NAMES.includes(name)) throw Error(`Cannot register native plugin with name '${name}', it conflicts with internal plugin names.`);
|
|
16017
|
+
return base_create(name, resolve, affectedHooks);
|
|
16018
|
+
},
|
|
16049
16019
|
VirtualModulesPlugin: VirtualModulesPlugin
|
|
16050
16020
|
};
|
|
16051
16021
|
function createCompiler(userOptions) {
|