@rspack-debug/browser 2.0.0-rc.0 → 2.0.0-rc.3
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/ModuleGraph.d.ts +2 -1
- package/dist/ModuleGraphConnection.d.ts +10 -0
- package/dist/builtin-plugin/HashedModuleIdsPlugin.d.ts +10 -0
- package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +9 -9
- package/dist/builtin-plugin/index.d.ts +1 -1
- package/dist/config/adapterRuleUse.d.ts +1 -1
- package/dist/config/devServer.d.ts +2 -2
- package/dist/config/normalization.d.ts +2 -1
- package/dist/config/types.d.ts +56 -20
- package/dist/exports.d.ts +9 -1
- package/dist/index.js +181 -90
- package/dist/napi-binding.d.ts +26 -14
- package/dist/rspack.wasi-browser.js +8 -3
- package/dist/wasi-worker-browser.mjs +348 -59
- package/dist/web/JsonpTemplatePlugin.d.ts +13 -0
- package/dist/webworker/WebWorkerTemplatePlugin.d.ts +13 -0
- package/package.json +4 -2
- package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +0 -7
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! LICENSE: index.js.LICENSE.txt */
|
|
2
|
-
import rspack_wasi_browser, { AsyncDependenciesBlock, BuiltinPluginName as external_rspack_wasi_browser_js_BuiltinPluginName, Chunk, ChunkGraph, Chunks as external_rspack_wasi_browser_js_Chunks, ConcatenatedModule, ContextModule, Dependency, EnforceExtension, EntryDependency, ExternalModule, JsCoordinator, JsLoaderState, JsRspackSeverity, Module, NormalModule, RawRuleSetConditionType, RegisterJsTapKind, ResolverFactory as external_rspack_wasi_browser_js_ResolverFactory, async as external_rspack_wasi_browser_js_async, cleanupGlobalTrace, formatDiagnostic, registerGlobalTrace, sync, syncTraceEvent, transformSync as external_rspack_wasi_browser_js_transformSync } from "./rspack.wasi-browser.js";
|
|
2
|
+
import rspack_wasi_browser, { AsyncDependenciesBlock, BuiltinPluginName as external_rspack_wasi_browser_js_BuiltinPluginName, Chunk, ChunkGraph, Chunks as external_rspack_wasi_browser_js_Chunks, ConcatenatedModule, ContextModule, Dependency, EnforceExtension, EntryDependency, ExternalModule, JsCoordinator, JsLoaderState, JsRspackSeverity, Module, ModuleGraphConnection, NormalModule, RawRuleSetConditionType, RegisterJsTapKind, ResolverFactory as external_rspack_wasi_browser_js_ResolverFactory, async as external_rspack_wasi_browser_js_async, cleanupGlobalTrace, formatDiagnostic, registerGlobalTrace, sync, syncTraceEvent, transformSync as external_rspack_wasi_browser_js_transformSync } from "./rspack.wasi-browser.js";
|
|
3
3
|
import { AsyncParallelHook, AsyncSeriesBailHook, HookMap, SyncBailHook, SyncHook, SyncWaterfallHook } from "@rspack/lite-tapable";
|
|
4
4
|
import * as __rspack_external__rspack_wasi_browser_js_bd433424 from "./rspack.wasi-browser.js";
|
|
5
5
|
import * as __rspack_external__rspack_lite_tapable_c6bdf810 from "@rspack/lite-tapable";
|
|
@@ -2485,7 +2485,6 @@ __webpack_require__.add({
|
|
|
2485
2485
|
if (y < x) return 1;
|
|
2486
2486
|
return 0;
|
|
2487
2487
|
}
|
|
2488
|
-
var ONLY_ENUMERABLE = void 0;
|
|
2489
2488
|
var kStrict = true;
|
|
2490
2489
|
var kLoose = false;
|
|
2491
2490
|
var kNoIterator = 0;
|
|
@@ -2535,8 +2534,8 @@ __webpack_require__.add({
|
|
|
2535
2534
|
if (val1Tag !== val2Tag) return false;
|
|
2536
2535
|
if (Array.isArray(val1)) {
|
|
2537
2536
|
if (val1.length !== val2.length) return false;
|
|
2538
|
-
var keys1 = getOwnNonIndexProperties(val1
|
|
2539
|
-
var keys2 = getOwnNonIndexProperties(val2
|
|
2537
|
+
var keys1 = getOwnNonIndexProperties(val1);
|
|
2538
|
+
var keys2 = getOwnNonIndexProperties(val2);
|
|
2540
2539
|
if (keys1.length !== keys2.length) return false;
|
|
2541
2540
|
return keyCheck(val1, val2, strict, memos, kIsArray, keys1);
|
|
2542
2541
|
}
|
|
@@ -2553,8 +2552,8 @@ __webpack_require__.add({
|
|
|
2553
2552
|
if (!strict && (isFloat32Array(val1) || isFloat64Array(val1))) {
|
|
2554
2553
|
if (!areSimilarFloatArrays(val1, val2)) return false;
|
|
2555
2554
|
} else if (!areSimilarTypedArrays(val1, val2)) return false;
|
|
2556
|
-
var _keys = getOwnNonIndexProperties(val1
|
|
2557
|
-
var _keys2 = getOwnNonIndexProperties(val2
|
|
2555
|
+
var _keys = getOwnNonIndexProperties(val1);
|
|
2556
|
+
var _keys2 = getOwnNonIndexProperties(val2);
|
|
2558
2557
|
if (_keys.length !== _keys2.length) return false;
|
|
2559
2558
|
return keyCheck(val1, val2, strict, memos, kNoIterator, _keys);
|
|
2560
2559
|
} else if (isSet(val1)) {
|
|
@@ -17867,7 +17866,7 @@ __webpack_require__.add({
|
|
|
17867
17866
|
var c0_lo = hl;
|
|
17868
17867
|
var c1_hi = s1_512_hi(eh, el);
|
|
17869
17868
|
var c1_lo = s1_512_lo(eh, el);
|
|
17870
|
-
var c2_hi = ch64_hi(eh, el, fh, fl, gh
|
|
17869
|
+
var c2_hi = ch64_hi(eh, el, fh, fl, gh);
|
|
17871
17870
|
var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl);
|
|
17872
17871
|
var c3_hi = this.k[i];
|
|
17873
17872
|
var c3_lo = this.k[i + 1];
|
|
@@ -17877,7 +17876,7 @@ __webpack_require__.add({
|
|
|
17877
17876
|
var T1_lo = sum64_5_lo(c0_hi, c0_lo, c1_hi, c1_lo, c2_hi, c2_lo, c3_hi, c3_lo, c4_hi, c4_lo);
|
|
17878
17877
|
c0_hi = s0_512_hi(ah, al);
|
|
17879
17878
|
c0_lo = s0_512_lo(ah, al);
|
|
17880
|
-
c1_hi = maj64_hi(ah, al, bh, bl, ch
|
|
17879
|
+
c1_hi = maj64_hi(ah, al, bh, bl, ch);
|
|
17881
17880
|
c1_lo = maj64_lo(ah, al, bh, bl, ch, cl);
|
|
17882
17881
|
var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo);
|
|
17883
17882
|
var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo);
|
|
@@ -35360,7 +35359,7 @@ __webpack_require__.add({
|
|
|
35360
35359
|
__webpack_require__.d(__webpack_exports__, {
|
|
35361
35360
|
Buffer: ()=>_napi_rs_wasm_runtime_fs__rspack_import_0.hp
|
|
35362
35361
|
});
|
|
35363
|
-
var _napi_rs_wasm_runtime_fs__rspack_import_0 = __webpack_require__("../../node_modules/.pnpm/@napi-rs+wasm-runtime@1.1.
|
|
35362
|
+
var _napi_rs_wasm_runtime_fs__rspack_import_0 = __webpack_require__("../../node_modules/.pnpm/@napi-rs+wasm-runtime@1.1.3_@emnapi+core@1.9.2_@emnapi+runtime@1.9.2/node_modules/@napi-rs/wasm-runtime/dist/fs.js");
|
|
35364
35363
|
},
|
|
35365
35364
|
"./src/browser/fs.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
35366
35365
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -35376,15 +35375,15 @@ __webpack_require__.add({
|
|
|
35376
35375
|
volume: ()=>volume,
|
|
35377
35376
|
watch: ()=>watch
|
|
35378
35377
|
});
|
|
35379
|
-
var _napi_rs_wasm_runtime_fs__rspack_import_0 = __webpack_require__("../../node_modules/.pnpm/@napi-rs+wasm-runtime@1.1.
|
|
35380
|
-
var _rspack_binding__rspack_import_1 = __webpack_require__("@rspack/binding?
|
|
35378
|
+
var _napi_rs_wasm_runtime_fs__rspack_import_0 = __webpack_require__("../../node_modules/.pnpm/@napi-rs+wasm-runtime@1.1.3_@emnapi+core@1.9.2_@emnapi+runtime@1.9.2/node_modules/@napi-rs/wasm-runtime/dist/fs.js");
|
|
35379
|
+
var _rspack_binding__rspack_import_1 = __webpack_require__("@rspack/binding?f5f3");
|
|
35381
35380
|
const fs = _rspack_binding__rspack_import_1.__fs;
|
|
35382
35381
|
const volume = _rspack_binding__rspack_import_1.__volume;
|
|
35383
35382
|
const memfs = _napi_rs_wasm_runtime_fs__rspack_import_0.tO;
|
|
35384
35383
|
const { readFileSync, readdirSync, lstat, existsSync, readdir, watch } = fs;
|
|
35385
35384
|
const __rspack_default_export = fs;
|
|
35386
35385
|
},
|
|
35387
|
-
"@rspack/binding?
|
|
35386
|
+
"@rspack/binding?f5f3" (module) {
|
|
35388
35387
|
module.exports = __rspack_external__rspack_wasi_browser_js_bd433424;
|
|
35389
35388
|
},
|
|
35390
35389
|
"?7763" () {},
|
|
@@ -35404,7 +35403,7 @@ __webpack_require__.add({
|
|
|
35404
35403
|
return out;
|
|
35405
35404
|
};
|
|
35406
35405
|
},
|
|
35407
|
-
"../../node_modules/.pnpm/@napi-rs+wasm-runtime@1.1.
|
|
35406
|
+
"../../node_modules/.pnpm/@napi-rs+wasm-runtime@1.1.3_@emnapi+core@1.9.2_@emnapi+runtime@1.9.2/node_modules/@napi-rs/wasm-runtime/dist/fs.js" (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
35408
35407
|
__webpack_require__.d(__webpack_exports__, {
|
|
35409
35408
|
hp: ()=>Buffer,
|
|
35410
35409
|
tO: ()=>memfs
|
|
@@ -38551,7 +38550,7 @@ __webpack_require__.add({
|
|
|
38551
38550
|
const getgid = ()=>process_1.default.getgid?.() ?? 0;
|
|
38552
38551
|
const EMPTY_BUFFER = (0, buffer_1.bufferAllocUnsafe)(0);
|
|
38553
38552
|
let Node$1 = class {
|
|
38554
|
-
constructor(ino, mode = 0o666){
|
|
38553
|
+
constructor(ino, mode = 0o666, uid = getuid(), gid = getgid()){
|
|
38555
38554
|
this.changes = new fanout_1.FanOut();
|
|
38556
38555
|
this._uid = getuid();
|
|
38557
38556
|
this._gid = getgid();
|
|
@@ -38565,6 +38564,8 @@ __webpack_require__.add({
|
|
|
38565
38564
|
this._nlink = 1;
|
|
38566
38565
|
this.mode = mode;
|
|
38567
38566
|
this.ino = ino;
|
|
38567
|
+
this._uid = uid;
|
|
38568
|
+
this._gid = gid;
|
|
38568
38569
|
}
|
|
38569
38570
|
set ctime(ctime) {
|
|
38570
38571
|
this._ctime = ctime;
|
|
@@ -42012,17 +42013,17 @@ __webpack_require__.add({
|
|
|
42012
42013
|
const pathJoin = path_1.posix ? path_1.posix.join : path_1.join;
|
|
42013
42014
|
const { O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_EXCL, O_TRUNC, O_APPEND, O_DIRECTORY } = fs_node_utils_1.constants;
|
|
42014
42015
|
let Superblock$1 = class Superblock {
|
|
42015
|
-
static fromJSON(json, cwd) {
|
|
42016
|
-
const vol = new Superblock();
|
|
42016
|
+
static fromJSON(json, cwd, opts) {
|
|
42017
|
+
const vol = new Superblock(opts);
|
|
42017
42018
|
vol.fromJSON(json, cwd);
|
|
42018
42019
|
return vol;
|
|
42019
42020
|
}
|
|
42020
|
-
static fromNestedJSON(json, cwd) {
|
|
42021
|
-
const vol = new Superblock();
|
|
42021
|
+
static fromNestedJSON(json, cwd, opts) {
|
|
42022
|
+
const vol = new Superblock(opts);
|
|
42022
42023
|
vol.fromNestedJSON(json, cwd);
|
|
42023
42024
|
return vol;
|
|
42024
42025
|
}
|
|
42025
|
-
constructor(
|
|
42026
|
+
constructor(opts = {}){
|
|
42026
42027
|
this.ino = 0;
|
|
42027
42028
|
this.inodes = {};
|
|
42028
42029
|
this.releasedInos = [];
|
|
@@ -42204,6 +42205,7 @@ __webpack_require__.add({
|
|
|
42204
42205
|
const file = this.getFileByFdOrThrow(fd, 'close');
|
|
42205
42206
|
this.closeFile(file);
|
|
42206
42207
|
};
|
|
42208
|
+
this.process = opts.process ?? process_1.default;
|
|
42207
42209
|
const root = this.createLink();
|
|
42208
42210
|
root.setNode(this.createNode(0o777 | fs_node_utils_1.constants.S_IFDIR));
|
|
42209
42211
|
root.setChild('.', root);
|
|
@@ -42240,7 +42242,9 @@ __webpack_require__.add({
|
|
|
42240
42242
|
return 'number' == typeof releasedFd ? releasedFd : Superblock.fd--;
|
|
42241
42243
|
}
|
|
42242
42244
|
createNode(mode) {
|
|
42243
|
-
const
|
|
42245
|
+
const uid = this.process.getuid?.() ?? 0;
|
|
42246
|
+
const gid = this.process.getgid?.() ?? 0;
|
|
42247
|
+
const node = new Node_1.Node(this.newInoNumber(), mode, uid, gid);
|
|
42244
42248
|
this.inodes[node.ino] = node;
|
|
42245
42249
|
return node;
|
|
42246
42250
|
}
|
|
@@ -42264,10 +42268,12 @@ __webpack_require__.add({
|
|
|
42264
42268
|
}
|
|
42265
42269
|
let curr = this.root;
|
|
42266
42270
|
let i = 0;
|
|
42271
|
+
const uid = this.process.getuid?.() ?? 0;
|
|
42272
|
+
const gid = this.process.getgid?.() ?? 0;
|
|
42267
42273
|
while(i < steps.length){
|
|
42268
42274
|
let node = curr.getNode();
|
|
42269
42275
|
if (node.isDirectory()) {
|
|
42270
|
-
if (checkAccess && !node.canExecute()) return (0, result_1.Err)((0, util_1.createStatError)("EACCES", funcName, filename));
|
|
42276
|
+
if (checkAccess && !node.canExecute(uid, gid)) return (0, result_1.Err)((0, util_1.createStatError)("EACCES", funcName, filename));
|
|
42271
42277
|
} else if (i < steps.length - 1) return (0, result_1.Err)((0, util_1.createStatError)("ENOTDIR", funcName, filename));
|
|
42272
42278
|
curr = curr.getChild(steps[i]) ?? null;
|
|
42273
42279
|
if (!curr) if (checkExistence) return (0, result_1.Err)((0, util_1.createStatError)("ENOENT", funcName, filename));
|
|
@@ -42281,7 +42287,7 @@ __webpack_require__.add({
|
|
|
42281
42287
|
continue;
|
|
42282
42288
|
}
|
|
42283
42289
|
if (checkExistence && !node.isDirectory() && i < steps.length - 1) {
|
|
42284
|
-
const errorCode = 'win32' ===
|
|
42290
|
+
const errorCode = 'win32' === this.process.platform ? "ENOENT" : "ENOTDIR";
|
|
42285
42291
|
return (0, result_1.Err)((0, util_1.createStatError)(errorCode, funcName, filename));
|
|
42286
42292
|
}
|
|
42287
42293
|
i++;
|
|
@@ -42385,7 +42391,7 @@ __webpack_require__.add({
|
|
|
42385
42391
|
for (const link of links)this._toJSON(link, json, isRelative ? link.getPath() : '', asBuffer);
|
|
42386
42392
|
return json;
|
|
42387
42393
|
}
|
|
42388
|
-
fromJSON(json, cwd =
|
|
42394
|
+
fromJSON(json, cwd = this.process.cwd()) {
|
|
42389
42395
|
for(let filename in json){
|
|
42390
42396
|
const data = json[filename];
|
|
42391
42397
|
filename = (0, util_1.resolve)(filename, cwd);
|
|
@@ -52126,8 +52132,9 @@ __webpack_require__.add({
|
|
|
52126
52132
|
});
|
|
52127
52133
|
results.push(...dirResults.map((r)=>path_1.posix.resolve(dir, r)));
|
|
52128
52134
|
} else {
|
|
52135
|
+
const normalizedPattern = pattern.replace(/^\.\//, '');
|
|
52129
52136
|
const dirResults = walkDirectory(fs, resolvedCwd, [
|
|
52130
|
-
|
|
52137
|
+
normalizedPattern
|
|
52131
52138
|
], globOptions);
|
|
52132
52139
|
results.push(...dirResults);
|
|
52133
52140
|
}
|
|
@@ -53300,8 +53307,8 @@ __webpack_require__.add({
|
|
|
53300
53307
|
}
|
|
53301
53308
|
}
|
|
53302
53309
|
volume.Volume = Volume;
|
|
53303
|
-
Volume.fromJSON = (json, cwd)=>new Volume(fs_core_1.Superblock.fromJSON(json, cwd));
|
|
53304
|
-
Volume.fromNestedJSON = (json, cwd)=>new Volume(fs_core_1.Superblock.fromNestedJSON(json, cwd));
|
|
53310
|
+
Volume.fromJSON = (json, cwd, opts)=>new Volume(fs_core_1.Superblock.fromJSON(json, cwd, opts));
|
|
53311
|
+
Volume.fromNestedJSON = (json, cwd, opts)=>new Volume(fs_core_1.Superblock.fromNestedJSON(json, cwd, opts));
|
|
53305
53312
|
function emitStop(self1) {
|
|
53306
53313
|
self1.emit('stop');
|
|
53307
53314
|
}
|
|
@@ -53358,6 +53365,7 @@ __webpack_require__.add({
|
|
|
53358
53365
|
if (void 0 === options.highWaterMark) options.highWaterMark = 65536;
|
|
53359
53366
|
stream_1.Readable.call(this, options);
|
|
53360
53367
|
this.path = (0, util_3.pathToFilename)(path);
|
|
53368
|
+
this._fileHandle = options.fd && 'number' != typeof options.fd ? options.fd : null;
|
|
53361
53369
|
this.fd = void 0 === options.fd ? null : 'number' != typeof options.fd ? options.fd.fd : options.fd;
|
|
53362
53370
|
this.flags = void 0 === options.flags ? 'r' : options.flags;
|
|
53363
53371
|
this.mode = void 0 === options.mode ? 0o666 : options.mode;
|
|
@@ -53437,7 +53445,8 @@ __webpack_require__.add({
|
|
|
53437
53445
|
}
|
|
53438
53446
|
if ('boolean' == typeof this._readableState?.closed) this._readableState.closed = true;
|
|
53439
53447
|
else this.closed = true;
|
|
53440
|
-
this.
|
|
53448
|
+
if (this._fileHandle) this._fileHandle.close().then(()=>this.emit('close'), (er)=>this.emit('error', er));
|
|
53449
|
+
else this._vol.close(this.fd, (er)=>{
|
|
53441
53450
|
if (er) this.emit('error', er);
|
|
53442
53451
|
else this.emit('close');
|
|
53443
53452
|
});
|
|
@@ -53454,6 +53463,7 @@ __webpack_require__.add({
|
|
|
53454
53463
|
options = Object.assign({}, (0, options_1.getOptions)(options, {}));
|
|
53455
53464
|
stream_1.Writable.call(this, options);
|
|
53456
53465
|
this.path = (0, util_3.pathToFilename)(path);
|
|
53466
|
+
this._fileHandle = options.fd && 'number' != typeof options.fd ? options.fd : null;
|
|
53457
53467
|
this.fd = void 0 === options.fd ? null : 'number' != typeof options.fd ? options.fd.fd : options.fd;
|
|
53458
53468
|
this.flags = void 0 === options.flags ? 'w' : options.flags;
|
|
53459
53469
|
this.mode = void 0 === options.mode ? 0o666 : options.mode;
|
|
@@ -53533,7 +53543,8 @@ __webpack_require__.add({
|
|
|
53533
53543
|
}
|
|
53534
53544
|
if ('boolean' == typeof this._writableState?.closed) this._writableState.closed = true;
|
|
53535
53545
|
else this.closed = true;
|
|
53536
|
-
this.
|
|
53546
|
+
if (this._fileHandle) this._fileHandle.close().then(()=>this.emit('close'), (er)=>this.emit('error', er));
|
|
53547
|
+
else this._vol.close(this.fd, (er)=>{
|
|
53537
53548
|
if (er) this.emit('error', er);
|
|
53538
53549
|
else this.emit('close');
|
|
53539
53550
|
});
|
|
@@ -53941,8 +53952,14 @@ __webpack_require__.add({
|
|
|
53941
53952
|
return fs;
|
|
53942
53953
|
}
|
|
53943
53954
|
exports$1.fs = createFsFromVolume(exports$1.vol);
|
|
53944
|
-
const memfs = (json = {},
|
|
53945
|
-
const
|
|
53955
|
+
const memfs = (json = {}, cwdOrOpts = '/')=>{
|
|
53956
|
+
const opts = 'string' == typeof cwdOrOpts ? {
|
|
53957
|
+
cwd: cwdOrOpts
|
|
53958
|
+
} : cwdOrOpts;
|
|
53959
|
+
const cwd = opts.cwd ?? (opts.process ? void 0 : '/');
|
|
53960
|
+
const vol = fs_node_1.Volume.fromNestedJSON(json, cwd, {
|
|
53961
|
+
process: opts.process
|
|
53962
|
+
});
|
|
53946
53963
|
const fs = createFsFromVolume(vol);
|
|
53947
53964
|
return {
|
|
53948
53965
|
fs,
|
|
@@ -54032,6 +54049,7 @@ __webpack_require__.d(exports_namespaceObject, {
|
|
|
54032
54049
|
LoaderTargetPlugin: ()=>LoaderTargetPlugin,
|
|
54033
54050
|
Module: ()=>Module,
|
|
54034
54051
|
ModuleFilenameHelpers: ()=>ModuleFilenameHelpers_namespaceObject,
|
|
54052
|
+
ModuleGraphConnection: ()=>ModuleGraphConnection_ModuleGraphConnection,
|
|
54035
54053
|
MultiCompiler: ()=>MultiCompiler,
|
|
54036
54054
|
MultiStats: ()=>MultiStats,
|
|
54037
54055
|
NoEmitOnErrorsPlugin: ()=>NoEmitOnErrorsPlugin,
|
|
@@ -54056,6 +54074,7 @@ __webpack_require__.d(exports_namespaceObject, {
|
|
|
54056
54074
|
container: ()=>container,
|
|
54057
54075
|
electron: ()=>electron,
|
|
54058
54076
|
experiments: ()=>exports_experiments,
|
|
54077
|
+
ids: ()=>ids,
|
|
54059
54078
|
javascript: ()=>javascript,
|
|
54060
54079
|
lazyCompilationMiddleware: ()=>lazyCompilationMiddleware,
|
|
54061
54080
|
library: ()=>exports_library,
|
|
@@ -55415,11 +55434,28 @@ function createDiagnosticArray(adm) {
|
|
|
55415
55434
|
adm[$proxy] = proxy;
|
|
55416
55435
|
return proxy;
|
|
55417
55436
|
}
|
|
55418
|
-
|
|
55437
|
+
function _to_primitive(input, hint) {
|
|
55438
|
+
if ("object" !== _type_of(input) || null === input) return input;
|
|
55439
|
+
var prim = input[Symbol.toPrimitive];
|
|
55440
|
+
if (void 0 !== prim) {
|
|
55441
|
+
var res = prim.call(input, hint || "default");
|
|
55442
|
+
if ("object" !== _type_of(res)) return res;
|
|
55443
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
55444
|
+
}
|
|
55445
|
+
return ("string" === hint ? String : Number)(input);
|
|
55446
|
+
}
|
|
55447
|
+
function _to_property_key(arg) {
|
|
55448
|
+
var key = _to_primitive(arg, "string");
|
|
55449
|
+
return "symbol" === _type_of(key) ? key : String(key);
|
|
55450
|
+
}
|
|
55451
|
+
function _type_of(obj) {
|
|
55452
|
+
return obj && "u" > typeof Symbol && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
55453
|
+
}
|
|
55454
|
+
let _computedKey, _computedKey1, _computedKey2;
|
|
55419
55455
|
const checkCompilation = (compilation)=>{
|
|
55420
55456
|
if (!(compilation instanceof Compilation)) throw new TypeError('The \'compilation\' argument must be an instance of Compilation. This usually occurs when multiple versions of "@rspack/core" are used, or when the code in "@rspack/core" is executed multiple times.');
|
|
55421
55457
|
};
|
|
55422
|
-
_computedKey = rspack_wasi_browser.COMPILATION_HOOKS_MAP_SYMBOL;
|
|
55458
|
+
_computedKey = _to_property_key(rspack_wasi_browser.COMPILATION_HOOKS_MAP_SYMBOL);
|
|
55423
55459
|
class Compilation {
|
|
55424
55460
|
#inner;
|
|
55425
55461
|
#shutdown;
|
|
@@ -56043,7 +56079,7 @@ class EntryData {
|
|
|
56043
56079
|
this.options = binding.options;
|
|
56044
56080
|
}
|
|
56045
56081
|
}
|
|
56046
|
-
_computedKey1 = Symbol.iterator, _computedKey2 = Symbol.toStringTag;
|
|
56082
|
+
_computedKey1 = _to_property_key(Symbol.iterator), _computedKey2 = _to_property_key(Symbol.toStringTag);
|
|
56047
56083
|
class Entries {
|
|
56048
56084
|
#data;
|
|
56049
56085
|
constructor(data){
|
|
@@ -56176,7 +56212,7 @@ const BannerPlugin = base_create(external_rspack_wasi_browser_js_BuiltinPluginNa
|
|
|
56176
56212
|
const BundlerInfoRspackPlugin = base_create(external_rspack_wasi_browser_js_BuiltinPluginName.BundlerInfoRspackPlugin, (options)=>({
|
|
56177
56213
|
version: options.version || 'unknown',
|
|
56178
56214
|
bundler: options.bundler || 'rspack',
|
|
56179
|
-
force: options.force ??
|
|
56215
|
+
force: options.force ?? false
|
|
56180
56216
|
}));
|
|
56181
56217
|
const CaseSensitivePlugin = base_create(external_rspack_wasi_browser_js_BuiltinPluginName.CaseSensitivePlugin, ()=>{}, 'compilation');
|
|
56182
56218
|
const ChunkPrefetchPreloadPlugin = base_create(external_rspack_wasi_browser_js_BuiltinPluginName.ChunkPrefetchPreloadPlugin, ()=>{});
|
|
@@ -56555,7 +56591,7 @@ function SplitChunksPlugin_toRawSplitChunksOptions(sc, compiler) {
|
|
|
56555
56591
|
if ('function' == typeof chunks) return (chunk)=>chunks(chunk);
|
|
56556
56592
|
return chunks;
|
|
56557
56593
|
}
|
|
56558
|
-
const { name, chunks, defaultSizeTypes, cacheGroups = {}, fallbackCacheGroup, minSize, minSizeReduction, maxSize, maxAsyncSize, maxInitialSize, ...passThrough } = sc;
|
|
56594
|
+
const { name, chunks, defaultSizeTypes, cacheGroups = {}, fallbackCacheGroup, minSize, minSizeReduction, enforceSizeThreshold, maxSize, maxAsyncSize, maxInitialSize, ...passThrough } = sc;
|
|
56559
56595
|
return {
|
|
56560
56596
|
name: getName(name),
|
|
56561
56597
|
chunks: getChunks(chunks),
|
|
@@ -56564,7 +56600,7 @@ function SplitChunksPlugin_toRawSplitChunksOptions(sc, compiler) {
|
|
|
56564
56600
|
'unknown'
|
|
56565
56601
|
],
|
|
56566
56602
|
cacheGroups: Object.entries(cacheGroups).filter(([_key, group])=>false !== group).map(([key, group])=>{
|
|
56567
|
-
const { test, name, chunks, minSize, minSizeReduction, maxSize, maxAsyncSize, maxInitialSize, ...passThrough } = group;
|
|
56603
|
+
const { test, name, chunks, minSize, minSizeReduction, enforceSizeThreshold, maxSize, maxAsyncSize, maxInitialSize, ...passThrough } = group;
|
|
56568
56604
|
const rawGroup = {
|
|
56569
56605
|
key,
|
|
56570
56606
|
test: getTest(test),
|
|
@@ -56572,6 +56608,7 @@ function SplitChunksPlugin_toRawSplitChunksOptions(sc, compiler) {
|
|
|
56572
56608
|
chunks: getChunks(chunks),
|
|
56573
56609
|
minSize: JsSplitChunkSizes.__to_binding(minSize),
|
|
56574
56610
|
minSizeReduction: JsSplitChunkSizes.__to_binding(minSizeReduction),
|
|
56611
|
+
enforceSizeThreshold: JsSplitChunkSizes.__to_binding(enforceSizeThreshold),
|
|
56575
56612
|
maxSize: JsSplitChunkSizes.__to_binding(maxSize),
|
|
56576
56613
|
maxAsyncSize: JsSplitChunkSizes.__to_binding(maxAsyncSize),
|
|
56577
56614
|
maxInitialSize: JsSplitChunkSizes.__to_binding(maxInitialSize),
|
|
@@ -56585,6 +56622,7 @@ function SplitChunksPlugin_toRawSplitChunksOptions(sc, compiler) {
|
|
|
56585
56622
|
},
|
|
56586
56623
|
minSize: JsSplitChunkSizes.__to_binding(minSize),
|
|
56587
56624
|
minSizeReduction: JsSplitChunkSizes.__to_binding(minSizeReduction),
|
|
56625
|
+
enforceSizeThreshold: JsSplitChunkSizes.__to_binding(enforceSizeThreshold),
|
|
56588
56626
|
maxSize: JsSplitChunkSizes.__to_binding(maxSize),
|
|
56589
56627
|
maxAsyncSize: JsSplitChunkSizes.__to_binding(maxAsyncSize),
|
|
56590
56628
|
maxInitialSize: JsSplitChunkSizes.__to_binding(maxInitialSize),
|
|
@@ -58352,11 +58390,7 @@ async function runLoaders(compiler, context) {
|
|
|
58352
58390
|
resource: resource
|
|
58353
58391
|
}
|
|
58354
58392
|
});
|
|
58355
|
-
if (parallelism) result = await service_run(
|
|
58356
|
-
loaderContext: getWorkerLoaderContext(),
|
|
58357
|
-
loaderState,
|
|
58358
|
-
args
|
|
58359
|
-
}, getWorkerLoaderHandlers(), 'object' == typeof currentLoaderObject?.parallel ? currentLoaderObject.parallel : void 0) || [];
|
|
58393
|
+
if (parallelism) result = await service_run(getWorkerLoaderContext(), getWorkerLoaderHandlers(), 'object' == typeof currentLoaderObject?.parallel && currentLoaderObject.parallel) || [];
|
|
58360
58394
|
else {
|
|
58361
58395
|
if (loaderState === JsLoaderState.Normal) convertArgs(args, !!currentLoaderObject?.raw);
|
|
58362
58396
|
result = await utils_runSyncOrAsync(fn, loaderContext, args) || [];
|
|
@@ -58661,15 +58695,15 @@ function tryMatch(payload, condition) {
|
|
|
58661
58695
|
return false;
|
|
58662
58696
|
}
|
|
58663
58697
|
const getRawModuleRule = (rule, path, options, upperType)=>{
|
|
58664
|
-
|
|
58698
|
+
const normalizedUse = rule.loader ? [
|
|
58665
58699
|
{
|
|
58666
58700
|
loader: rule.loader,
|
|
58667
58701
|
options: rule.options
|
|
58668
58702
|
}
|
|
58669
|
-
];
|
|
58703
|
+
] : rule.use;
|
|
58670
58704
|
let funcUse;
|
|
58671
|
-
if ('function' == typeof
|
|
58672
|
-
const use =
|
|
58705
|
+
if ('function' == typeof normalizedUse) {
|
|
58706
|
+
const use = normalizedUse;
|
|
58673
58707
|
funcUse = (rawContext)=>{
|
|
58674
58708
|
const context = {
|
|
58675
58709
|
...rawContext,
|
|
@@ -58700,7 +58734,7 @@ const getRawModuleRule = (rule, path, options, upperType)=>{
|
|
|
58700
58734
|
scheme: rule.scheme ? getRawRuleSetCondition(rule.scheme) : void 0,
|
|
58701
58735
|
mimetype: rule.mimetype ? getRawRuleSetCondition(rule.mimetype) : void 0,
|
|
58702
58736
|
sideEffects: rule.sideEffects,
|
|
58703
|
-
use: 'function' == typeof
|
|
58737
|
+
use: 'function' == typeof normalizedUse ? funcUse : createRawModuleRuleUses(normalizedUse ?? [], `${path}.use`, options),
|
|
58704
58738
|
type: rule.type,
|
|
58705
58739
|
layer: rule.layer,
|
|
58706
58740
|
parser: rule.parser ? getRawParserOptions(rule.parser, rule.type ?? upperType) : void 0,
|
|
@@ -58840,7 +58874,8 @@ function getRawJavascriptParserOptions(parser) {
|
|
|
58840
58874
|
typeReexportsPresence: parser.typeReexportsPresence,
|
|
58841
58875
|
jsx: parser.jsx,
|
|
58842
58876
|
deferImport: parser.deferImport,
|
|
58843
|
-
importMetaResolve: parser.importMetaResolve
|
|
58877
|
+
importMetaResolve: parser.importMetaResolve,
|
|
58878
|
+
pureFunctions: parser.pureFunctions
|
|
58844
58879
|
};
|
|
58845
58880
|
}
|
|
58846
58881
|
function getRawAssetParserOptions(parser) {
|
|
@@ -59096,6 +59131,9 @@ class FlagDependencyUsagePlugin extends RspackBuiltinPlugin {
|
|
|
59096
59131
|
return createBuiltinPlugin(this.name, this.global);
|
|
59097
59132
|
}
|
|
59098
59133
|
}
|
|
59134
|
+
const HashedModuleIdsPlugin = base_create(external_rspack_wasi_browser_js_BuiltinPluginName.HashedModuleIdsPlugin, (options)=>({
|
|
59135
|
+
...options
|
|
59136
|
+
}), 'compilation');
|
|
59099
59137
|
class HotModuleReplacementPlugin extends RspackBuiltinPlugin {
|
|
59100
59138
|
name = external_rspack_wasi_browser_js_BuiltinPluginName.HotModuleReplacementPlugin;
|
|
59101
59139
|
raw(compiler) {
|
|
@@ -59744,7 +59782,17 @@ const rsc = {
|
|
|
59744
59782
|
ssr: 'server-side-rendering'
|
|
59745
59783
|
}
|
|
59746
59784
|
};
|
|
59747
|
-
|
|
59785
|
+
class SideEffectsFlagPlugin extends RspackBuiltinPlugin {
|
|
59786
|
+
analyzeSideEffectsFree;
|
|
59787
|
+
name = external_rspack_wasi_browser_js_BuiltinPluginName.SideEffectsFlagPlugin;
|
|
59788
|
+
affectedHooks = 'compilation';
|
|
59789
|
+
constructor(analyzeSideEffectsFree = false){
|
|
59790
|
+
super(), this.analyzeSideEffectsFree = analyzeSideEffectsFree;
|
|
59791
|
+
}
|
|
59792
|
+
raw() {
|
|
59793
|
+
return createBuiltinPlugin(this.name, this.analyzeSideEffectsFree);
|
|
59794
|
+
}
|
|
59795
|
+
}
|
|
59748
59796
|
const SizeLimitsPlugin = base_create(external_rspack_wasi_browser_js_BuiltinPluginName.SizeLimitsPlugin, (options)=>{
|
|
59749
59797
|
const hints = false === options.hints ? void 0 : options.hints;
|
|
59750
59798
|
return {
|
|
@@ -59984,13 +60032,6 @@ const SwcJsMinimizerRspackPlugin = base_create(external_rspack_wasi_browser_js_B
|
|
|
59984
60032
|
};
|
|
59985
60033
|
}, 'compilation');
|
|
59986
60034
|
const URLPlugin = base_create(external_rspack_wasi_browser_js_BuiltinPluginName.URLPlugin, ()=>{}, 'compilation');
|
|
59987
|
-
class WebWorkerTemplatePlugin extends RspackBuiltinPlugin {
|
|
59988
|
-
name = external_rspack_wasi_browser_js_BuiltinPluginName.WebWorkerTemplatePlugin;
|
|
59989
|
-
raw(compiler) {
|
|
59990
|
-
compiler.options.output.chunkLoading = "import-scripts";
|
|
59991
|
-
return createBuiltinPlugin(this.name, void 0);
|
|
59992
|
-
}
|
|
59993
|
-
}
|
|
59994
60035
|
class WorkerPlugin extends RspackBuiltinPlugin {
|
|
59995
60036
|
chunkLoading;
|
|
59996
60037
|
wasmLoading;
|
|
@@ -60232,7 +60273,8 @@ const _cleverMerge = (first, second, internalCaching = false)=>{
|
|
|
60232
60273
|
const { static: firstInfo, dynamic: firstDynamicInfo } = firstObject;
|
|
60233
60274
|
let secondObj = second;
|
|
60234
60275
|
if (void 0 !== firstDynamicInfo) {
|
|
60235
|
-
let {
|
|
60276
|
+
let { fn } = firstDynamicInfo;
|
|
60277
|
+
const { byProperty } = firstDynamicInfo;
|
|
60236
60278
|
const fnInfo = fn[DYNAMIC_INFO];
|
|
60237
60279
|
if (fnInfo) {
|
|
60238
60280
|
secondObj = internalCaching ? cachedCleverMerge(fnInfo[1], second) : cleverMerge(fnInfo[1], second);
|
|
@@ -61314,6 +61356,7 @@ const mergeTargetProperties = (targetProperties)=>{
|
|
|
61314
61356
|
};
|
|
61315
61357
|
const getTargetsProperties = (targets, context)=>mergeTargetProperties(targets.map((t)=>getTargetProperties(t, context)));
|
|
61316
61358
|
var defaults_process = __webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");
|
|
61359
|
+
const ERROR_PREFIX = 'Invalid Rspack configuration:';
|
|
61317
61360
|
const applyRspackOptionsDefaults = (options)=>{
|
|
61318
61361
|
F(options, 'context', ()=>defaults_process.cwd());
|
|
61319
61362
|
F(options, 'target', ()=>getDefaultTarget(options.context));
|
|
@@ -61408,6 +61451,7 @@ const applyExperimentsDefaults = (experiments)=>{
|
|
|
61408
61451
|
D(experiments, 'buildHttp', void 0);
|
|
61409
61452
|
if (experiments.buildHttp && 'object' == typeof experiments.buildHttp) D(experiments.buildHttp, 'upgrade', false);
|
|
61410
61453
|
D(experiments, 'useInputFileSystem', false);
|
|
61454
|
+
D(experiments, 'pureFunctions', false);
|
|
61411
61455
|
};
|
|
61412
61456
|
const applyIncrementalDefaults = (options)=>{
|
|
61413
61457
|
D(options, 'incremental', {});
|
|
@@ -61724,6 +61768,10 @@ const applyOutputDefaults = (options, { context, targetProperties: tp, isAffecte
|
|
|
61724
61768
|
D(output, 'assetModuleFilename', '[hash][ext][query]');
|
|
61725
61769
|
D(output, 'webassemblyModuleFilename', '[hash].module.wasm');
|
|
61726
61770
|
D(output, 'compareBeforeEmit', true);
|
|
61771
|
+
if (output.path && !path_browserify_default().isAbsolute(output.path)) {
|
|
61772
|
+
if (!context) throw new Error(`${ERROR_PREFIX} "context" must be a non-empty absolute path when "output.path" is relative, get "${context ?? ''}".`);
|
|
61773
|
+
output.path = path_browserify_default().resolve(context, output.path);
|
|
61774
|
+
}
|
|
61727
61775
|
F(output, 'path', ()=>path_browserify_default().join(defaults_process.cwd(), 'dist'));
|
|
61728
61776
|
F(output, 'pathinfo', ()=>false);
|
|
61729
61777
|
D(output, 'publicPath', tp && (tp.document || tp.importScripts) ? 'auto' : '');
|
|
@@ -61834,9 +61882,9 @@ const applyOutputDefaults = (options, { context, targetProperties: tp, isAffecte
|
|
|
61834
61882
|
});
|
|
61835
61883
|
D(output, 'bundlerInfo', {});
|
|
61836
61884
|
if ('object' == typeof output.bundlerInfo) {
|
|
61837
|
-
D(output.bundlerInfo, 'version', "2.0.0-rc.
|
|
61885
|
+
D(output.bundlerInfo, 'version', "2.0.0-rc.3");
|
|
61838
61886
|
D(output.bundlerInfo, 'bundler', 'rspack');
|
|
61839
|
-
D(output.bundlerInfo, 'force',
|
|
61887
|
+
D(output.bundlerInfo, 'force', false);
|
|
61840
61888
|
}
|
|
61841
61889
|
};
|
|
61842
61890
|
const applyExternalsPresetsDefaults = (externalsPresets, { targetProperties, buildHttp, outputModule })=>{
|
|
@@ -61882,8 +61930,8 @@ const applyNodeDefaults = (node, { outputModule, targetProperties })=>{
|
|
|
61882
61930
|
};
|
|
61883
61931
|
const applyPerformanceDefaults = (performance, { production })=>{
|
|
61884
61932
|
if (false === performance) return;
|
|
61885
|
-
D(performance, 'maxAssetSize',
|
|
61886
|
-
D(performance, 'maxEntrypointSize',
|
|
61933
|
+
D(performance, 'maxAssetSize', 307200);
|
|
61934
|
+
D(performance, 'maxEntrypointSize', 512000);
|
|
61887
61935
|
F(performance, 'hints', ()=>production ? 'warning' : false);
|
|
61888
61936
|
};
|
|
61889
61937
|
const applyOptimizationDefaults = (optimization, { production, development })=>{
|
|
@@ -61932,6 +61980,7 @@ const applyOptimizationDefaults = (optimization, { production, development })=>{
|
|
|
61932
61980
|
D(splitChunks, 'usedExports', true === optimization.usedExports);
|
|
61933
61981
|
D(splitChunks, 'minChunks', 1);
|
|
61934
61982
|
F(splitChunks, 'minSize', ()=>production ? 20000 : 10000);
|
|
61983
|
+
F(splitChunks, 'enforceSizeThreshold', ()=>production ? 50000 : 30000);
|
|
61935
61984
|
F(splitChunks, 'maxAsyncRequests', ()=>production ? 30 : 1 / 0);
|
|
61936
61985
|
F(splitChunks, 'maxInitialRequests', ()=>production ? 30 : 1 / 0);
|
|
61937
61986
|
D(splitChunks, 'automaticNameDelimiter', '-');
|
|
@@ -63491,7 +63540,7 @@ class MultiStats {
|
|
|
63491
63540
|
return obj;
|
|
63492
63541
|
});
|
|
63493
63542
|
if (childOptions.version) {
|
|
63494
|
-
obj.rspackVersion = "2.0.0-rc.
|
|
63543
|
+
obj.rspackVersion = "2.0.0-rc.3";
|
|
63495
63544
|
obj.version = "5.75.0";
|
|
63496
63545
|
}
|
|
63497
63546
|
if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join('');
|
|
@@ -63606,8 +63655,25 @@ class MultiWatching {
|
|
|
63606
63655
|
}
|
|
63607
63656
|
}
|
|
63608
63657
|
const src_MultiWatching = MultiWatching;
|
|
63609
|
-
|
|
63610
|
-
|
|
63658
|
+
function ArrayQueue_to_primitive(input, hint) {
|
|
63659
|
+
if ("object" !== ArrayQueue_type_of(input) || null === input) return input;
|
|
63660
|
+
var prim = input[Symbol.toPrimitive];
|
|
63661
|
+
if (void 0 !== prim) {
|
|
63662
|
+
var res = prim.call(input, hint || "default");
|
|
63663
|
+
if ("object" !== ArrayQueue_type_of(res)) return res;
|
|
63664
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
63665
|
+
}
|
|
63666
|
+
return ("string" === hint ? String : Number)(input);
|
|
63667
|
+
}
|
|
63668
|
+
function ArrayQueue_to_property_key(arg) {
|
|
63669
|
+
var key = ArrayQueue_to_primitive(arg, "string");
|
|
63670
|
+
return "symbol" === ArrayQueue_type_of(key) ? key : String(key);
|
|
63671
|
+
}
|
|
63672
|
+
function ArrayQueue_type_of(obj) {
|
|
63673
|
+
return obj && "u" > typeof Symbol && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
63674
|
+
}
|
|
63675
|
+
let ArrayQueue_computedKey;
|
|
63676
|
+
ArrayQueue_computedKey = ArrayQueue_to_property_key(Symbol.iterator);
|
|
63611
63677
|
class ArrayQueue {
|
|
63612
63678
|
_list;
|
|
63613
63679
|
_listReversed;
|
|
@@ -65177,7 +65243,7 @@ const SIMPLE_EXTRACTORS = {
|
|
|
65177
65243
|
},
|
|
65178
65244
|
version: (object)=>{
|
|
65179
65245
|
object.version = "5.75.0";
|
|
65180
|
-
object.rspackVersion = "2.0.0-rc.
|
|
65246
|
+
object.rspackVersion = "2.0.0-rc.3";
|
|
65181
65247
|
},
|
|
65182
65248
|
env: (object, _compilation, _context, { _env })=>{
|
|
65183
65249
|
object.env = _env;
|
|
@@ -66754,7 +66820,7 @@ class RspackOptionsApply {
|
|
|
66754
66820
|
if (options.experiments.buildHttp) new HttpUriPlugin(options.experiments.buildHttp).apply(compiler);
|
|
66755
66821
|
new EnsureChunkConditionsPlugin().apply(compiler);
|
|
66756
66822
|
if (options.optimization.mergeDuplicateChunks) new MergeDuplicateChunksPlugin().apply(compiler);
|
|
66757
|
-
if (options.optimization.sideEffects) new SideEffectsFlagPlugin().apply(compiler);
|
|
66823
|
+
if (options.optimization.sideEffects) new SideEffectsFlagPlugin(options.experiments.pureFunctions).apply(compiler);
|
|
66758
66824
|
if (options.optimization.providedExports) new FlagDependencyExportsPlugin().apply(compiler);
|
|
66759
66825
|
if (options.optimization.usedExports) new FlagDependencyUsagePlugin('global' === options.optimization.usedExports).apply(compiler);
|
|
66760
66826
|
if (options.optimization.concatenateModules) new ModuleConcatenationPlugin().apply(compiler);
|
|
@@ -66791,6 +66857,9 @@ class RspackOptionsApply {
|
|
|
66791
66857
|
case 'deterministic':
|
|
66792
66858
|
new DeterministicModuleIdsPlugin().apply(compiler);
|
|
66793
66859
|
break;
|
|
66860
|
+
case 'hashed':
|
|
66861
|
+
new HashedModuleIdsPlugin().apply(compiler);
|
|
66862
|
+
break;
|
|
66794
66863
|
default:
|
|
66795
66864
|
throw new Error(`moduleIds: ${moduleIds} is not implemented`);
|
|
66796
66865
|
}
|
|
@@ -66838,17 +66907,14 @@ class RspackOptionsApply {
|
|
|
66838
66907
|
compiler.hooks.afterResolvers.call(compiler);
|
|
66839
66908
|
}
|
|
66840
66909
|
}
|
|
66841
|
-
const
|
|
66910
|
+
const validateConfig_ERROR_PREFIX = 'Invalid Rspack configuration:';
|
|
66842
66911
|
const validateContext = ({ context })=>{
|
|
66843
|
-
if (context && !(0, path_browserify.isAbsolute)(context)) throw new Error(`${
|
|
66844
|
-
};
|
|
66845
|
-
const validateOutputPath = ({ output })=>{
|
|
66846
|
-
if (output?.path && !(0, path_browserify.isAbsolute)(output.path)) throw new Error(`${ERROR_PREFIX} "output.path" must be an absolute path, get "${output.path}".`);
|
|
66912
|
+
if (context && !(0, path_browserify.isAbsolute)(context)) throw new Error(`${validateConfig_ERROR_PREFIX} "context" must be an absolute path, get "${context}".`);
|
|
66847
66913
|
};
|
|
66848
66914
|
const validateSplitChunks = ({ optimization })=>{
|
|
66849
66915
|
if (optimization?.splitChunks) {
|
|
66850
66916
|
const { minChunks } = optimization.splitChunks;
|
|
66851
|
-
if (void 0 !== minChunks && minChunks < 1) throw new Error(`${
|
|
66917
|
+
if (void 0 !== minChunks && minChunks < 1) throw new Error(`${validateConfig_ERROR_PREFIX} "optimization.splitChunks.minChunks" must be greater than or equal to 1, get \`${minChunks}\`.`);
|
|
66852
66918
|
}
|
|
66853
66919
|
};
|
|
66854
66920
|
const validateExternalUmd = ({ output, externals, externalsType })=>{
|
|
@@ -66867,14 +66933,13 @@ const validateExternalUmd = ({ output, externals, externalsType })=>{
|
|
|
66867
66933
|
'commonjs2',
|
|
66868
66934
|
'amd'
|
|
66869
66935
|
];
|
|
66870
|
-
if (requiredKeys.some((key)=>void 0 === value[key])) throw new Error(`${
|
|
66936
|
+
if (requiredKeys.some((key)=>void 0 === value[key])) throw new Error(`${validateConfig_ERROR_PREFIX} External object must have "root", "commonjs", "commonjs2", "amd" properties when "libraryType" or "externalsType" is "umd", get: ${JSON.stringify(value, null, 2)}.`);
|
|
66871
66937
|
};
|
|
66872
66938
|
if (Array.isArray(externals)) externals.forEach((external)=>checkExternalItem(external));
|
|
66873
66939
|
else checkExternalItem(externals);
|
|
66874
66940
|
};
|
|
66875
66941
|
function validateRspackConfig(config) {
|
|
66876
66942
|
validateContext(config);
|
|
66877
|
-
validateOutputPath(config);
|
|
66878
66943
|
validateSplitChunks(config);
|
|
66879
66944
|
validateExternalUmd(config);
|
|
66880
66945
|
}
|
|
@@ -67241,7 +67306,7 @@ const createCompilationHooksRegisters = (getCompiler, createTap, createMapTap)=>
|
|
|
67241
67306
|
return 'function' == typeof value ? value.bind(target) : value;
|
|
67242
67307
|
},
|
|
67243
67308
|
set (_target, prop, value) {
|
|
67244
|
-
if ('id' === prop &&
|
|
67309
|
+
if ('id' === prop && ('string' == typeof value || 'number' == typeof value)) {
|
|
67245
67310
|
assignments.set(m.identifier, value);
|
|
67246
67311
|
return true;
|
|
67247
67312
|
}
|
|
@@ -67251,10 +67316,7 @@ const createCompilationHooksRegisters = (getCompiler, createTap, createMapTap)=>
|
|
|
67251
67316
|
});
|
|
67252
67317
|
queried.call(proxiedModules);
|
|
67253
67318
|
return {
|
|
67254
|
-
assignments: Object.fromEntries(
|
|
67255
|
-
k,
|
|
67256
|
-
String(v)
|
|
67257
|
-
]))
|
|
67319
|
+
assignments: Object.fromEntries(assignments.entries())
|
|
67258
67320
|
};
|
|
67259
67321
|
};
|
|
67260
67322
|
}),
|
|
@@ -68420,7 +68482,7 @@ class Compiler {
|
|
|
68420
68482
|
const rawOptions = getRawOptions(options, this);
|
|
68421
68483
|
rawOptions.__references = Object.fromEntries(this.#ruleSet.builtinReferences.entries());
|
|
68422
68484
|
rawOptions.__virtual_files = VirtualModulesPlugin.__internal__take_virtual_files(this);
|
|
68423
|
-
const instanceBinding = __webpack_require__("@rspack/binding?
|
|
68485
|
+
const instanceBinding = __webpack_require__("@rspack/binding?f5f3");
|
|
68424
68486
|
this.#registers = this.#createHooksRegisters();
|
|
68425
68487
|
const inputFileSystem = this.inputFileSystem && ThreadsafeInputNodeFS.needsBinding(options.experiments.useInputFileSystem) ? ThreadsafeInputNodeFS.__to_binding(this.inputFileSystem) : void 0;
|
|
68426
68488
|
try {
|
|
@@ -68439,14 +68501,14 @@ class Compiler {
|
|
|
68439
68501
|
const createTap = this.#createHookRegisterTaps.bind(this);
|
|
68440
68502
|
const createMapTap = this.#createHookMapRegisterTaps.bind(this);
|
|
68441
68503
|
return {
|
|
68442
|
-
...createCompilerHooksRegisters(getCompiler, createTap
|
|
68504
|
+
...createCompilerHooksRegisters(getCompiler, createTap),
|
|
68443
68505
|
...createCompilationHooksRegisters(getCompiler, createTap, createMapTap),
|
|
68444
68506
|
...createNormalModuleFactoryHooksRegisters(getCompiler, createTap, createMapTap),
|
|
68445
|
-
...createContextModuleFactoryHooksRegisters(getCompiler, createTap
|
|
68446
|
-
...createJavaScriptModulesHooksRegisters(getCompiler, createTap
|
|
68447
|
-
...createHtmlPluginHooksRegisters(getCompiler, createTap
|
|
68448
|
-
...createRuntimePluginHooksRegisters(getCompiler, createTap
|
|
68449
|
-
...createRsdoctorPluginHooksRegisters(getCompiler, createTap
|
|
68507
|
+
...createContextModuleFactoryHooksRegisters(getCompiler, createTap),
|
|
68508
|
+
...createJavaScriptModulesHooksRegisters(getCompiler, createTap),
|
|
68509
|
+
...createHtmlPluginHooksRegisters(getCompiler, createTap),
|
|
68510
|
+
...createRuntimePluginHooksRegisters(getCompiler, createTap),
|
|
68511
|
+
...createRsdoctorPluginHooksRegisters(getCompiler, createTap)
|
|
68450
68512
|
};
|
|
68451
68513
|
}
|
|
68452
68514
|
#updateNonSkippableRegisters() {
|
|
@@ -68627,6 +68689,17 @@ Object.defineProperty(rspack_wasi_browser.ExternalModule.prototype, 'emitFile',
|
|
|
68627
68689
|
return this._emitFile(filename, SourceAdapter.toBinding(source), assetInfo);
|
|
68628
68690
|
}
|
|
68629
68691
|
});
|
|
68692
|
+
const ModuleGraphConnection_ModuleGraphConnection = ModuleGraphConnection;
|
|
68693
|
+
Object.defineProperties(ModuleGraphConnection_ModuleGraphConnection, {
|
|
68694
|
+
TRANSITIVE_ONLY: {
|
|
68695
|
+
value: rspack_wasi_browser.TRANSITIVE_ONLY_SYMBOL,
|
|
68696
|
+
enumerable: true
|
|
68697
|
+
},
|
|
68698
|
+
CIRCULAR_CONNECTION: {
|
|
68699
|
+
value: rspack_wasi_browser.CIRCULAR_CONNECTION_SYMBOL,
|
|
68700
|
+
enumerable: true
|
|
68701
|
+
}
|
|
68702
|
+
});
|
|
68630
68703
|
const asRegExp = (test)=>{
|
|
68631
68704
|
if ('string' == typeof test) return new RegExp(`^${test.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')}`);
|
|
68632
68705
|
return test;
|
|
@@ -68795,6 +68868,13 @@ class LoaderTargetPlugin {
|
|
|
68795
68868
|
});
|
|
68796
68869
|
}
|
|
68797
68870
|
}
|
|
68871
|
+
class JsonpTemplatePlugin {
|
|
68872
|
+
apply(compiler) {
|
|
68873
|
+
compiler.options.output.chunkLoading = 'jsonp';
|
|
68874
|
+
new ArrayPushCallbackChunkFormatPlugin().apply(compiler);
|
|
68875
|
+
new EnableChunkLoadingPlugin('jsonp').apply(compiler);
|
|
68876
|
+
}
|
|
68877
|
+
}
|
|
68798
68878
|
class NodeTemplatePlugin {
|
|
68799
68879
|
_options;
|
|
68800
68880
|
constructor(_options = {}){
|
|
@@ -68807,6 +68887,13 @@ class NodeTemplatePlugin {
|
|
|
68807
68887
|
new EnableChunkLoadingPlugin(chunkLoading).apply(compiler);
|
|
68808
68888
|
}
|
|
68809
68889
|
}
|
|
68890
|
+
class WebWorkerTemplatePlugin {
|
|
68891
|
+
apply(compiler) {
|
|
68892
|
+
compiler.options.output.chunkLoading = "import-scripts";
|
|
68893
|
+
new ArrayPushCallbackChunkFormatPlugin().apply(compiler);
|
|
68894
|
+
new EnableChunkLoadingPlugin("import-scripts").apply(compiler);
|
|
68895
|
+
}
|
|
68896
|
+
}
|
|
68810
68897
|
const options_process = (options, normalizeSimple, normalizeOptions, fn)=>{
|
|
68811
68898
|
const array = (items)=>{
|
|
68812
68899
|
for (const item of items)if ('string' == typeof item) fn(item, normalizeSimple(item, item));
|
|
@@ -69653,7 +69740,7 @@ class ModuleFederationPlugin {
|
|
|
69653
69740
|
this._options = _options;
|
|
69654
69741
|
}
|
|
69655
69742
|
apply(compiler) {
|
|
69656
|
-
const {
|
|
69743
|
+
const { rspack } = compiler;
|
|
69657
69744
|
const paths = getPaths(this._options, compiler);
|
|
69658
69745
|
compiler.options.resolve.alias = {
|
|
69659
69746
|
'@module-federation/runtime-tools': paths.runtimeTools,
|
|
@@ -69710,7 +69797,7 @@ class ModuleFederationPlugin {
|
|
|
69710
69797
|
shared: this._options.shared,
|
|
69711
69798
|
enhanced: true
|
|
69712
69799
|
};
|
|
69713
|
-
new
|
|
69800
|
+
new rspack.container.ModuleFederationPluginV1(v1Options).apply(compiler);
|
|
69714
69801
|
if (this._options.manifest) new ModuleFederationManifestPlugin(this._options).apply(compiler);
|
|
69715
69802
|
}
|
|
69716
69803
|
}
|
|
@@ -69985,7 +70072,7 @@ function transformSync(source, options) {
|
|
|
69985
70072
|
const _options = JSON.stringify(options || {});
|
|
69986
70073
|
return rspack_wasi_browser.transformSync(source, _options);
|
|
69987
70074
|
}
|
|
69988
|
-
const exports_rspackVersion = "2.0.0-rc.
|
|
70075
|
+
const exports_rspackVersion = "2.0.0-rc.3";
|
|
69989
70076
|
const exports_version = "5.75.0";
|
|
69990
70077
|
const exports_WebpackError = Error;
|
|
69991
70078
|
const exports_config = {
|
|
@@ -69999,7 +70086,8 @@ const util = {
|
|
|
69999
70086
|
cleverMerge: cachedCleverMerge
|
|
70000
70087
|
};
|
|
70001
70088
|
const web = {
|
|
70002
|
-
FetchCompileAsyncWasmPlugin: FetchCompileAsyncWasmPlugin
|
|
70089
|
+
FetchCompileAsyncWasmPlugin: FetchCompileAsyncWasmPlugin,
|
|
70090
|
+
JsonpTemplatePlugin: JsonpTemplatePlugin
|
|
70003
70091
|
};
|
|
70004
70092
|
const exports_node = {
|
|
70005
70093
|
NodeTargetPlugin: NodeTargetPlugin,
|
|
@@ -70009,6 +70097,9 @@ const exports_node = {
|
|
|
70009
70097
|
const electron = {
|
|
70010
70098
|
ElectronTargetPlugin: ElectronTargetPlugin
|
|
70011
70099
|
};
|
|
70100
|
+
const ids = {
|
|
70101
|
+
HashedModuleIdsPlugin: HashedModuleIdsPlugin
|
|
70102
|
+
};
|
|
70012
70103
|
const exports_library = {
|
|
70013
70104
|
EnableLibraryPlugin: EnableLibraryPlugin
|
|
70014
70105
|
};
|
|
@@ -70246,4 +70337,4 @@ const builtinMemFs = {
|
|
|
70246
70337
|
volume: fs_0.volume,
|
|
70247
70338
|
memfs: fs_0.memfs
|
|
70248
70339
|
};
|
|
70249
|
-
export { AsyncDependenciesBlock, BannerPlugin, BrowserHttpImportEsmPlugin, BrowserRequirePlugin, CaseSensitivePlugin, CircularDependencyRspackPlugin, Compilation, Compiler, ConcatenatedModule, ContextModule, ContextReplacementPlugin, CopyRspackPlugin, CssExtractRspackPlugin, DefaultRuntimeGlobals as RuntimeGlobals, DefinePlugin, Dependency, DllPlugin, DllReferencePlugin, DynamicEntryPlugin, EntryDependency, EntryPlugin, EnvironmentPlugin, EvalDevToolModulePlugin, EvalSourceMapDevToolPlugin, ExternalModule, ExternalsPlugin, HotModuleReplacementPlugin, HtmlRspackPlugin, IgnorePlugin, LightningCssMinimizerRspackPlugin, LoaderOptionsPlugin, LoaderTargetPlugin, Module, ModuleFilenameHelpers_namespaceObject as ModuleFilenameHelpers, MultiCompiler, MultiStats, NoEmitOnErrorsPlugin, NormalModule, NormalModuleReplacementPlugin, ProgressPlugin, ProvidePlugin, RspackOptionsApply, RspackOptionsApply as WebpackOptionsApply, RuntimeModule, RuntimePlugin, SourceMapDevToolPlugin, Stats, SubresourceIntegrityPlugin, SwcJsMinimizerRspackPlugin, Template, ValidationError, builtinMemFs, container, electron, exports_WebpackError as WebpackError, exports_config as config, exports_experiments as experiments, exports_library as library, exports_node as node, exports_rspackVersion as rspackVersion, exports_version as version, exports_wasm as wasm, javascript, lazyCompilationMiddleware, lib_EntryOptionPlugin as EntryOptionPlugin, optimize, sharing, src_rspack_0 as "module.exports", src_rspack_0 as rspack, statsFactoryUtils_StatsErrorCode as StatsErrorCode, util, web, webpack_sources_lib as sources, webworker };
|
|
70340
|
+
export { AsyncDependenciesBlock, BannerPlugin, BrowserHttpImportEsmPlugin, BrowserRequirePlugin, CaseSensitivePlugin, CircularDependencyRspackPlugin, Compilation, Compiler, ConcatenatedModule, ContextModule, ContextReplacementPlugin, CopyRspackPlugin, CssExtractRspackPlugin, DefaultRuntimeGlobals as RuntimeGlobals, DefinePlugin, Dependency, DllPlugin, DllReferencePlugin, DynamicEntryPlugin, EntryDependency, EntryPlugin, EnvironmentPlugin, EvalDevToolModulePlugin, EvalSourceMapDevToolPlugin, ExternalModule, ExternalsPlugin, HotModuleReplacementPlugin, HtmlRspackPlugin, IgnorePlugin, LightningCssMinimizerRspackPlugin, LoaderOptionsPlugin, LoaderTargetPlugin, Module, ModuleFilenameHelpers_namespaceObject as ModuleFilenameHelpers, ModuleGraphConnection_ModuleGraphConnection as ModuleGraphConnection, MultiCompiler, MultiStats, NoEmitOnErrorsPlugin, NormalModule, NormalModuleReplacementPlugin, ProgressPlugin, ProvidePlugin, RspackOptionsApply, RspackOptionsApply as WebpackOptionsApply, RuntimeModule, RuntimePlugin, SourceMapDevToolPlugin, Stats, SubresourceIntegrityPlugin, SwcJsMinimizerRspackPlugin, Template, ValidationError, builtinMemFs, container, electron, exports_WebpackError as WebpackError, exports_config as config, exports_experiments as experiments, exports_library as library, exports_node as node, exports_rspackVersion as rspackVersion, exports_version as version, exports_wasm as wasm, ids, javascript, lazyCompilationMiddleware, lib_EntryOptionPlugin as EntryOptionPlugin, optimize, sharing, src_rspack_0 as "module.exports", src_rspack_0 as rspack, statsFactoryUtils_StatsErrorCode as StatsErrorCode, util, web, webpack_sources_lib as sources, webworker };
|