@rspack-canary/browser 1.6.0-canary-beafb11e-20251019174144 → 1.6.0-canary-0eb13821-20251021173640
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/Compiler.d.ts +8 -0
- package/dist/MultiCompiler.d.ts +1 -0
- package/dist/RuntimeGlobals.d.ts +3 -0
- package/dist/Watching.d.ts +9 -0
- package/dist/builtin-plugin/EsmLibraryPlugin.d.ts +6 -0
- package/dist/config/defaults.d.ts +0 -9
- package/dist/config/normalization.d.ts +2 -0
- package/dist/config/types.d.ts +12 -2
- package/dist/index.mjs +112 -121
- package/dist/loader-runner/ModuleError.d.ts +7 -1
- package/dist/napi-binding.d.ts +8 -1
- package/dist/rspack.wasm32-wasi.wasm +0 -0
- package/dist/stats/DefaultStatsFactoryPlugin.d.ts +16 -0
- package/package.json +1 -1
- package/dist/loader-runner/ModuleWarning.d.ts +0 -7
package/dist/Compiler.d.ts
CHANGED
|
@@ -107,6 +107,14 @@ declare class Compiler {
|
|
|
107
107
|
cache: Cache;
|
|
108
108
|
compilerPath: string;
|
|
109
109
|
options: RspackOptionsNormalized;
|
|
110
|
+
/**
|
|
111
|
+
* Whether to skip dropping Rust compiler instance to improve performance.
|
|
112
|
+
* This is an internal option api and could be removed or changed at any time.
|
|
113
|
+
* @internal
|
|
114
|
+
* true: Skip dropping Rust compiler instance.
|
|
115
|
+
* false: Drop Rust compiler instance when Compiler is garbage collected.
|
|
116
|
+
*/
|
|
117
|
+
unsafeFastDrop: boolean;
|
|
110
118
|
/**
|
|
111
119
|
* Note: This is not a webpack public API, maybe removed in future.
|
|
112
120
|
* @internal
|
package/dist/MultiCompiler.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export declare class MultiCompiler {
|
|
|
41
41
|
running: boolean;
|
|
42
42
|
watching?: MultiWatching;
|
|
43
43
|
constructor(compilers: Compiler[] | Record<string, Compiler>, options?: MultiCompilerOptions);
|
|
44
|
+
set unsafeFastDrop(value: boolean);
|
|
44
45
|
get options(): import(".").RspackOptionsNormalized[] & MultiCompilerOptions;
|
|
45
46
|
get outputPath(): string;
|
|
46
47
|
get inputFileSystem(): InputFileSystem;
|
package/dist/RuntimeGlobals.d.ts
CHANGED
|
@@ -321,5 +321,8 @@ export declare const RuntimeGlobals: {
|
|
|
321
321
|
* ) =\> void
|
|
322
322
|
*/
|
|
323
323
|
readonly asyncModule: "__webpack_require__.a";
|
|
324
|
+
readonly asyncModuleExportSymbol: "__webpack_require__.aE";
|
|
325
|
+
readonly makeDeferredNamespaceObject: "__webpack_require__.z";
|
|
326
|
+
readonly makeDeferredNamespaceObjectSymbol: "__webpack_require__.zS";
|
|
324
327
|
};
|
|
325
328
|
export declare const isReservedRuntimeGlobal: (r: string) => boolean;
|
package/dist/Watching.d.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The following code is modified based on
|
|
3
|
+
* https://github.com/webpack/webpack/blob/4b4ca3b/lib/Watching.js
|
|
4
|
+
*
|
|
5
|
+
* MIT Licensed
|
|
6
|
+
* Author Tobias Koppers @sokra
|
|
7
|
+
* Copyright (c) JS Foundation and other contributors
|
|
8
|
+
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
|
+
*/
|
|
1
10
|
import type { Callback } from "@rspack/lite-tapable";
|
|
2
11
|
import type { Compiler } from ".";
|
|
3
12
|
import { Stats } from ".";
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { Compiler } from "../Compiler";
|
|
2
2
|
export declare class EsmLibraryPlugin {
|
|
3
3
|
static PLUGIN_NAME: string;
|
|
4
|
+
options?: {
|
|
5
|
+
preserveModules?: string;
|
|
6
|
+
};
|
|
7
|
+
constructor(options?: {
|
|
8
|
+
preserveModules?: string;
|
|
9
|
+
});
|
|
4
10
|
apply(compiler: Compiler): void;
|
|
5
11
|
}
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The following code is modified based on
|
|
3
|
-
* https://github.com/webpack/webpack/blob/4b4ca3b/lib/config/defaults.js
|
|
4
|
-
*
|
|
5
|
-
* MIT Licensed
|
|
6
|
-
* Author Tobias Koppers @sokra
|
|
7
|
-
* Copyright (c) JS Foundation and other contributors
|
|
8
|
-
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
|
-
*/
|
|
10
1
|
import type { RspackOptionsNormalized } from "./normalization";
|
|
11
2
|
export declare const applyRspackOptionsDefaults: (options: RspackOptionsNormalized) => void;
|
|
12
3
|
export declare const applyRspackOptionsBaseDefaults: (options: RspackOptionsNormalized) => void;
|
|
@@ -76,6 +76,7 @@ export interface ModuleOptionsNormalized {
|
|
|
76
76
|
parser: ParserOptionsByModuleType;
|
|
77
77
|
generator: GeneratorOptionsByModuleType;
|
|
78
78
|
noParse?: NoParseOption;
|
|
79
|
+
unsafeCache?: boolean | RegExp;
|
|
79
80
|
}
|
|
80
81
|
export type ExperimentCacheNormalized = boolean | {
|
|
81
82
|
type: "memory";
|
|
@@ -121,6 +122,7 @@ export interface ExperimentsNormalized {
|
|
|
121
122
|
typeReexportsPresence?: boolean;
|
|
122
123
|
lazyBarrel?: boolean;
|
|
123
124
|
nativeWatcher?: boolean;
|
|
125
|
+
deferImport?: boolean;
|
|
124
126
|
}
|
|
125
127
|
export type IgnoreWarningsNormalized = ((warning: WebpackError, compilation: Compilation) => boolean)[];
|
|
126
128
|
export type OptimizationRuntimeChunkNormalized = false | {
|
package/dist/config/types.d.ts
CHANGED
|
@@ -818,6 +818,8 @@ export type JavascriptParserOptions = {
|
|
|
818
818
|
typeReexportsPresence?: "no-tolerant" | "tolerant" | "tolerant-no-check";
|
|
819
819
|
/** Whether to enable JSX parsing */
|
|
820
820
|
jsx?: boolean;
|
|
821
|
+
/** Whether to enable defer import */
|
|
822
|
+
deferImport?: boolean;
|
|
821
823
|
};
|
|
822
824
|
export type JsonParserOptions = {
|
|
823
825
|
/**
|
|
@@ -990,6 +992,10 @@ export type ModuleOptions = {
|
|
|
990
992
|
generator?: GeneratorOptionsByModuleType;
|
|
991
993
|
/** Keep module mechanism of the matched modules as-is, such as module.exports, require, import. */
|
|
992
994
|
noParse?: NoParseOption;
|
|
995
|
+
/**
|
|
996
|
+
* Cache the resolving of module requests.
|
|
997
|
+
*/
|
|
998
|
+
unsafeCache?: boolean | RegExp;
|
|
993
999
|
};
|
|
994
1000
|
type AllowTarget = "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "es2023" | "es2024" | "es2025" | "node" | "async-node" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | "electron-main" | `electron${number}-main` | `electron${number}.${number}-main` | "electron-renderer" | `electron${number}-renderer` | `electron${number}.${number}-renderer` | "electron-preload" | `electron${number}-preload` | `electron${number}.${number}-preload` | "nwjs" | `nwjs${number}` | `nwjs${number}.${number}` | "node-webkit" | `node-webkit${number}` | `node-webkit${number}.${number}` | "browserslist" | `browserslist:${string}`;
|
|
995
1001
|
/** Used to configure the target environment of Rspack output and the ECMAScript version of Rspack runtime code. */
|
|
@@ -2116,6 +2122,11 @@ export type Experiments = {
|
|
|
2116
2122
|
* @default false
|
|
2117
2123
|
*/
|
|
2118
2124
|
lazyBarrel?: boolean;
|
|
2125
|
+
/**
|
|
2126
|
+
* Enable defer import feature
|
|
2127
|
+
* @default false
|
|
2128
|
+
*/
|
|
2129
|
+
deferImport?: boolean;
|
|
2119
2130
|
};
|
|
2120
2131
|
export type Watch = boolean;
|
|
2121
2132
|
/** Options for watch mode. */
|
|
@@ -2148,8 +2159,7 @@ export type WatchOptions = {
|
|
|
2148
2159
|
/**
|
|
2149
2160
|
* Options for devServer, it based on `webpack-dev-server@5`
|
|
2150
2161
|
* */
|
|
2151
|
-
export
|
|
2152
|
-
}
|
|
2162
|
+
export type DevServer = DevServerOptions;
|
|
2153
2163
|
export type { Middleware as DevServerMiddleware } from "./devServer";
|
|
2154
2164
|
/**
|
|
2155
2165
|
* Ignore specific warnings.
|
package/dist/index.mjs
CHANGED
|
@@ -34932,7 +34932,7 @@ __webpack_require__.d(exports_namespaceObject, {
|
|
|
34932
34932
|
DllReferencePlugin: ()=>DllReferencePlugin,
|
|
34933
34933
|
DynamicEntryPlugin: ()=>DynamicEntryPlugin,
|
|
34934
34934
|
EntryDependency: ()=>external_rspack_wasi_browser_js_.EntryDependency,
|
|
34935
|
-
EntryOptionPlugin: ()=>
|
|
34935
|
+
EntryOptionPlugin: ()=>EntryOptionPlugin,
|
|
34936
34936
|
EntryPlugin: ()=>EntryPlugin,
|
|
34937
34937
|
EnvironmentPlugin: ()=>EnvironmentPlugin,
|
|
34938
34938
|
EvalDevToolModulePlugin: ()=>EvalDevToolModulePlugin,
|
|
@@ -37544,12 +37544,10 @@ const DllEntryPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPlugi
|
|
|
37544
37544
|
name: options.name
|
|
37545
37545
|
}));
|
|
37546
37546
|
const DllReferenceAgencyPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.DllReferenceAgencyPlugin, (options)=>options);
|
|
37547
|
-
|
|
37548
|
-
var assert_default = /*#__PURE__*/ __webpack_require__.n(assert);
|
|
37549
|
-
class EntryOptionPlugin {
|
|
37547
|
+
class EntryOptionPlugin_EntryOptionPlugin {
|
|
37550
37548
|
apply(compiler) {
|
|
37551
37549
|
compiler.hooks.entryOption.tap("EntryOptionPlugin", (context, entry)=>{
|
|
37552
|
-
|
|
37550
|
+
EntryOptionPlugin_EntryOptionPlugin.applyEntryOption(compiler, context, entry);
|
|
37553
37551
|
return true;
|
|
37554
37552
|
});
|
|
37555
37553
|
}
|
|
@@ -37557,8 +37555,8 @@ class EntryOptionPlugin {
|
|
|
37557
37555
|
if ("function" == typeof entry) new DynamicEntryPlugin(context, entry).apply(compiler);
|
|
37558
37556
|
else for (const name of Object.keys(entry)){
|
|
37559
37557
|
const desc = entry[name];
|
|
37560
|
-
const options =
|
|
37561
|
-
|
|
37558
|
+
const options = EntryOptionPlugin_EntryOptionPlugin.entryDescriptionToOptions(compiler, name, desc);
|
|
37559
|
+
if (void 0 === desc.import) throw new Error("desc.import should not be `undefined` once `EntryOptionPlugin.applyEntryOption` is called");
|
|
37562
37560
|
for (const entry of desc.import)new EntryPlugin(context, entry, options).apply(compiler);
|
|
37563
37561
|
}
|
|
37564
37562
|
}
|
|
@@ -37578,7 +37576,7 @@ class EntryOptionPlugin {
|
|
|
37578
37576
|
return options;
|
|
37579
37577
|
}
|
|
37580
37578
|
}
|
|
37581
|
-
const
|
|
37579
|
+
const EntryOptionPlugin = EntryOptionPlugin_EntryOptionPlugin;
|
|
37582
37580
|
const OriginEntryPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.EntryPlugin, (context, entry, options = "")=>{
|
|
37583
37581
|
const entryOptions = "string" == typeof options ? {
|
|
37584
37582
|
name: options
|
|
@@ -37624,7 +37622,7 @@ class DynamicEntryPlugin extends RspackBuiltinPlugin {
|
|
|
37624
37622
|
entry: async ()=>{
|
|
37625
37623
|
const result = await this.entry();
|
|
37626
37624
|
return Object.entries(result).map(([name, desc])=>{
|
|
37627
|
-
const options =
|
|
37625
|
+
const options = EntryOptionPlugin.entryDescriptionToOptions(compiler, name, desc);
|
|
37628
37626
|
return {
|
|
37629
37627
|
import: desc.import,
|
|
37630
37628
|
options: getRawEntryOptions(options)
|
|
@@ -37732,6 +37730,7 @@ function EsmLibraryPlugin_define_property(obj, key, value) {
|
|
|
37732
37730
|
}
|
|
37733
37731
|
class EsmLibraryPlugin {
|
|
37734
37732
|
apply(compiler) {
|
|
37733
|
+
var _this_options;
|
|
37735
37734
|
new RemoveDuplicateModulesPlugin().apply(compiler);
|
|
37736
37735
|
const { splitChunks } = compiler.options.optimization;
|
|
37737
37736
|
if (splitChunks) {
|
|
@@ -37742,9 +37741,15 @@ class EsmLibraryPlugin {
|
|
|
37742
37741
|
if (err = checkConfig(compiler.options)) throw new src_0.WebpackError(`Conflicted config for ${EsmLibraryPlugin.PLUGIN_NAME}: ${err}`);
|
|
37743
37742
|
compiler.__internal__registerBuiltinPlugin({
|
|
37744
37743
|
name: external_rspack_wasi_browser_js_.BuiltinPluginName.EsmLibraryPlugin,
|
|
37745
|
-
options: {
|
|
37744
|
+
options: {
|
|
37745
|
+
preserveModules: null == (_this_options = this.options) ? void 0 : _this_options.preserveModules
|
|
37746
|
+
}
|
|
37746
37747
|
});
|
|
37747
37748
|
}
|
|
37749
|
+
constructor(options){
|
|
37750
|
+
EsmLibraryPlugin_define_property(this, "options", void 0);
|
|
37751
|
+
this.options = options;
|
|
37752
|
+
}
|
|
37748
37753
|
}
|
|
37749
37754
|
EsmLibraryPlugin_define_property(EsmLibraryPlugin, "PLUGIN_NAME", "EsmLibraryPlugin");
|
|
37750
37755
|
function checkConfig(config) {
|
|
@@ -38358,7 +38363,6 @@ trace_define_property(trace_JavaScriptTracer, "layer", void 0);
|
|
|
38358
38363
|
trace_define_property(trace_JavaScriptTracer, "output", void 0);
|
|
38359
38364
|
trace_define_property(trace_JavaScriptTracer, "session", void 0);
|
|
38360
38365
|
trace_define_property(trace_JavaScriptTracer, "counter", 10000);
|
|
38361
|
-
var crypto_browserify = __webpack_require__("../../node_modules/.pnpm/crypto-browserify@3.12.1/node_modules/crypto-browserify/index.js");
|
|
38362
38366
|
const CURRENT_METHOD_REGEXP = /at ([a-zA-Z0-9_.]*)/;
|
|
38363
38367
|
function createMessage(method) {
|
|
38364
38368
|
return `Abstract method${method ? ` ${method}` : ""}. Must be overridden.`;
|
|
@@ -38627,7 +38631,7 @@ class WasmHashAdapter extends Hash {
|
|
|
38627
38631
|
this.wasmHash = wasmHash;
|
|
38628
38632
|
}
|
|
38629
38633
|
}
|
|
38630
|
-
const
|
|
38634
|
+
const createHash_createHash = (algorithm)=>{
|
|
38631
38635
|
if ("function" == typeof algorithm) return new BulkUpdateDecorator(()=>new algorithm());
|
|
38632
38636
|
switch(algorithm){
|
|
38633
38637
|
case "debug":
|
|
@@ -38643,9 +38647,15 @@ const createHash = (algorithm)=>{
|
|
|
38643
38647
|
return new WasmHashAdapter(hash);
|
|
38644
38648
|
}
|
|
38645
38649
|
case "native-md4":
|
|
38646
|
-
return new BulkUpdateDecorator(()=>
|
|
38650
|
+
return new BulkUpdateDecorator(()=>{
|
|
38651
|
+
const { createHash } = __webpack_require__("../../node_modules/.pnpm/crypto-browserify@3.12.1/node_modules/crypto-browserify/index.js");
|
|
38652
|
+
return createHash("md4");
|
|
38653
|
+
}, "md4");
|
|
38647
38654
|
default:
|
|
38648
|
-
return new BulkUpdateDecorator(()=>
|
|
38655
|
+
return new BulkUpdateDecorator(()=>{
|
|
38656
|
+
const { createHash } = __webpack_require__("../../node_modules/.pnpm/crypto-browserify@3.12.1/node_modules/crypto-browserify/index.js");
|
|
38657
|
+
return createHash(algorithm);
|
|
38658
|
+
}, algorithm);
|
|
38649
38659
|
}
|
|
38650
38660
|
};
|
|
38651
38661
|
const memoize = (fn)=>{
|
|
@@ -38677,40 +38687,27 @@ function ModuleError_define_property(obj, key, value) {
|
|
|
38677
38687
|
else obj[key] = value;
|
|
38678
38688
|
return obj;
|
|
38679
38689
|
}
|
|
38690
|
+
const ModuleError_createMessage = (err, type, from)=>{
|
|
38691
|
+
let message = `Module ${type}${from ? ` (from ${from}):\n` : ": "}`;
|
|
38692
|
+
if (err && "object" == typeof err && err.message) message += err.message;
|
|
38693
|
+
else if (err) message += err;
|
|
38694
|
+
return message;
|
|
38695
|
+
};
|
|
38696
|
+
const getErrorDetails = (err)=>err && "object" == typeof err && err.stack ? cleanUp(err.stack, err.name, err.message) : void 0;
|
|
38680
38697
|
class ModuleError extends lib_WebpackError {
|
|
38681
38698
|
constructor(err, { from } = {}){
|
|
38682
|
-
|
|
38683
|
-
if (from) message += ` (from ${from}):\n`;
|
|
38684
|
-
else message += ": ";
|
|
38685
|
-
if (err && "object" == typeof err && err.message) message += err.message;
|
|
38686
|
-
else if (err) message += err;
|
|
38687
|
-
super(message), ModuleError_define_property(this, "error", void 0);
|
|
38699
|
+
super(ModuleError_createMessage(err, "Error", from)), ModuleError_define_property(this, "error", void 0);
|
|
38688
38700
|
this.name = "ModuleError";
|
|
38689
38701
|
this.error = err;
|
|
38690
|
-
this.details =
|
|
38702
|
+
this.details = getErrorDetails(err);
|
|
38691
38703
|
}
|
|
38692
38704
|
}
|
|
38693
|
-
function ModuleWarning_define_property(obj, key, value) {
|
|
38694
|
-
if (key in obj) Object.defineProperty(obj, key, {
|
|
38695
|
-
value: value,
|
|
38696
|
-
enumerable: true,
|
|
38697
|
-
configurable: true,
|
|
38698
|
-
writable: true
|
|
38699
|
-
});
|
|
38700
|
-
else obj[key] = value;
|
|
38701
|
-
return obj;
|
|
38702
|
-
}
|
|
38703
38705
|
class ModuleWarning extends lib_WebpackError {
|
|
38704
38706
|
constructor(err, { from } = {}){
|
|
38705
|
-
|
|
38706
|
-
if (from) message += ` (from ${from}):\n`;
|
|
38707
|
-
else message += ": ";
|
|
38708
|
-
if (err && "object" == typeof err && err.message) message += err.message;
|
|
38709
|
-
else if (err) message += err;
|
|
38710
|
-
super(message), ModuleWarning_define_property(this, "error", void 0);
|
|
38707
|
+
super(ModuleError_createMessage(err, "Warning", from)), ModuleError_define_property(this, "error", void 0);
|
|
38711
38708
|
this.name = "ModuleWarning";
|
|
38712
38709
|
this.error = err;
|
|
38713
|
-
this.details =
|
|
38710
|
+
this.details = getErrorDetails(err);
|
|
38714
38711
|
}
|
|
38715
38712
|
}
|
|
38716
38713
|
async function service_run() {
|
|
@@ -38888,18 +38885,18 @@ class LoaderObject {
|
|
|
38888
38885
|
return this.loaderItem.pitchExecuted;
|
|
38889
38886
|
}
|
|
38890
38887
|
set pitchExecuted(value) {
|
|
38891
|
-
|
|
38888
|
+
if (!value) throw new Error("pitchExecuted should be true");
|
|
38892
38889
|
this.loaderItem.pitchExecuted = true;
|
|
38893
38890
|
}
|
|
38894
38891
|
get normalExecuted() {
|
|
38895
38892
|
return this.loaderItem.normalExecuted;
|
|
38896
38893
|
}
|
|
38897
38894
|
set normalExecuted(value) {
|
|
38898
|
-
|
|
38895
|
+
if (!value) throw new Error("normalExecuted should be true");
|
|
38899
38896
|
this.loaderItem.normalExecuted = true;
|
|
38900
38897
|
}
|
|
38901
38898
|
set noPitch(value) {
|
|
38902
|
-
|
|
38899
|
+
if (!value) throw new Error("noPitch should be true");
|
|
38903
38900
|
this.loaderItem.noPitch = true;
|
|
38904
38901
|
}
|
|
38905
38902
|
shouldYield() {
|
|
@@ -39205,7 +39202,7 @@ async function runLoaders(compiler, context) {
|
|
|
39205
39202
|
loaderContext.utils = {
|
|
39206
39203
|
absolutify: (context, request)=>context === contextDirectory ? getAbsolutifyInContext()(request) : getAbsolutify()(context, request),
|
|
39207
39204
|
contextify: (context, request)=>context === contextDirectory ? getContextifyInContext()(request) : getContextify()(context, request),
|
|
39208
|
-
createHash: (type)=>
|
|
39205
|
+
createHash: (type)=>createHash_createHash(type || compiler._lastCompilation.outputOptions.hashFunction)
|
|
39209
39206
|
};
|
|
39210
39207
|
loaderContext._compiler = compiler;
|
|
39211
39208
|
loaderContext._compilation = compiler._lastCompilation;
|
|
@@ -39732,7 +39729,7 @@ function getRawResolveByDependency(byDependency) {
|
|
|
39732
39729
|
]));
|
|
39733
39730
|
}
|
|
39734
39731
|
function getRawTsConfig(tsConfig) {
|
|
39735
|
-
|
|
39732
|
+
if ("string" == typeof tsConfig) throw new Error("should resolve string tsConfig in normalization");
|
|
39736
39733
|
if (void 0 === tsConfig) return tsConfig;
|
|
39737
39734
|
const { configFile, references } = tsConfig;
|
|
39738
39735
|
return {
|
|
@@ -39752,7 +39749,7 @@ function getRawResolve(resolve) {
|
|
|
39752
39749
|
};
|
|
39753
39750
|
}
|
|
39754
39751
|
function getRawModule(module1, options) {
|
|
39755
|
-
|
|
39752
|
+
if (isNil(module1.defaultRules)) throw new Error("module.defaultRules should not be nil after defaults");
|
|
39756
39753
|
const ruleSet = [
|
|
39757
39754
|
{
|
|
39758
39755
|
rules: module1.defaultRules
|
|
@@ -39766,7 +39763,8 @@ function getRawModule(module1, options) {
|
|
|
39766
39763
|
rules,
|
|
39767
39764
|
parser: getRawParserOptionsMap(module1.parser),
|
|
39768
39765
|
generator: getRawGeneratorOptionsMap(module1.generator),
|
|
39769
|
-
noParse: module1.noParse
|
|
39766
|
+
noParse: module1.noParse,
|
|
39767
|
+
unsafeCache: module1.unsafeCache
|
|
39770
39768
|
};
|
|
39771
39769
|
}
|
|
39772
39770
|
function tryMatch(payload, condition) {
|
|
@@ -39960,7 +39958,8 @@ function getRawJavascriptParserOptions(parser) {
|
|
|
39960
39958
|
commonjsMagicComments: parser.commonjsMagicComments,
|
|
39961
39959
|
inlineConst: parser.inlineConst,
|
|
39962
39960
|
typeReexportsPresence: parser.typeReexportsPresence,
|
|
39963
|
-
jsx: parser.jsx
|
|
39961
|
+
jsx: parser.jsx,
|
|
39962
|
+
deferImport: parser.deferImport
|
|
39964
39963
|
};
|
|
39965
39964
|
}
|
|
39966
39965
|
function getRawAssetParserOptions(parser) {
|
|
@@ -40081,7 +40080,7 @@ function getRawJsonGeneratorOptions(options) {
|
|
|
40081
40080
|
}
|
|
40082
40081
|
function getRawNode(node) {
|
|
40083
40082
|
if (false === node) return;
|
|
40084
|
-
|
|
40083
|
+
if (isNil(node.__dirname) || isNil(node.global) || isNil(node.__filename)) throw new Error("node.__dirname, node.global, node.__filename should not be nil");
|
|
40085
40084
|
return {
|
|
40086
40085
|
dirname: String(node.__dirname),
|
|
40087
40086
|
filename: String(node.__filename),
|
|
@@ -41010,7 +41009,7 @@ function SplitChunksPlugin_define_property(obj, key, value) {
|
|
|
41010
41009
|
class SplitChunksPlugin extends RspackBuiltinPlugin {
|
|
41011
41010
|
raw(compiler) {
|
|
41012
41011
|
const rawOptions = toRawSplitChunksOptions(this.options, compiler);
|
|
41013
|
-
|
|
41012
|
+
if (void 0 === rawOptions) throw new Error("rawOptions should not be undefined");
|
|
41014
41013
|
return createBuiltinPlugin(this.name, rawOptions);
|
|
41015
41014
|
}
|
|
41016
41015
|
constructor(options){
|
|
@@ -41216,7 +41215,8 @@ function getTagSrc(tag) {
|
|
|
41216
41215
|
}
|
|
41217
41216
|
}
|
|
41218
41217
|
function computeIntegrity(hashFuncNames, source) {
|
|
41219
|
-
const
|
|
41218
|
+
const { createHash } = __webpack_require__("../../node_modules/.pnpm/crypto-browserify@3.12.1/node_modules/crypto-browserify/index.js");
|
|
41219
|
+
const result = hashFuncNames.map((hashFuncName)=>`${hashFuncName}-${createHash(hashFuncName).update("string" == typeof source ? SubresourceIntegrityPlugin_Buffer.from(source, "utf-8") : source).digest("base64")}`).join(" ");
|
|
41220
41220
|
return result;
|
|
41221
41221
|
}
|
|
41222
41222
|
function normalizePath(path) {
|
|
@@ -42336,7 +42336,7 @@ const applyRspackOptionsDefaults = (options)=>{
|
|
|
42336
42336
|
F(options, "context", ()=>defaults_process.cwd());
|
|
42337
42337
|
F(options, "target", ()=>getDefaultTarget(options.context));
|
|
42338
42338
|
const { mode, target } = options;
|
|
42339
|
-
|
|
42339
|
+
if (isNil(target)) throw new Error("target should not be nil after defaults");
|
|
42340
42340
|
const targetProperties = false === target ? false : "string" == typeof target ? getTargetProperties(target, options.context) : getTargetsProperties(target, options.context);
|
|
42341
42341
|
const development = "development" === mode;
|
|
42342
42342
|
const production = "production" === mode || !mode;
|
|
@@ -42362,13 +42362,15 @@ const applyRspackOptionsDefaults = (options)=>{
|
|
|
42362
42362
|
production
|
|
42363
42363
|
});
|
|
42364
42364
|
applyModuleDefaults(options.module, {
|
|
42365
|
+
cache: !!options.cache,
|
|
42365
42366
|
asyncWebAssembly: options.experiments.asyncWebAssembly,
|
|
42366
42367
|
css: options.experiments.css,
|
|
42367
42368
|
targetProperties,
|
|
42368
42369
|
mode: options.mode,
|
|
42369
42370
|
uniqueName: options.output.uniqueName,
|
|
42370
42371
|
usedExports: !!options.optimization.usedExports,
|
|
42371
|
-
inlineConst: options.experiments.inlineConst
|
|
42372
|
+
inlineConst: options.experiments.inlineConst,
|
|
42373
|
+
deferImport: options.experiments.deferImport
|
|
42372
42374
|
});
|
|
42373
42375
|
applyOutputDefaults(options.output, {
|
|
42374
42376
|
context: options.context,
|
|
@@ -42425,6 +42427,7 @@ const applyExperimentsDefaults = (experiments, { development })=>{
|
|
|
42425
42427
|
D(experiments, "asyncWebAssembly", experiments.futureDefaults);
|
|
42426
42428
|
D(experiments, "css", experiments.futureDefaults ? true : void 0);
|
|
42427
42429
|
D(experiments, "topLevelAwait", true);
|
|
42430
|
+
D(experiments, "deferImport", false);
|
|
42428
42431
|
D(experiments, "buildHttp", void 0);
|
|
42429
42432
|
if (experiments.buildHttp && "object" == typeof experiments.buildHttp) D(experiments.buildHttp, "upgrade", false);
|
|
42430
42433
|
D(experiments, "incremental", {});
|
|
@@ -42459,14 +42462,14 @@ const applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
|
42459
42462
|
if ("object" == typeof rspackFuture) {
|
|
42460
42463
|
D(rspackFuture, "bundlerInfo", {});
|
|
42461
42464
|
if ("object" == typeof rspackFuture.bundlerInfo) {
|
|
42462
|
-
D(rspackFuture.bundlerInfo, "version", "1.6.0-canary-
|
|
42465
|
+
D(rspackFuture.bundlerInfo, "version", "1.6.0-canary-0eb13821-20251021173640");
|
|
42463
42466
|
D(rspackFuture.bundlerInfo, "bundler", "rspack");
|
|
42464
42467
|
D(rspackFuture.bundlerInfo, "force", !library);
|
|
42465
42468
|
}
|
|
42466
42469
|
}
|
|
42467
42470
|
};
|
|
42468
42471
|
const applySnapshotDefaults = (_snapshot, _env)=>{};
|
|
42469
|
-
const applyJavascriptParserOptionsDefaults = (parserOptions, { usedExports, inlineConst })=>{
|
|
42472
|
+
const applyJavascriptParserOptionsDefaults = (parserOptions, { usedExports, inlineConst, deferImport })=>{
|
|
42470
42473
|
D(parserOptions, "dynamicImportMode", "lazy");
|
|
42471
42474
|
D(parserOptions, "dynamicImportPrefetch", false);
|
|
42472
42475
|
D(parserOptions, "dynamicImportPreload", false);
|
|
@@ -42488,13 +42491,15 @@ const applyJavascriptParserOptionsDefaults = (parserOptions, { usedExports, inli
|
|
|
42488
42491
|
D(parserOptions, "inlineConst", usedExports && inlineConst);
|
|
42489
42492
|
D(parserOptions, "typeReexportsPresence", "no-tolerant");
|
|
42490
42493
|
D(parserOptions, "jsx", false);
|
|
42494
|
+
D(parserOptions, "deferImport", deferImport);
|
|
42491
42495
|
};
|
|
42492
42496
|
const applyJsonGeneratorOptionsDefaults = (generatorOptions)=>{
|
|
42493
42497
|
D(generatorOptions, "JSONParse", true);
|
|
42494
42498
|
};
|
|
42495
|
-
const applyModuleDefaults = (module1, { asyncWebAssembly, css, targetProperties, mode, uniqueName, usedExports, inlineConst })=>{
|
|
42499
|
+
const applyModuleDefaults = (module1, { cache, asyncWebAssembly, css, targetProperties, mode, uniqueName, usedExports, inlineConst, deferImport })=>{
|
|
42496
42500
|
assertNotNill(module1.parser);
|
|
42497
42501
|
assertNotNill(module1.generator);
|
|
42502
|
+
cache ? D(module1, "unsafeCache", /[\\/]node_modules[\\/]/) : D(module1, "unsafeCache", false);
|
|
42498
42503
|
F(module1.parser, "asset", ()=>({}));
|
|
42499
42504
|
assertNotNill(module1.parser.asset);
|
|
42500
42505
|
F(module1.parser.asset, "dataUrlCondition", ()=>({}));
|
|
@@ -42503,7 +42508,8 @@ const applyModuleDefaults = (module1, { asyncWebAssembly, css, targetProperties,
|
|
|
42503
42508
|
assertNotNill(module1.parser.javascript);
|
|
42504
42509
|
applyJavascriptParserOptionsDefaults(module1.parser.javascript, {
|
|
42505
42510
|
usedExports,
|
|
42506
|
-
inlineConst
|
|
42511
|
+
inlineConst,
|
|
42512
|
+
deferImport
|
|
42507
42513
|
});
|
|
42508
42514
|
F(module1.parser, "json", ()=>({}));
|
|
42509
42515
|
assertNotNill(module1.parser["json"]);
|
|
@@ -43267,7 +43273,8 @@ const getNormalizedRspackOptions = (config)=>({
|
|
|
43267
43273
|
]),
|
|
43268
43274
|
rules: nestedArray(module1.rules, (r)=>[
|
|
43269
43275
|
...r
|
|
43270
|
-
])
|
|
43276
|
+
]),
|
|
43277
|
+
unsafeCache: module1.unsafeCache
|
|
43271
43278
|
})),
|
|
43272
43279
|
target: config.target,
|
|
43273
43280
|
externals: config.externals,
|
|
@@ -43524,7 +43531,7 @@ function rmrf(fs, p, callback) {
|
|
|
43524
43531
|
let count = files.length;
|
|
43525
43532
|
if (0 === count) fs.rmdir(p, callback);
|
|
43526
43533
|
else for (const file of files){
|
|
43527
|
-
|
|
43534
|
+
if ("string" != typeof file) throw new Error("file should be a string");
|
|
43528
43535
|
const fullPath = join(fs, p, file);
|
|
43529
43536
|
rmrf(fs, fullPath, (err)=>{
|
|
43530
43537
|
if (err) return callback(err);
|
|
@@ -43933,7 +43940,7 @@ function getLazyHashedEtag_define_property(obj, key, value) {
|
|
|
43933
43940
|
class LazyHashedEtag {
|
|
43934
43941
|
toString() {
|
|
43935
43942
|
if (void 0 === this._hash) {
|
|
43936
|
-
const hash =
|
|
43943
|
+
const hash = createHash_createHash(this._hashFunction);
|
|
43937
43944
|
this._obj.updateHash(hash);
|
|
43938
43945
|
this._hash = hash.digest("base64");
|
|
43939
43946
|
}
|
|
@@ -44553,7 +44560,10 @@ const RuntimeGlobals = {
|
|
|
44553
44560
|
systemContext: "__webpack_require__.y",
|
|
44554
44561
|
baseURI: "__webpack_require__.b",
|
|
44555
44562
|
relativeUrl: "__webpack_require__.U",
|
|
44556
|
-
asyncModule: "__webpack_require__.a"
|
|
44563
|
+
asyncModule: "__webpack_require__.a",
|
|
44564
|
+
asyncModuleExportSymbol: "__webpack_require__.aE",
|
|
44565
|
+
makeDeferredNamespaceObject: "__webpack_require__.z",
|
|
44566
|
+
makeDeferredNamespaceObjectSymbol: "__webpack_require__.zS"
|
|
44557
44567
|
};
|
|
44558
44568
|
for (const entry of Object.entries(RuntimeGlobals))RESERVED_RUNTIME_GLOBALS.set(entry[1], entry[0]);
|
|
44559
44569
|
const isReservedRuntimeGlobal = (r)=>RESERVED_RUNTIME_GLOBALS.has(r);
|
|
@@ -44753,7 +44763,7 @@ const createCompilationHooksRegisters = (getCompiler, createTap, createMapTap)=>
|
|
|
44753
44763
|
}, function(queried) {
|
|
44754
44764
|
return function(chunk) {
|
|
44755
44765
|
if (!getCompiler().options.output.hashFunction) throw new Error("'output.hashFunction' cannot be undefined");
|
|
44756
|
-
const hash =
|
|
44766
|
+
const hash = createHash_createHash(getCompiler().options.output.hashFunction);
|
|
44757
44767
|
queried.call(chunk, hash);
|
|
44758
44768
|
let digestResult;
|
|
44759
44769
|
digestResult = getCompiler().options.output.hashDigest ? hash.digest(getCompiler().options.output.hashDigest) : hash.digest();
|
|
@@ -45071,7 +45081,7 @@ const createJavaScriptModulesHooksRegisters = (getCompiler, createTap)=>({
|
|
|
45071
45081
|
}, function(queried) {
|
|
45072
45082
|
return function(chunk) {
|
|
45073
45083
|
if (!getCompiler().options.output.hashFunction) throw new Error("'output.hashFunction' cannot be undefined");
|
|
45074
|
-
const hash =
|
|
45084
|
+
const hash = createHash_createHash(getCompiler().options.output.hashFunction);
|
|
45075
45085
|
queried.call(chunk, hash);
|
|
45076
45086
|
let digestResult;
|
|
45077
45087
|
digestResult = getCompiler().options.output.hashDigest ? hash.digest(getCompiler().options.output.hashDigest) : hash.digest();
|
|
@@ -45514,7 +45524,7 @@ class Watching {
|
|
|
45514
45524
|
for (const cb of callbacksToExecute)cb(err);
|
|
45515
45525
|
};
|
|
45516
45526
|
if (error) return handleError(error);
|
|
45517
|
-
|
|
45527
|
+
if (!compilation) throw new Error("compilation is required if no error");
|
|
45518
45528
|
stats = new Stats(compilation);
|
|
45519
45529
|
if (this.invalid && !this.suspended && !this.blocked && !(this.isBlocked() && (this.blocked = true))) return void Watching_class_private_method_get(this, _go, go).call(this);
|
|
45520
45530
|
const startTime = this.startTime;
|
|
@@ -45972,11 +45982,9 @@ class Compiler {
|
|
|
45972
45982
|
this.hooks.shutdown.callAsync((err)=>{
|
|
45973
45983
|
if (err) return callback(err);
|
|
45974
45984
|
this.cache.shutdown(()=>{
|
|
45975
|
-
|
|
45976
|
-
|
|
45977
|
-
|
|
45978
|
-
callback();
|
|
45979
|
-
});
|
|
45985
|
+
var _class_private_field_get1;
|
|
45986
|
+
null == (_class_private_field_get1 = Compiler_class_private_field_get(this, _instance)) || _class_private_field_get1.close();
|
|
45987
|
+
callback();
|
|
45980
45988
|
});
|
|
45981
45989
|
});
|
|
45982
45990
|
}
|
|
@@ -46093,6 +46101,7 @@ class Compiler {
|
|
|
46093
46101
|
Compiler_define_property(this, "cache", void 0);
|
|
46094
46102
|
Compiler_define_property(this, "compilerPath", void 0);
|
|
46095
46103
|
Compiler_define_property(this, "options", void 0);
|
|
46104
|
+
Compiler_define_property(this, "unsafeFastDrop", false);
|
|
46096
46105
|
Compiler_define_property(this, "__internal_browser_require", void 0);
|
|
46097
46106
|
Compiler_class_private_field_set(this, Compiler_initial, true);
|
|
46098
46107
|
Compiler_class_private_field_set(this, _builtinPlugins, []);
|
|
@@ -46248,7 +46257,7 @@ function getInstance(callback) {
|
|
|
46248
46257
|
Compiler_class_private_field_set(this, _registers, Compiler_class_private_method_get(this, _createHooksRegisters, createHooksRegisters).call(this));
|
|
46249
46258
|
const inputFileSystem = this.inputFileSystem && ThreadsafeInputNodeFS.needsBinding(options.experiments.useInputFileSystem) ? ThreadsafeInputNodeFS.__to_binding(this.inputFileSystem) : void 0;
|
|
46250
46259
|
try {
|
|
46251
|
-
Compiler_class_private_field_set(this, _instance, new instanceBinding.JsCompiler(this.compilerPath, rawOptions, Compiler_class_private_field_get(this, _builtinPlugins), Compiler_class_private_field_get(this, _registers), ThreadsafeOutputNodeFS.__to_binding(this.outputFileSystem), this.intermediateFileSystem ? ThreadsafeIntermediateNodeFS.__to_binding(this.intermediateFileSystem) : void 0, inputFileSystem, ResolverFactory.__to_binding(this.resolverFactory)));
|
|
46260
|
+
Compiler_class_private_field_set(this, _instance, new instanceBinding.JsCompiler(this.compilerPath, rawOptions, Compiler_class_private_field_get(this, _builtinPlugins), Compiler_class_private_field_get(this, _registers), ThreadsafeOutputNodeFS.__to_binding(this.outputFileSystem), this.intermediateFileSystem ? ThreadsafeIntermediateNodeFS.__to_binding(this.intermediateFileSystem) : void 0, inputFileSystem, ResolverFactory.__to_binding(this.resolverFactory), this.unsafeFastDrop));
|
|
46252
46261
|
callback(null, Compiler_class_private_field_get(this, _instance));
|
|
46253
46262
|
} catch (err) {
|
|
46254
46263
|
if (err instanceof Error) delete err.stack;
|
|
@@ -46409,7 +46418,7 @@ class MultiStats {
|
|
|
46409
46418
|
return obj;
|
|
46410
46419
|
});
|
|
46411
46420
|
if (childOptions.version) {
|
|
46412
|
-
obj.rspackVersion = "1.6.0-canary-
|
|
46421
|
+
obj.rspackVersion = "1.6.0-canary-0eb13821-20251021173640";
|
|
46413
46422
|
obj.version = "5.75.0";
|
|
46414
46423
|
}
|
|
46415
46424
|
if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join("");
|
|
@@ -46643,6 +46652,9 @@ function MultiCompiler_define_property(obj, key, value) {
|
|
|
46643
46652
|
}
|
|
46644
46653
|
var _runGraph = /*#__PURE__*/ new WeakSet();
|
|
46645
46654
|
class MultiCompiler {
|
|
46655
|
+
set unsafeFastDrop(value) {
|
|
46656
|
+
for (const compiler of this.compilers)compiler.unsafeFastDrop = value;
|
|
46657
|
+
}
|
|
46646
46658
|
get options() {
|
|
46647
46659
|
return Object.assign(this.compilers.map((c)=>c.options), this._options);
|
|
46648
46660
|
}
|
|
@@ -47216,15 +47228,13 @@ const errorsSpaceLimit = (errors, max)=>{
|
|
|
47216
47228
|
const DefaultStatsFactoryPlugin_compareIds = compareIds;
|
|
47217
47229
|
const GROUP_EXTENSION_REGEXP = /(\.[^.]+?)(?:\?|(?: \+ \d+ modules?)?$)/;
|
|
47218
47230
|
const GROUP_PATH_REGEXP = /(.+)[/\\][^/\\]+?(?:\?|(?: \+ \d+ modules?)?$)/;
|
|
47219
|
-
const
|
|
47231
|
+
const SHARED_ITEM_NAMES = {
|
|
47220
47232
|
"compilation.children[]": "compilation",
|
|
47221
47233
|
"compilation.modules[]": "module",
|
|
47222
47234
|
"compilation.entrypoints[]": "chunkGroup",
|
|
47223
47235
|
"compilation.namedChunkGroups[]": "chunkGroup",
|
|
47224
47236
|
"compilation.errors[]": "error",
|
|
47225
|
-
"compilation.warnings[]": "warning",
|
|
47226
47237
|
"chunk.modules[]": "module",
|
|
47227
|
-
"chunk.rootModules[]": "module",
|
|
47228
47238
|
"chunk.origins[]": "chunkOrigin",
|
|
47229
47239
|
"compilation.chunks[]": "chunk",
|
|
47230
47240
|
"compilation.assets[]": "asset",
|
|
@@ -47232,7 +47242,12 @@ const ITEM_NAMES = {
|
|
|
47232
47242
|
"module.issuerPath[]": "moduleIssuer",
|
|
47233
47243
|
"module.reasons[]": "moduleReason",
|
|
47234
47244
|
"module.modules[]": "module",
|
|
47235
|
-
"module.children[]": "module"
|
|
47245
|
+
"module.children[]": "module"
|
|
47246
|
+
};
|
|
47247
|
+
const ITEM_NAMES = {
|
|
47248
|
+
...SHARED_ITEM_NAMES,
|
|
47249
|
+
"compilation.warnings[]": "warning",
|
|
47250
|
+
"chunk.rootModules[]": "module",
|
|
47236
47251
|
"moduleTrace[]": "moduleTraceItem"
|
|
47237
47252
|
};
|
|
47238
47253
|
const MERGER = {
|
|
@@ -47677,6 +47692,7 @@ const SIMPLE_EXTRACTORS = {
|
|
|
47677
47692
|
let currentList = rootList;
|
|
47678
47693
|
let processedLogEntries = 0;
|
|
47679
47694
|
for (const entry of logEntries){
|
|
47695
|
+
var _entry_args;
|
|
47680
47696
|
let type = entry.type;
|
|
47681
47697
|
const typeBitFlag = getLogTypeBitFlag(type);
|
|
47682
47698
|
if (!debugMode && (acceptedTypes & typeBitFlag) !== typeBitFlag) continue;
|
|
@@ -47688,7 +47704,7 @@ const SIMPLE_EXTRACTORS = {
|
|
|
47688
47704
|
if (depthInCollapsedGroup > 0) depthInCollapsedGroup--;
|
|
47689
47705
|
continue;
|
|
47690
47706
|
}
|
|
47691
|
-
const message =
|
|
47707
|
+
const message = (null == (_entry_args = entry.args) ? void 0 : _entry_args.length) ? util.format(entry.args[0], ...entry.args.slice(1)) : "";
|
|
47692
47708
|
const newEntry = {
|
|
47693
47709
|
type,
|
|
47694
47710
|
message,
|
|
@@ -47717,7 +47733,7 @@ const SIMPLE_EXTRACTORS = {
|
|
|
47717
47733
|
},
|
|
47718
47734
|
version: (object)=>{
|
|
47719
47735
|
object.version = "5.75.0";
|
|
47720
|
-
object.rspackVersion = "1.6.0-canary-
|
|
47736
|
+
object.rspackVersion = "1.6.0-canary-0eb13821-20251021173640";
|
|
47721
47737
|
},
|
|
47722
47738
|
env: (object, _compilation, _context, { _env })=>{
|
|
47723
47739
|
object.env = _env;
|
|
@@ -47768,11 +47784,13 @@ const SIMPLE_EXTRACTORS = {
|
|
|
47768
47784
|
}
|
|
47769
47785
|
}
|
|
47770
47786
|
}
|
|
47771
|
-
object.assetsByChunkName = assetsByChunkName.
|
|
47772
|
-
|
|
47773
|
-
|
|
47774
|
-
|
|
47775
|
-
const groupedAssets = factory.create(`${type}.assets`,
|
|
47787
|
+
object.assetsByChunkName = Object.fromEntries(assetsByChunkName.map(({ name, files })=>[
|
|
47788
|
+
name,
|
|
47789
|
+
files
|
|
47790
|
+
]));
|
|
47791
|
+
const groupedAssets = factory.create(`${type}.assets`, [
|
|
47792
|
+
...assets
|
|
47793
|
+
], {
|
|
47776
47794
|
...context
|
|
47777
47795
|
});
|
|
47778
47796
|
const limited = spaceLimited(groupedAssets, options.assetsSpace ?? 1 / 0);
|
|
@@ -47988,16 +48006,14 @@ const SIMPLE_EXTRACTORS = {
|
|
|
47988
48006
|
const { commonAttributes } = module1;
|
|
47989
48007
|
object.source = commonAttributes.source;
|
|
47990
48008
|
},
|
|
47991
|
-
usedExports: (object,
|
|
47992
|
-
if ("string" == typeof
|
|
47993
|
-
else object.usedExports = "true" ===
|
|
47994
|
-
else if (Array.isArray(
|
|
48009
|
+
usedExports: (object, { usedExports })=>{
|
|
48010
|
+
if ("string" == typeof usedExports) if ("null" === usedExports) object.usedExports = null;
|
|
48011
|
+
else object.usedExports = "true" === usedExports;
|
|
48012
|
+
else if (Array.isArray(usedExports)) object.usedExports = usedExports;
|
|
47995
48013
|
else object.usedExports = null;
|
|
47996
48014
|
},
|
|
47997
|
-
providedExports: (object,
|
|
47998
|
-
|
|
47999
|
-
if (Array.isArray(commonAttributes.providedExports)) object.providedExports = commonAttributes.providedExports;
|
|
48000
|
-
else object.providedExports = null;
|
|
48015
|
+
providedExports: (object, { commonAttributes })=>{
|
|
48016
|
+
object.providedExports = Array.isArray(commonAttributes.providedExports) ? commonAttributes.providedExports : null;
|
|
48001
48017
|
},
|
|
48002
48018
|
optimizationBailout: (object, module1)=>{
|
|
48003
48019
|
object.optimizationBailout = module1.commonAttributes.optimizationBailout || null;
|
|
@@ -48150,7 +48166,6 @@ const FILTER = {
|
|
|
48150
48166
|
}
|
|
48151
48167
|
}
|
|
48152
48168
|
};
|
|
48153
|
-
const FILTER_RESULTS = {};
|
|
48154
48169
|
class DefaultStatsFactoryPlugin {
|
|
48155
48170
|
apply(compiler) {
|
|
48156
48171
|
compiler.hooks.compilation.tap("DefaultStatsFactoryPlugin", (compilation)=>{
|
|
@@ -48161,9 +48176,6 @@ class DefaultStatsFactoryPlugin {
|
|
|
48161
48176
|
iterateConfig(FILTER, options, (hookFor, fn)=>{
|
|
48162
48177
|
stats.hooks.filter.for(hookFor).tap("DefaultStatsFactoryPlugin", (item, ctx, idx, i)=>fn(item, ctx, options, idx, i));
|
|
48163
48178
|
});
|
|
48164
|
-
iterateConfig(FILTER_RESULTS, options, (hookFor, fn)=>{
|
|
48165
|
-
stats.hooks.filterResults.for(hookFor).tap("DefaultStatsFactoryPlugin", (item, ctx, idx, i)=>fn(item, ctx, options, idx, i));
|
|
48166
|
-
});
|
|
48167
48179
|
iterateConfig(SORTERS, options, (hookFor, fn)=>{
|
|
48168
48180
|
stats.hooks.sort.for(hookFor).tap("DefaultStatsFactoryPlugin", (comparators, ctx)=>fn(comparators, ctx, options));
|
|
48169
48181
|
});
|
|
@@ -48706,16 +48718,9 @@ const SIMPLE_PRINTERS = {
|
|
|
48706
48718
|
"moduleTraceDependency.loc": (loc)=>loc
|
|
48707
48719
|
};
|
|
48708
48720
|
const DefaultStatsPrinterPlugin_ITEM_NAMES = {
|
|
48709
|
-
|
|
48710
|
-
"compilation.modules[]": "module",
|
|
48711
|
-
"compilation.chunks[]": "chunk",
|
|
48712
|
-
"compilation.entrypoints[]": "chunkGroup",
|
|
48713
|
-
"compilation.namedChunkGroups[]": "chunkGroup",
|
|
48714
|
-
"compilation.errors[]": "error",
|
|
48721
|
+
...SHARED_ITEM_NAMES,
|
|
48715
48722
|
"compilation.warnings[]": "error",
|
|
48716
48723
|
"compilation.logging[]": "loggingGroup",
|
|
48717
|
-
"compilation.children[]": "compilation",
|
|
48718
|
-
"asset.related[]": "asset",
|
|
48719
48724
|
"asset.children[]": "asset",
|
|
48720
48725
|
"asset.chunks[]": "assetChunk",
|
|
48721
48726
|
"asset.auxiliaryChunks[]": "assetChunk",
|
|
@@ -48729,13 +48734,7 @@ const DefaultStatsPrinterPlugin_ITEM_NAMES = {
|
|
|
48729
48734
|
"chunkGroupChild.auxiliaryAssets[]": "chunkGroupAsset",
|
|
48730
48735
|
"chunkGroup.children[]": "chunkGroupChildGroup",
|
|
48731
48736
|
"chunkGroupChildGroup.children[]": "chunkGroupChild",
|
|
48732
|
-
"module.modules[]": "module",
|
|
48733
|
-
"module.children[]": "module",
|
|
48734
|
-
"module.reasons[]": "moduleReason",
|
|
48735
48737
|
"moduleReason.children[]": "moduleReason",
|
|
48736
|
-
"module.issuerPath[]": "moduleIssuer",
|
|
48737
|
-
"chunk.origins[]": "chunkOrigin",
|
|
48738
|
-
"chunk.modules[]": "module",
|
|
48739
48738
|
"loggingGroup.entries[]": (logEntry)=>`loggingEntry(${logEntry.type}).loggingEntry`,
|
|
48740
48739
|
"loggingEntry.children[]": (logEntry)=>`loggingEntry(${logEntry.type}).loggingEntry`,
|
|
48741
48740
|
"error.moduleTrace[]": "moduleTraceItem",
|
|
@@ -49219,10 +49218,6 @@ const AVAILABLE_FORMATS = {
|
|
|
49219
49218
|
regExp: /(Did you mean .+)/g,
|
|
49220
49219
|
format: green
|
|
49221
49220
|
},
|
|
49222
|
-
{
|
|
49223
|
-
regExp: /(Set 'mode' option to 'development' or 'production')/g,
|
|
49224
|
-
format: green
|
|
49225
|
-
},
|
|
49226
49221
|
{
|
|
49227
49222
|
regExp: /(\(module has no exports\))/g,
|
|
49228
49223
|
format: red
|
|
@@ -49235,10 +49230,6 @@ const AVAILABLE_FORMATS = {
|
|
|
49235
49230
|
regExp: /(?:^|\n)(.* doesn't exist)/g,
|
|
49236
49231
|
format: red
|
|
49237
49232
|
},
|
|
49238
|
-
{
|
|
49239
|
-
regExp: /('\w+' option has not been set)/g,
|
|
49240
|
-
format: red
|
|
49241
|
-
},
|
|
49242
49233
|
{
|
|
49243
49234
|
regExp: /(Emitted value instead of an instance of Error)/g,
|
|
49244
49235
|
format: yellow
|
|
@@ -49323,12 +49314,12 @@ class DefaultStatsPrinterPlugin {
|
|
|
49323
49314
|
}
|
|
49324
49315
|
class RspackOptionsApply {
|
|
49325
49316
|
process(options, compiler) {
|
|
49326
|
-
|
|
49317
|
+
if (!options.output.path) throw new Error("options.output.path should have a value after `applyRspackOptionsDefaults`");
|
|
49327
49318
|
compiler.outputPath = options.output.path;
|
|
49328
49319
|
compiler.name = options.name;
|
|
49329
49320
|
compiler.outputFileSystem = browser_fs["default"];
|
|
49330
49321
|
if (options.externals) {
|
|
49331
|
-
|
|
49322
|
+
if (!options.externalsType) throw new Error("options.externalsType should have a value after `applyRspackOptionsDefaults`");
|
|
49332
49323
|
new ExternalsPlugin(options.externalsType, options.externals, false).apply(compiler);
|
|
49333
49324
|
}
|
|
49334
49325
|
if (options.externalsPresets.node) new NodeTargetPlugin().apply(compiler);
|
|
@@ -49390,7 +49381,7 @@ class RspackOptionsApply {
|
|
|
49390
49381
|
new AssetModulesPlugin().apply(compiler);
|
|
49391
49382
|
if (options.experiments.asyncWebAssembly) new AsyncWebAssemblyModulesPlugin().apply(compiler);
|
|
49392
49383
|
if (options.experiments.css) new CssModulesPlugin().apply(compiler);
|
|
49393
|
-
new
|
|
49384
|
+
new EntryOptionPlugin().apply(compiler);
|
|
49394
49385
|
assertNotNill(options.context);
|
|
49395
49386
|
compiler.hooks.entryOption.call(options.context, options.entry);
|
|
49396
49387
|
new RuntimePlugin().apply(compiler);
|
|
@@ -50739,7 +50730,7 @@ function transformSync(source, options) {
|
|
|
50739
50730
|
const _options = JSON.stringify(options || {});
|
|
50740
50731
|
return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
|
|
50741
50732
|
}
|
|
50742
|
-
const exports_rspackVersion = "1.6.0-canary-
|
|
50733
|
+
const exports_rspackVersion = "1.6.0-canary-0eb13821-20251021173640";
|
|
50743
50734
|
const exports_version = "5.75.0";
|
|
50744
50735
|
const exports_WebpackError = Error;
|
|
50745
50736
|
const sources = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.3_patch_hash=b2a26650f08a2359d0a3cd81fa6fa272aa7441a28dd7e601792da5ed5d2b4aee/node_modules/webpack-sources/lib/index.js");
|
|
@@ -50750,7 +50741,7 @@ const exports_config = {
|
|
|
50750
50741
|
applyWebpackOptionsDefaults: applyRspackOptionsDefaults
|
|
50751
50742
|
};
|
|
50752
50743
|
const exports_util = {
|
|
50753
|
-
createHash:
|
|
50744
|
+
createHash: createHash_createHash,
|
|
50754
50745
|
cleverMerge: cachedCleverMerge
|
|
50755
50746
|
};
|
|
50756
50747
|
const web = {
|
|
@@ -50875,7 +50866,7 @@ function createMultiCompiler(options) {
|
|
|
50875
50866
|
function createCompiler(userOptions) {
|
|
50876
50867
|
const options = getNormalizedRspackOptions(userOptions);
|
|
50877
50868
|
applyRspackOptionsBaseDefaults(options);
|
|
50878
|
-
|
|
50869
|
+
if (isNil(options.context)) throw new Error("options.context is required");
|
|
50879
50870
|
const compiler = new Compiler(options.context, options);
|
|
50880
50871
|
new NodeEnvironmentPlugin({
|
|
50881
50872
|
infrastructureLogging: options.infrastructureLogging
|
|
@@ -51146,4 +51137,4 @@ var __webpack_exports__EntryDependency = external_rspack_wasi_browser_js_.EntryD
|
|
|
51146
51137
|
var __webpack_exports__ExternalModule = external_rspack_wasi_browser_js_.ExternalModule;
|
|
51147
51138
|
var __webpack_exports__Module = external_rspack_wasi_browser_js_.Module;
|
|
51148
51139
|
var __webpack_exports__NormalModule = external_rspack_wasi_browser_js_.NormalModule;
|
|
51149
|
-
export { BannerPlugin, BrowserHttpImportEsmPlugin, BrowserRequirePlugin, CircularDependencyRspackPlugin, Compilation, Compiler, ContextReplacementPlugin, CopyRspackPlugin, CssExtractRspackPlugin, DefinePlugin, DllPlugin, DllReferencePlugin, DynamicEntryPlugin,
|
|
51140
|
+
export { BannerPlugin, BrowserHttpImportEsmPlugin, BrowserRequirePlugin, CircularDependencyRspackPlugin, Compilation, Compiler, ContextReplacementPlugin, CopyRspackPlugin, CssExtractRspackPlugin, DefinePlugin, DllPlugin, DllReferencePlugin, DynamicEntryPlugin, EntryOptionPlugin, EntryPlugin, EnvironmentPlugin, EvalDevToolModulePlugin, EvalSourceMapDevToolPlugin, ExternalsPlugin, HotModuleReplacementPlugin, HtmlRspackPlugin, IgnorePlugin, LightningCssMinimizerRspackPlugin, LoaderOptionsPlugin, LoaderTargetPlugin, ModuleFilenameHelpers_namespaceObject as ModuleFilenameHelpers, MultiCompiler, MultiStats, NoEmitOnErrorsPlugin, NormalModuleReplacementPlugin, ProgressPlugin, ProvidePlugin, RspackOptionsApply, RuntimeGlobals, RuntimeModule, RuntimePlugin, SourceMapDevToolPlugin, Stats, statsFactoryUtils_StatsErrorCode as StatsErrorCode, SwcJsMinimizerRspackPlugin, Template, ValidationError, WarnCaseSensitiveModulesPlugin, exports_WebpackError as WebpackError, RspackOptionsApply as WebpackOptionsApply, builtinMemFs, exports_config as config, container, electron, exports_experiments as experiments, javascript, exports_library as library, exports_node as node, optimize, src_rspack as rspack, exports_rspackVersion as rspackVersion, sharing, sources, exports_util as util, exports_version as version, exports_wasm as wasm, web, webworker, __webpack_exports__AsyncDependenciesBlock as AsyncDependenciesBlock, __webpack_exports__ConcatenatedModule as ConcatenatedModule, __webpack_exports__ContextModule as ContextModule, __webpack_exports__Dependency as Dependency, __webpack_exports__EntryDependency as EntryDependency, __webpack_exports__ExternalModule as ExternalModule, __webpack_exports__Module as Module, __webpack_exports__NormalModule as NormalModule };
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import WebpackError from "../lib/WebpackError";
|
|
2
|
-
export
|
|
2
|
+
export declare class ModuleError extends WebpackError {
|
|
3
|
+
error?: Error;
|
|
4
|
+
constructor(err: Error, { from }?: {
|
|
5
|
+
from?: string;
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
export declare class ModuleWarning extends WebpackError {
|
|
3
9
|
error?: Error;
|
|
4
10
|
constructor(err: Error, { from }?: {
|
|
5
11
|
from?: string;
|
package/dist/napi-binding.d.ts
CHANGED
|
@@ -321,7 +321,7 @@ export declare class JsCompilation {
|
|
|
321
321
|
}
|
|
322
322
|
|
|
323
323
|
export declare class JsCompiler {
|
|
324
|
-
constructor(compilerPath: string, options: RawOptions, builtinPlugins: Array<BuiltinPlugin>, registerJsTaps: RegisterJsTaps, outputFilesystem: ThreadsafeNodeFS, intermediateFilesystem: ThreadsafeNodeFS | undefined | null, inputFilesystem: ThreadsafeNodeFS | undefined | null, resolverFactoryReference: JsResolverFactory)
|
|
324
|
+
constructor(compilerPath: string, options: RawOptions, builtinPlugins: Array<BuiltinPlugin>, registerJsTaps: RegisterJsTaps, outputFilesystem: ThreadsafeNodeFS, intermediateFilesystem: ThreadsafeNodeFS | undefined | null, inputFilesystem: ThreadsafeNodeFS | undefined | null, resolverFactoryReference: JsResolverFactory, unsafeFastDrop: boolean)
|
|
325
325
|
setNonSkippableRegisters(kinds: Array<RegisterJsTapKind>): void
|
|
326
326
|
/** Build with the given option passed to the constructor */
|
|
327
327
|
build(callback: (err: null | Error) => void): void
|
|
@@ -2087,6 +2087,10 @@ export interface RawEnvironment {
|
|
|
2087
2087
|
dynamicImportInWorker?: boolean
|
|
2088
2088
|
}
|
|
2089
2089
|
|
|
2090
|
+
export interface RawEsmLibraryPlugin {
|
|
2091
|
+
preserveModules?: string
|
|
2092
|
+
}
|
|
2093
|
+
|
|
2090
2094
|
export interface RawEvalDevToolModulePluginOptions {
|
|
2091
2095
|
namespace?: string
|
|
2092
2096
|
moduleFilenameTemplate?: string | ((info: RawModuleFilenameTemplateFnCtx) => string)
|
|
@@ -2112,6 +2116,7 @@ inlineConst: boolean
|
|
|
2112
2116
|
inlineEnum: boolean
|
|
2113
2117
|
typeReexportsPresence: boolean
|
|
2114
2118
|
lazyBarrel: boolean
|
|
2119
|
+
deferImport: boolean
|
|
2115
2120
|
}
|
|
2116
2121
|
|
|
2117
2122
|
export interface RawExperimentSnapshotOptions {
|
|
@@ -2348,6 +2353,7 @@ typeReexportsPresence?: string
|
|
|
2348
2353
|
* @experimental
|
|
2349
2354
|
*/
|
|
2350
2355
|
jsx?: boolean
|
|
2356
|
+
deferImport?: boolean
|
|
2351
2357
|
}
|
|
2352
2358
|
|
|
2353
2359
|
export interface RawJsonGeneratorOptions {
|
|
@@ -2451,6 +2457,7 @@ export interface RawModuleOptions {
|
|
|
2451
2457
|
parser?: Record<string, RawParserOptions>
|
|
2452
2458
|
generator?: Record<string, RawGeneratorOptions>
|
|
2453
2459
|
noParse?: string | RegExp | ((request: string) => boolean) | (string | RegExp | ((request: string) => boolean))[]
|
|
2460
|
+
unsafeCache?: boolean | RegExp
|
|
2454
2461
|
}
|
|
2455
2462
|
|
|
2456
2463
|
export interface RawModuleRule {
|
|
Binary file
|
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
import type { Compiler } from "../Compiler";
|
|
2
|
+
export declare const SHARED_ITEM_NAMES: {
|
|
3
|
+
"compilation.children[]": string;
|
|
4
|
+
"compilation.modules[]": string;
|
|
5
|
+
"compilation.entrypoints[]": string;
|
|
6
|
+
"compilation.namedChunkGroups[]": string;
|
|
7
|
+
"compilation.errors[]": string;
|
|
8
|
+
"chunk.modules[]": string;
|
|
9
|
+
"chunk.origins[]": string;
|
|
10
|
+
"compilation.chunks[]": string;
|
|
11
|
+
"compilation.assets[]": string;
|
|
12
|
+
"asset.related[]": string;
|
|
13
|
+
"module.issuerPath[]": string;
|
|
14
|
+
"module.reasons[]": string;
|
|
15
|
+
"module.modules[]": string;
|
|
16
|
+
"module.children[]": string;
|
|
17
|
+
};
|
|
2
18
|
export declare class DefaultStatsFactoryPlugin {
|
|
3
19
|
apply(compiler: Compiler): void;
|
|
4
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack-canary/browser",
|
|
3
|
-
"version": "1.6.0-canary-
|
|
3
|
+
"version": "1.6.0-canary-0eb13821-20251021173640",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Rspack for running in the browser. This is still in early stage and may not follow the semver.",
|