@rspack/browser 1.5.0 → 1.5.2
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/MultiWatching.d.ts +1 -1
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +2 -16
- package/dist/config/adapterRuleUse.d.ts +26 -2
- package/dist/index.mjs +230 -208
- package/dist/napi-binding.d.ts +7 -12
- package/dist/rspack.wasm32-wasi.wasm +0 -0
- package/dist/schema/config.d.ts +1 -0
- package/dist/schema/loaders.d.ts +1 -0
- package/package.json +1 -1
package/dist/MultiWatching.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ declare class MultiWatching {
|
|
|
18
18
|
* @param compiler - the compiler
|
|
19
19
|
*/
|
|
20
20
|
constructor(watchings: Watching[], compiler: MultiCompiler);
|
|
21
|
-
invalidate(callback
|
|
21
|
+
invalidate(callback?: Callback<Error, void>): void;
|
|
22
22
|
invalidateWithChangesAndRemovals(changedFiles?: Set<string>, removedFiles?: Set<string>, callback?: Callback<Error, void>): void;
|
|
23
23
|
close(callback: Callback<Error, void>): void;
|
|
24
24
|
suspend(): void;
|
|
@@ -1,22 +1,8 @@
|
|
|
1
1
|
import type { Module } from "../../Module";
|
|
2
2
|
export declare const BuiltinLazyCompilationPlugin: {
|
|
3
|
-
new (
|
|
4
|
-
module: string;
|
|
5
|
-
path: string;
|
|
6
|
-
}) => {
|
|
7
|
-
active: boolean;
|
|
8
|
-
data: string;
|
|
9
|
-
client: string;
|
|
10
|
-
}, cacheable: boolean, entries: boolean, imports: boolean, test?: RegExp | ((module: Module) => boolean) | undefined): {
|
|
3
|
+
new (currentActiveModules: () => Set<string>, entries: boolean, imports: boolean, client: string, test?: RegExp | ((module: Module) => boolean) | undefined): {
|
|
11
4
|
name: string;
|
|
12
|
-
_args: [
|
|
13
|
-
module: string;
|
|
14
|
-
path: string;
|
|
15
|
-
}) => {
|
|
16
|
-
active: boolean;
|
|
17
|
-
data: string;
|
|
18
|
-
client: string;
|
|
19
|
-
}, cacheable: boolean, entries: boolean, imports: boolean, test?: RegExp | ((module: Module) => boolean) | undefined];
|
|
5
|
+
_args: [currentActiveModules: () => Set<string>, entries: boolean, imports: boolean, client: string, test?: RegExp | ((module: Module) => boolean) | undefined];
|
|
20
6
|
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
21
7
|
raw(compiler: import("../..").Compiler): import("../../binding").BuiltinPlugin;
|
|
22
8
|
apply(compiler: import("../..").Compiler): void;
|
|
@@ -322,8 +322,32 @@ export interface LoaderContext<OptionsType = {}> {
|
|
|
322
322
|
*/
|
|
323
323
|
__internal__setParseMeta: (key: string, value: string) => void;
|
|
324
324
|
}
|
|
325
|
-
export type LoaderDefinitionFunction<OptionsType = {}, ContextAdditions = {}> = (this: LoaderContext<OptionsType> & ContextAdditions, content: string, sourceMap?: string | SourceMap, additionalData?: AdditionalData) => string | void | Buffer | Promise<string | Buffer>;
|
|
326
|
-
export type PitchLoaderDefinitionFunction<OptionsType = {}, ContextAdditions = {}> = (this: LoaderContext<OptionsType> & ContextAdditions, remainingRequest: string, previousRequest: string, data: object) => string | void | Buffer | Promise<string | Buffer>;
|
|
325
|
+
export type LoaderDefinitionFunction<OptionsType = {}, ContextAdditions = {}> = (this: LoaderContext<OptionsType> & ContextAdditions, content: string, sourceMap?: string | SourceMap, additionalData?: AdditionalData) => string | void | Buffer | Promise<string | Buffer | void>;
|
|
326
|
+
export type PitchLoaderDefinitionFunction<OptionsType = {}, ContextAdditions = {}> = (this: LoaderContext<OptionsType> & ContextAdditions, remainingRequest: string, previousRequest: string, data: object) => string | void | Buffer | Promise<string | Buffer | void>;
|
|
327
|
+
/**
|
|
328
|
+
* Defines a loader for Rspack.
|
|
329
|
+
* A loader is a transformer that converts various types of modules into Rspack
|
|
330
|
+
* supported types. By using different kinds of loaders, you can extend Rspack to
|
|
331
|
+
* process additional module types, including JSX, Markdown, Sass, Less, and more.
|
|
332
|
+
*
|
|
333
|
+
* @template OptionsType - The type of options that the loader accepts
|
|
334
|
+
* @template ContextAdditions - Additional properties to add to the loader context
|
|
335
|
+
*
|
|
336
|
+
* @example
|
|
337
|
+
* ```ts
|
|
338
|
+
* import type { LoaderDefinition } from '@rspack/core';
|
|
339
|
+
*
|
|
340
|
+
* type MyLoaderOptions = {
|
|
341
|
+
* foo: string;
|
|
342
|
+
* };
|
|
343
|
+
*
|
|
344
|
+
* const myLoader: LoaderDefinition<MyLoaderOptions> = function(source) {
|
|
345
|
+
* return someOperation(source);
|
|
346
|
+
* };
|
|
347
|
+
*
|
|
348
|
+
* export default myLoader;
|
|
349
|
+
* ```
|
|
350
|
+
*/
|
|
327
351
|
export type LoaderDefinition<OptionsType = {}, ContextAdditions = {}> = LoaderDefinitionFunction<OptionsType, ContextAdditions> & {
|
|
328
352
|
raw?: false;
|
|
329
353
|
pitch?: PitchLoaderDefinitionFunction;
|
package/dist/index.mjs
CHANGED
|
@@ -35090,6 +35090,93 @@ var __webpack_modules__ = {
|
|
|
35090
35090
|
const { readFileSync, readdirSync, lstat, existsSync, readdir, watch } = fs;
|
|
35091
35091
|
const __WEBPACK_DEFAULT_EXPORT__ = fs;
|
|
35092
35092
|
},
|
|
35093
|
+
"./src/builtin-plugin/base.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
35094
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
35095
|
+
Gp: ()=>canInherentFromParent,
|
|
35096
|
+
Xj: ()=>RspackBuiltinPlugin,
|
|
35097
|
+
dE: ()=>createNativePlugin,
|
|
35098
|
+
no: ()=>createBuiltinPlugin,
|
|
35099
|
+
vt: ()=>create
|
|
35100
|
+
});
|
|
35101
|
+
var _rspack_binding__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("@rspack/binding");
|
|
35102
|
+
function _define_property(obj, key, value) {
|
|
35103
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
35104
|
+
value: value,
|
|
35105
|
+
enumerable: true,
|
|
35106
|
+
configurable: true,
|
|
35107
|
+
writable: true
|
|
35108
|
+
});
|
|
35109
|
+
else obj[key] = value;
|
|
35110
|
+
return obj;
|
|
35111
|
+
}
|
|
35112
|
+
const HOOKS_CAN_NOT_INHERENT_FROM_PARENT = [
|
|
35113
|
+
"make",
|
|
35114
|
+
"compile",
|
|
35115
|
+
"emit",
|
|
35116
|
+
"afterEmit",
|
|
35117
|
+
"invalid",
|
|
35118
|
+
"done",
|
|
35119
|
+
"thisCompilation"
|
|
35120
|
+
];
|
|
35121
|
+
function canInherentFromParent(affectedHooks) {
|
|
35122
|
+
if (void 0 === affectedHooks) return false;
|
|
35123
|
+
return !HOOKS_CAN_NOT_INHERENT_FROM_PARENT.includes(affectedHooks);
|
|
35124
|
+
}
|
|
35125
|
+
class RspackBuiltinPlugin {
|
|
35126
|
+
apply(compiler) {
|
|
35127
|
+
const raw = this.raw(compiler);
|
|
35128
|
+
if (raw) {
|
|
35129
|
+
raw.canInherentFromParent = canInherentFromParent(this.affectedHooks);
|
|
35130
|
+
compiler.__internal__registerBuiltinPlugin(raw);
|
|
35131
|
+
}
|
|
35132
|
+
}
|
|
35133
|
+
constructor(){
|
|
35134
|
+
_define_property(this, "affectedHooks", void 0);
|
|
35135
|
+
}
|
|
35136
|
+
}
|
|
35137
|
+
function createBuiltinPlugin(name, options) {
|
|
35138
|
+
return {
|
|
35139
|
+
name: name,
|
|
35140
|
+
options: options ?? false
|
|
35141
|
+
};
|
|
35142
|
+
}
|
|
35143
|
+
function create(name, resolve, affectedHooks) {
|
|
35144
|
+
class Plugin extends RspackBuiltinPlugin {
|
|
35145
|
+
raw(compiler) {
|
|
35146
|
+
return createBuiltinPlugin(name, resolve.apply(compiler, this._args));
|
|
35147
|
+
}
|
|
35148
|
+
constructor(...args){
|
|
35149
|
+
super(), _define_property(this, "name", name), _define_property(this, "_args", void 0), _define_property(this, "affectedHooks", affectedHooks);
|
|
35150
|
+
this._args = args;
|
|
35151
|
+
}
|
|
35152
|
+
}
|
|
35153
|
+
Object.defineProperty(Plugin, "name", {
|
|
35154
|
+
value: name
|
|
35155
|
+
});
|
|
35156
|
+
return Plugin;
|
|
35157
|
+
}
|
|
35158
|
+
const INTERNAL_PLUGIN_NAMES = Object.keys(_rspack_binding__WEBPACK_IMPORTED_MODULE_0__["default"].BuiltinPluginName);
|
|
35159
|
+
function createNativePlugin(name, resolve, affectedHooks) {
|
|
35160
|
+
if (INTERNAL_PLUGIN_NAMES.includes(name)) throw new Error(`Cannot register native plugin with name '${name}', it conflicts with internal plugin names.`);
|
|
35161
|
+
return create(name, resolve, affectedHooks);
|
|
35162
|
+
}
|
|
35163
|
+
},
|
|
35164
|
+
"./src/builtin-plugin/lazy-compilation/lazyCompilation.ts": function(module, __webpack_exports__, __webpack_require__) {
|
|
35165
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
35166
|
+
a: ()=>BuiltinLazyCompilationPlugin
|
|
35167
|
+
});
|
|
35168
|
+
var external_rspack_wasi_browser_js_ = __webpack_require__("@rspack/binding");
|
|
35169
|
+
var base = __webpack_require__("./src/builtin-plugin/base.ts");
|
|
35170
|
+
module = __webpack_require__.hmd(module);
|
|
35171
|
+
const BuiltinLazyCompilationPlugin = (0, base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.LazyCompilationPlugin, (currentActiveModules, entries, imports, client, test)=>({
|
|
35172
|
+
module,
|
|
35173
|
+
imports,
|
|
35174
|
+
entries,
|
|
35175
|
+
test,
|
|
35176
|
+
client,
|
|
35177
|
+
currentActiveModules
|
|
35178
|
+
}), "thisCompilation");
|
|
35179
|
+
},
|
|
35093
35180
|
"@rspack/binding": function(module) {
|
|
35094
35181
|
module.exports = __WEBPACK_EXTERNAL_MODULE__rspack_wasi_browser_js_bd433424__;
|
|
35095
35182
|
},
|
|
@@ -35345,6 +35432,19 @@ function __webpack_require__(moduleId) {
|
|
|
35345
35432
|
});
|
|
35346
35433
|
};
|
|
35347
35434
|
})();
|
|
35435
|
+
(()=>{
|
|
35436
|
+
__webpack_require__.hmd = (module)=>{
|
|
35437
|
+
module = Object.create(module);
|
|
35438
|
+
if (!module.children) module.children = [];
|
|
35439
|
+
Object.defineProperty(module, 'exports', {
|
|
35440
|
+
enumerable: true,
|
|
35441
|
+
set: ()=>{
|
|
35442
|
+
throw new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);
|
|
35443
|
+
}
|
|
35444
|
+
});
|
|
35445
|
+
return module;
|
|
35446
|
+
};
|
|
35447
|
+
})();
|
|
35348
35448
|
(()=>{
|
|
35349
35449
|
__webpack_require__.g = (()=>{
|
|
35350
35450
|
if ('object' == typeof globalThis) return globalThis;
|
|
@@ -37691,72 +37791,12 @@ class Entries {
|
|
|
37691
37791
|
Compilation_class_private_field_set(this, _data, data);
|
|
37692
37792
|
}
|
|
37693
37793
|
}
|
|
37694
|
-
|
|
37695
|
-
|
|
37696
|
-
|
|
37697
|
-
|
|
37698
|
-
|
|
37699
|
-
|
|
37700
|
-
});
|
|
37701
|
-
else obj[key] = value;
|
|
37702
|
-
return obj;
|
|
37703
|
-
}
|
|
37704
|
-
const HOOKS_CAN_NOT_INHERENT_FROM_PARENT = [
|
|
37705
|
-
"make",
|
|
37706
|
-
"compile",
|
|
37707
|
-
"emit",
|
|
37708
|
-
"afterEmit",
|
|
37709
|
-
"invalid",
|
|
37710
|
-
"done",
|
|
37711
|
-
"thisCompilation"
|
|
37712
|
-
];
|
|
37713
|
-
function canInherentFromParent(affectedHooks) {
|
|
37714
|
-
if (void 0 === affectedHooks) return false;
|
|
37715
|
-
return !HOOKS_CAN_NOT_INHERENT_FROM_PARENT.includes(affectedHooks);
|
|
37716
|
-
}
|
|
37717
|
-
class RspackBuiltinPlugin {
|
|
37718
|
-
apply(compiler) {
|
|
37719
|
-
const raw = this.raw(compiler);
|
|
37720
|
-
if (raw) {
|
|
37721
|
-
raw.canInherentFromParent = canInherentFromParent(this.affectedHooks);
|
|
37722
|
-
compiler.__internal__registerBuiltinPlugin(raw);
|
|
37723
|
-
}
|
|
37724
|
-
}
|
|
37725
|
-
constructor(){
|
|
37726
|
-
base_define_property(this, "affectedHooks", void 0);
|
|
37727
|
-
}
|
|
37728
|
-
}
|
|
37729
|
-
function createBuiltinPlugin(name, options) {
|
|
37730
|
-
return {
|
|
37731
|
-
name: name,
|
|
37732
|
-
options: options ?? false
|
|
37733
|
-
};
|
|
37734
|
-
}
|
|
37735
|
-
function base_create(name, resolve, affectedHooks) {
|
|
37736
|
-
class Plugin extends RspackBuiltinPlugin {
|
|
37737
|
-
raw(compiler) {
|
|
37738
|
-
return createBuiltinPlugin(name, resolve.apply(compiler, this._args));
|
|
37739
|
-
}
|
|
37740
|
-
constructor(...args){
|
|
37741
|
-
super(), base_define_property(this, "name", name), base_define_property(this, "_args", void 0), base_define_property(this, "affectedHooks", affectedHooks);
|
|
37742
|
-
this._args = args;
|
|
37743
|
-
}
|
|
37744
|
-
}
|
|
37745
|
-
Object.defineProperty(Plugin, "name", {
|
|
37746
|
-
value: name
|
|
37747
|
-
});
|
|
37748
|
-
return Plugin;
|
|
37749
|
-
}
|
|
37750
|
-
const INTERNAL_PLUGIN_NAMES = Object.keys(external_rspack_wasi_browser_js_["default"].BuiltinPluginName);
|
|
37751
|
-
function createNativePlugin(name, resolve, affectedHooks) {
|
|
37752
|
-
if (INTERNAL_PLUGIN_NAMES.includes(name)) throw new Error(`Cannot register native plugin with name '${name}', it conflicts with internal plugin names.`);
|
|
37753
|
-
return base_create(name, resolve, affectedHooks);
|
|
37754
|
-
}
|
|
37755
|
-
const APIPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.APIPlugin, ()=>{});
|
|
37756
|
-
const ArrayPushCallbackChunkFormatPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.ArrayPushCallbackChunkFormatPlugin, ()=>{});
|
|
37757
|
-
const AssetModulesPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.AssetModulesPlugin, ()=>{}, "compilation");
|
|
37758
|
-
const AsyncWebAssemblyModulesPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.AsyncWebAssemblyModulesPlugin, ()=>{}, "compilation");
|
|
37759
|
-
const BannerPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.BannerPlugin, (args)=>{
|
|
37794
|
+
var builtin_plugin_base = __webpack_require__("./src/builtin-plugin/base.ts");
|
|
37795
|
+
const APIPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.APIPlugin, ()=>{});
|
|
37796
|
+
const ArrayPushCallbackChunkFormatPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.ArrayPushCallbackChunkFormatPlugin, ()=>{});
|
|
37797
|
+
const AssetModulesPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.AssetModulesPlugin, ()=>{}, "compilation");
|
|
37798
|
+
const AsyncWebAssemblyModulesPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.AsyncWebAssemblyModulesPlugin, ()=>{}, "compilation");
|
|
37799
|
+
const BannerPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.BannerPlugin, (args)=>{
|
|
37760
37800
|
if ("string" == typeof args || "function" == typeof args) return {
|
|
37761
37801
|
banner: args
|
|
37762
37802
|
};
|
|
@@ -37771,12 +37811,12 @@ const BannerPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginN
|
|
|
37771
37811
|
exclude: args.exclude
|
|
37772
37812
|
};
|
|
37773
37813
|
});
|
|
37774
|
-
const BundlerInfoRspackPlugin =
|
|
37814
|
+
const BundlerInfoRspackPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.BundlerInfoRspackPlugin, (options)=>({
|
|
37775
37815
|
version: options.version || "unknown",
|
|
37776
37816
|
bundler: options.bundler || "rspack",
|
|
37777
37817
|
force: options.force ?? true
|
|
37778
37818
|
}));
|
|
37779
|
-
const ChunkPrefetchPreloadPlugin =
|
|
37819
|
+
const ChunkPrefetchPreloadPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.ChunkPrefetchPreloadPlugin, ()=>{});
|
|
37780
37820
|
function CircularDependencyRspackPlugin_define_property(obj, key, value) {
|
|
37781
37821
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
37782
37822
|
value: value,
|
|
@@ -37787,7 +37827,7 @@ function CircularDependencyRspackPlugin_define_property(obj, key, value) {
|
|
|
37787
37827
|
else obj[key] = value;
|
|
37788
37828
|
return obj;
|
|
37789
37829
|
}
|
|
37790
|
-
class CircularDependencyRspackPlugin extends
|
|
37830
|
+
class CircularDependencyRspackPlugin extends builtin_plugin_base.Xj {
|
|
37791
37831
|
raw(compiler) {
|
|
37792
37832
|
const { failOnError, allowAsyncCycles, exclude, ignoredConnections } = this._options;
|
|
37793
37833
|
const rawOptions = {
|
|
@@ -37812,15 +37852,15 @@ class CircularDependencyRspackPlugin extends RspackBuiltinPlugin {
|
|
|
37812
37852
|
this._options.onEnd(compilation);
|
|
37813
37853
|
} : void 0
|
|
37814
37854
|
};
|
|
37815
|
-
return
|
|
37855
|
+
return (0, builtin_plugin_base.no)(this.name, rawOptions);
|
|
37816
37856
|
}
|
|
37817
37857
|
constructor(options){
|
|
37818
37858
|
super(), CircularDependencyRspackPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.CircularDependencyRspackPlugin), CircularDependencyRspackPlugin_define_property(this, "_options", void 0);
|
|
37819
37859
|
this._options = options;
|
|
37820
37860
|
}
|
|
37821
37861
|
}
|
|
37822
|
-
const CommonJsChunkFormatPlugin =
|
|
37823
|
-
const ContextReplacementPlugin =
|
|
37862
|
+
const CommonJsChunkFormatPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.CommonJsChunkFormatPlugin, ()=>{});
|
|
37863
|
+
const ContextReplacementPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.ContextReplacementPlugin, (resourceRegExp, newContentResource, newContentRecursive, newContentRegExp)=>{
|
|
37824
37864
|
const rawOptions = {
|
|
37825
37865
|
resourceRegExp
|
|
37826
37866
|
};
|
|
@@ -37845,7 +37885,7 @@ const ContextReplacementPlugin = base_create(external_rspack_wasi_browser_js_.Bu
|
|
|
37845
37885
|
}
|
|
37846
37886
|
return rawOptions;
|
|
37847
37887
|
});
|
|
37848
|
-
const CopyRspackPlugin =
|
|
37888
|
+
const CopyRspackPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.CopyRspackPlugin, (copy)=>{
|
|
37849
37889
|
const ret = {
|
|
37850
37890
|
patterns: []
|
|
37851
37891
|
};
|
|
@@ -37865,7 +37905,7 @@ const CopyRspackPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPlu
|
|
|
37865
37905
|
});
|
|
37866
37906
|
return ret;
|
|
37867
37907
|
});
|
|
37868
|
-
const CssChunkingPlugin =
|
|
37908
|
+
const CssChunkingPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_["default"].BuiltinPluginName.CssChunkingPlugin, function(options = {}) {
|
|
37869
37909
|
if (options.nextjs) return {
|
|
37870
37910
|
strict: options.strict,
|
|
37871
37911
|
minSize: options.minSize,
|
|
@@ -37881,7 +37921,7 @@ const CssChunkingPlugin = base_create(external_rspack_wasi_browser_js_["default"
|
|
|
37881
37921
|
}
|
|
37882
37922
|
return options;
|
|
37883
37923
|
});
|
|
37884
|
-
const CssModulesPlugin =
|
|
37924
|
+
const CssModulesPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.CssModulesPlugin, ()=>{}, "compilation");
|
|
37885
37925
|
var path_browserify = __webpack_require__("../../node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.js");
|
|
37886
37926
|
var path_browserify_default = /*#__PURE__*/ __webpack_require__.n(path_browserify);
|
|
37887
37927
|
const utils_PLUGIN_NAME = "css-extract-rspack-plugin";
|
|
@@ -37948,8 +37988,8 @@ class CssExtractRspackPlugin {
|
|
|
37948
37988
|
}
|
|
37949
37989
|
css_extract_define_property(CssExtractRspackPlugin, "pluginName", utils_PLUGIN_NAME);
|
|
37950
37990
|
css_extract_define_property(CssExtractRspackPlugin, "loader", LOADER_PATH);
|
|
37951
|
-
const DataUriPlugin =
|
|
37952
|
-
const DefinePlugin =
|
|
37991
|
+
const DataUriPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.DataUriPlugin, ()=>{}, "compilation");
|
|
37992
|
+
const DefinePlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.DefinePlugin, function(define1) {
|
|
37953
37993
|
var _this_options_output_environment;
|
|
37954
37994
|
const supportsBigIntLiteral = (null == (_this_options_output_environment = this.options.output.environment) ? void 0 : _this_options_output_environment.bigIntLiteral) ?? false;
|
|
37955
37995
|
return normalizeValue(define1, supportsBigIntLiteral);
|
|
@@ -37987,9 +38027,9 @@ function DeterministicChunkIdsPlugin_define_property(obj, key, value) {
|
|
|
37987
38027
|
else obj[key] = value;
|
|
37988
38028
|
return obj;
|
|
37989
38029
|
}
|
|
37990
|
-
class DeterministicChunkIdsPlugin extends
|
|
38030
|
+
class DeterministicChunkIdsPlugin extends builtin_plugin_base.Xj {
|
|
37991
38031
|
raw(compiler) {
|
|
37992
|
-
return
|
|
38032
|
+
return (0, builtin_plugin_base.no)(this.name, void 0);
|
|
37993
38033
|
}
|
|
37994
38034
|
constructor(...args){
|
|
37995
38035
|
super(...args), DeterministicChunkIdsPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.DeterministicChunkIdsPlugin), DeterministicChunkIdsPlugin_define_property(this, "affectedHooks", "compilation");
|
|
@@ -38005,20 +38045,20 @@ function DeterministicModuleIdsPlugin_define_property(obj, key, value) {
|
|
|
38005
38045
|
else obj[key] = value;
|
|
38006
38046
|
return obj;
|
|
38007
38047
|
}
|
|
38008
|
-
class DeterministicModuleIdsPlugin extends
|
|
38048
|
+
class DeterministicModuleIdsPlugin extends builtin_plugin_base.Xj {
|
|
38009
38049
|
raw(compiler) {
|
|
38010
|
-
return
|
|
38050
|
+
return (0, builtin_plugin_base.no)(this.name, void 0);
|
|
38011
38051
|
}
|
|
38012
38052
|
constructor(...args){
|
|
38013
38053
|
super(...args), DeterministicModuleIdsPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.DeterministicModuleIdsPlugin), DeterministicModuleIdsPlugin_define_property(this, "affectedHooks", "compilation");
|
|
38014
38054
|
}
|
|
38015
38055
|
}
|
|
38016
|
-
const DllEntryPlugin =
|
|
38056
|
+
const DllEntryPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.DllEntryPlugin, (context, entries, options)=>({
|
|
38017
38057
|
context,
|
|
38018
38058
|
entries,
|
|
38019
38059
|
name: options.name
|
|
38020
38060
|
}));
|
|
38021
|
-
const DllReferenceAgencyPlugin =
|
|
38061
|
+
const DllReferenceAgencyPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.DllReferenceAgencyPlugin, (options)=>options);
|
|
38022
38062
|
var assert = __webpack_require__("../../node_modules/.pnpm/assert@2.1.0/node_modules/assert/build/assert.js");
|
|
38023
38063
|
var assert_default = /*#__PURE__*/ __webpack_require__.n(assert);
|
|
38024
38064
|
class EntryOptionPlugin {
|
|
@@ -38055,7 +38095,7 @@ class EntryOptionPlugin {
|
|
|
38055
38095
|
}
|
|
38056
38096
|
}
|
|
38057
38097
|
const lib_EntryOptionPlugin = EntryOptionPlugin;
|
|
38058
|
-
const OriginEntryPlugin =
|
|
38098
|
+
const OriginEntryPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.EntryPlugin, (context, entry, options = "")=>{
|
|
38059
38099
|
const entryOptions = "string" == typeof options ? {
|
|
38060
38100
|
name: options
|
|
38061
38101
|
} : options;
|
|
@@ -38093,7 +38133,7 @@ function DynamicEntryPlugin_define_property(obj, key, value) {
|
|
|
38093
38133
|
else obj[key] = value;
|
|
38094
38134
|
return obj;
|
|
38095
38135
|
}
|
|
38096
|
-
class DynamicEntryPlugin extends
|
|
38136
|
+
class DynamicEntryPlugin extends builtin_plugin_base.Xj {
|
|
38097
38137
|
raw(compiler) {
|
|
38098
38138
|
const raw = {
|
|
38099
38139
|
context: this.context,
|
|
@@ -38108,14 +38148,14 @@ class DynamicEntryPlugin extends RspackBuiltinPlugin {
|
|
|
38108
38148
|
});
|
|
38109
38149
|
}
|
|
38110
38150
|
};
|
|
38111
|
-
return
|
|
38151
|
+
return (0, builtin_plugin_base.no)(this.name, raw);
|
|
38112
38152
|
}
|
|
38113
38153
|
constructor(context, entry){
|
|
38114
38154
|
super(), DynamicEntryPlugin_define_property(this, "context", void 0), DynamicEntryPlugin_define_property(this, "entry", void 0), DynamicEntryPlugin_define_property(this, "name", void 0), DynamicEntryPlugin_define_property(this, "affectedHooks", void 0), this.context = context, this.entry = entry, this.name = external_rspack_wasi_browser_js_.BuiltinPluginName.DynamicEntryPlugin, this.affectedHooks = "make";
|
|
38115
38155
|
}
|
|
38116
38156
|
}
|
|
38117
|
-
const ElectronTargetPlugin =
|
|
38118
|
-
const EnableChunkLoadingPluginInner =
|
|
38157
|
+
const ElectronTargetPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.ElectronTargetPlugin, (context)=>context ?? "none");
|
|
38158
|
+
const EnableChunkLoadingPluginInner = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.EnableChunkLoadingPlugin, (type)=>type);
|
|
38119
38159
|
const enabledTypes = new WeakMap();
|
|
38120
38160
|
const getEnabledTypes = (compiler)=>{
|
|
38121
38161
|
let set = enabledTypes.get(compiler);
|
|
@@ -38175,7 +38215,7 @@ const EnableLibraryPlugin_getEnabledTypes = (compiler)=>{
|
|
|
38175
38215
|
}
|
|
38176
38216
|
return set;
|
|
38177
38217
|
};
|
|
38178
|
-
class EnableLibraryPlugin extends
|
|
38218
|
+
class EnableLibraryPlugin extends builtin_plugin_base.Xj {
|
|
38179
38219
|
static setEnabled(compiler, type) {
|
|
38180
38220
|
EnableLibraryPlugin_getEnabledTypes(compiler).add(type);
|
|
38181
38221
|
}
|
|
@@ -38187,16 +38227,16 @@ class EnableLibraryPlugin extends RspackBuiltinPlugin {
|
|
|
38187
38227
|
const enabled = EnableLibraryPlugin_getEnabledTypes(compiler);
|
|
38188
38228
|
if (enabled.has(type)) return;
|
|
38189
38229
|
enabled.add(type);
|
|
38190
|
-
return
|
|
38230
|
+
return (0, builtin_plugin_base.no)(this.name, type);
|
|
38191
38231
|
}
|
|
38192
38232
|
constructor(type){
|
|
38193
38233
|
super(), EnableLibraryPlugin_define_property(this, "type", void 0), EnableLibraryPlugin_define_property(this, "name", void 0), this.type = type, this.name = external_rspack_wasi_browser_js_.BuiltinPluginName.EnableLibraryPlugin;
|
|
38194
38234
|
}
|
|
38195
38235
|
}
|
|
38196
|
-
const EnableWasmLoadingPlugin =
|
|
38197
|
-
const EnsureChunkConditionsPlugin =
|
|
38198
|
-
const EvalDevToolModulePlugin =
|
|
38199
|
-
const EvalSourceMapDevToolPlugin =
|
|
38236
|
+
const EnableWasmLoadingPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.EnableWasmLoadingPlugin, (type)=>type);
|
|
38237
|
+
const EnsureChunkConditionsPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.EnsureChunkConditionsPlugin, ()=>{});
|
|
38238
|
+
const EvalDevToolModulePlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.EvalDevToolModulePlugin, (options)=>options, "compilation");
|
|
38239
|
+
const EvalSourceMapDevToolPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.EvalSourceMapDevToolPlugin, (options)=>options, "compilation");
|
|
38200
38240
|
function isNil(value) {
|
|
38201
38241
|
return null == value;
|
|
38202
38242
|
}
|
|
@@ -40576,7 +40616,7 @@ function ExternalsPlugin_define_property(obj, key, value) {
|
|
|
40576
40616
|
return obj;
|
|
40577
40617
|
}
|
|
40578
40618
|
var _resolveRequestCache = /*#__PURE__*/ new WeakMap(), _processResolveResult = /*#__PURE__*/ new WeakMap(), _processRequest = /*#__PURE__*/ new WeakSet(), _getRawExternalItem = /*#__PURE__*/ new WeakMap();
|
|
40579
|
-
class ExternalsPlugin extends
|
|
40619
|
+
class ExternalsPlugin extends builtin_plugin_base.Xj {
|
|
40580
40620
|
raw() {
|
|
40581
40621
|
const type = this.type;
|
|
40582
40622
|
const externals = this.externals;
|
|
@@ -40587,7 +40627,7 @@ class ExternalsPlugin extends RspackBuiltinPlugin {
|
|
|
40587
40627
|
]).filter(Boolean).map((item)=>ExternalsPlugin_class_private_field_get(this, _getRawExternalItem).call(this, item)),
|
|
40588
40628
|
placeInInitial: this.placeInInitial ?? false
|
|
40589
40629
|
};
|
|
40590
|
-
return
|
|
40630
|
+
return (0, builtin_plugin_base.no)(this.name, raw);
|
|
40591
40631
|
}
|
|
40592
40632
|
constructor(type, externals, placeInInitial){
|
|
40593
40633
|
super(), ExternalsPlugin_class_private_method_init(this, _processRequest), ExternalsPlugin_define_property(this, "type", void 0), ExternalsPlugin_define_property(this, "externals", void 0), ExternalsPlugin_define_property(this, "placeInInitial", void 0), ExternalsPlugin_define_property(this, "name", void 0), ExternalsPlugin_class_private_field_init(this, _resolveRequestCache, {
|
|
@@ -40683,9 +40723,9 @@ function getRawExternalItemValue(value) {
|
|
|
40683
40723
|
]));
|
|
40684
40724
|
return value;
|
|
40685
40725
|
}
|
|
40686
|
-
const FetchCompileAsyncWasmPlugin =
|
|
40687
|
-
const FileUriPlugin =
|
|
40688
|
-
const FlagDependencyExportsPlugin =
|
|
40726
|
+
const FetchCompileAsyncWasmPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.FetchCompileAsyncWasmPlugin, ()=>{}, "thisCompilation");
|
|
40727
|
+
const FileUriPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.FileUriPlugin, ()=>{}, "compilation");
|
|
40728
|
+
const FlagDependencyExportsPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.FlagDependencyExportsPlugin, ()=>{}, "compilation");
|
|
40689
40729
|
function FlagDependencyUsagePlugin_define_property(obj, key, value) {
|
|
40690
40730
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
40691
40731
|
value: value,
|
|
@@ -40696,9 +40736,9 @@ function FlagDependencyUsagePlugin_define_property(obj, key, value) {
|
|
|
40696
40736
|
else obj[key] = value;
|
|
40697
40737
|
return obj;
|
|
40698
40738
|
}
|
|
40699
|
-
class FlagDependencyUsagePlugin extends
|
|
40739
|
+
class FlagDependencyUsagePlugin extends builtin_plugin_base.Xj {
|
|
40700
40740
|
raw(compiler) {
|
|
40701
|
-
return
|
|
40741
|
+
return (0, builtin_plugin_base.no)(this.name, this.global);
|
|
40702
40742
|
}
|
|
40703
40743
|
constructor(global){
|
|
40704
40744
|
super(), FlagDependencyUsagePlugin_define_property(this, "global", void 0), FlagDependencyUsagePlugin_define_property(this, "name", void 0), FlagDependencyUsagePlugin_define_property(this, "affectedHooks", void 0), this.global = global, this.name = external_rspack_wasi_browser_js_.BuiltinPluginName.FlagDependencyUsagePlugin, this.affectedHooks = "compilation";
|
|
@@ -40714,16 +40754,16 @@ function HotModuleReplacementPlugin_define_property(obj, key, value) {
|
|
|
40714
40754
|
else obj[key] = value;
|
|
40715
40755
|
return obj;
|
|
40716
40756
|
}
|
|
40717
|
-
class HotModuleReplacementPlugin extends
|
|
40757
|
+
class HotModuleReplacementPlugin extends builtin_plugin_base.Xj {
|
|
40718
40758
|
raw(compiler) {
|
|
40719
40759
|
if (void 0 === compiler.options.output.strictModuleErrorHandling) compiler.options.output.strictModuleErrorHandling = true;
|
|
40720
|
-
return
|
|
40760
|
+
return (0, builtin_plugin_base.no)(this.name, void 0);
|
|
40721
40761
|
}
|
|
40722
40762
|
constructor(...args){
|
|
40723
40763
|
super(...args), HotModuleReplacementPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.HotModuleReplacementPlugin);
|
|
40724
40764
|
}
|
|
40725
40765
|
}
|
|
40726
|
-
const HttpExternalsRspackPlugin =
|
|
40766
|
+
const HttpExternalsRspackPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.HttpExternalsRspackPlugin, (css, webAsync)=>({
|
|
40727
40767
|
css,
|
|
40728
40768
|
webAsync
|
|
40729
40769
|
}));
|
|
@@ -40752,7 +40792,7 @@ const defaultHttpClientForBrowser = async (url, headers)=>{
|
|
|
40752
40792
|
body: Buffer.from(await res.arrayBuffer())
|
|
40753
40793
|
};
|
|
40754
40794
|
};
|
|
40755
|
-
class HttpUriPlugin extends
|
|
40795
|
+
class HttpUriPlugin extends builtin_plugin_base.Xj {
|
|
40756
40796
|
raw(compiler) {
|
|
40757
40797
|
const options = this.options;
|
|
40758
40798
|
const lockfileLocation = options.lockfileLocation ?? path_browserify_default().join(compiler.context, compiler.name ? `${compiler.name}.rspack.lock` : "rspack.lock");
|
|
@@ -40765,7 +40805,7 @@ class HttpUriPlugin extends RspackBuiltinPlugin {
|
|
|
40765
40805
|
upgrade: options.upgrade ?? false,
|
|
40766
40806
|
httpClient: options.httpClient ?? defaultHttpClient
|
|
40767
40807
|
};
|
|
40768
|
-
return
|
|
40808
|
+
return (0, builtin_plugin_base.no)(this.name, raw);
|
|
40769
40809
|
}
|
|
40770
40810
|
constructor(options){
|
|
40771
40811
|
super(), HttpUriPlugin_define_property(this, "options", void 0), HttpUriPlugin_define_property(this, "name", void 0), HttpUriPlugin_define_property(this, "affectedHooks", void 0), this.options = options, this.name = external_rspack_wasi_browser_js_.BuiltinPluginName.HttpUriPlugin, this.affectedHooks = "compilation";
|
|
@@ -44943,7 +44983,7 @@ const cleanPluginHooks = (compilation)=>{
|
|
|
44943
44983
|
};
|
|
44944
44984
|
var plugin_process = __webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");
|
|
44945
44985
|
let HTML_PLUGIN_UID = 0;
|
|
44946
|
-
const HtmlRspackPluginImpl =
|
|
44986
|
+
const HtmlRspackPluginImpl = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.HtmlRspackPlugin, function(c = {}) {
|
|
44947
44987
|
validateHtmlPluginOptions(c);
|
|
44948
44988
|
const uid = HTML_PLUGIN_UID++;
|
|
44949
44989
|
const meta = {};
|
|
@@ -45104,11 +45144,11 @@ HtmlRspackPlugin.createHtmlTagObject = (tagName, attributes, innerHTML)=>({
|
|
|
45104
45144
|
});
|
|
45105
45145
|
HtmlRspackPlugin.getHooks = HtmlRspackPlugin.getCompilationHooks = getPluginHooks;
|
|
45106
45146
|
HtmlRspackPlugin.version = 5;
|
|
45107
|
-
const IgnorePlugin =
|
|
45147
|
+
const IgnorePlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.IgnorePlugin, (options)=>{
|
|
45108
45148
|
validate(options, getIgnorePluginOptionsSchema);
|
|
45109
45149
|
return options;
|
|
45110
45150
|
});
|
|
45111
|
-
const InferAsyncModulesPlugin =
|
|
45151
|
+
const InferAsyncModulesPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.InferAsyncModulesPlugin, ()=>{}, "compilation");
|
|
45112
45152
|
function JavascriptModulesPlugin_define_property(obj, key, value) {
|
|
45113
45153
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
45114
45154
|
value: value,
|
|
@@ -45120,9 +45160,9 @@ function JavascriptModulesPlugin_define_property(obj, key, value) {
|
|
|
45120
45160
|
return obj;
|
|
45121
45161
|
}
|
|
45122
45162
|
const JavascriptModulesPlugin_compilationHooksMap = new WeakMap();
|
|
45123
|
-
class JavascriptModulesPlugin extends
|
|
45163
|
+
class JavascriptModulesPlugin extends builtin_plugin_base.Xj {
|
|
45124
45164
|
raw() {
|
|
45125
|
-
return
|
|
45165
|
+
return (0, builtin_plugin_base.no)(this.name, void 0);
|
|
45126
45166
|
}
|
|
45127
45167
|
static getCompilationHooks(compilation) {
|
|
45128
45168
|
checkCompilation(compilation);
|
|
@@ -45142,9 +45182,9 @@ class JavascriptModulesPlugin extends RspackBuiltinPlugin {
|
|
|
45142
45182
|
super(...args), JavascriptModulesPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.JavascriptModulesPlugin), JavascriptModulesPlugin_define_property(this, "affectedHooks", "compilation");
|
|
45143
45183
|
}
|
|
45144
45184
|
}
|
|
45145
|
-
const JsLoaderRspackPlugin =
|
|
45146
|
-
const JsonModulesPlugin =
|
|
45147
|
-
const LibManifestPlugin =
|
|
45185
|
+
const JsLoaderRspackPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.JsLoaderRspackPlugin, (compiler)=>runLoaders.bind(null, compiler), "thisCompilation");
|
|
45186
|
+
const JsonModulesPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.JsonModulesPlugin, ()=>{}, "compilation");
|
|
45187
|
+
const LibManifestPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.LibManifestPlugin, (options)=>{
|
|
45148
45188
|
const { context, entryOnly, format, name, path, type } = options;
|
|
45149
45189
|
return {
|
|
45150
45190
|
context,
|
|
@@ -45155,7 +45195,7 @@ const LibManifestPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPl
|
|
|
45155
45195
|
type
|
|
45156
45196
|
};
|
|
45157
45197
|
});
|
|
45158
|
-
const LightningCssMinimizerRspackPlugin =
|
|
45198
|
+
const LightningCssMinimizerRspackPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.LightningCssMinimizerRspackPlugin, (options)=>{
|
|
45159
45199
|
var _options_minimizerOptions, _options_minimizerOptions1, _options_minimizerOptions2;
|
|
45160
45200
|
const { include, exclude, draft, nonStandard, pseudoClasses, drafts } = (null == options ? void 0 : options.minimizerOptions) ?? {};
|
|
45161
45201
|
const targets = (null == options ? void 0 : null == (_options_minimizerOptions = options.minimizerOptions) ? void 0 : _options_minimizerOptions.targets) ?? "fully supports es6";
|
|
@@ -45185,14 +45225,8 @@ const LightningCssMinimizerRspackPlugin = base_create(external_rspack_wasi_brows
|
|
|
45185
45225
|
}
|
|
45186
45226
|
};
|
|
45187
45227
|
});
|
|
45188
|
-
const LimitChunkCountPlugin =
|
|
45189
|
-
|
|
45190
|
-
module,
|
|
45191
|
-
cacheable,
|
|
45192
|
-
imports,
|
|
45193
|
-
entries,
|
|
45194
|
-
test
|
|
45195
|
-
}), "thisCompilation");
|
|
45228
|
+
const LimitChunkCountPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.LimitChunkCountPlugin, (options)=>options);
|
|
45229
|
+
var lazyCompilation = __webpack_require__("./src/builtin-plugin/lazy-compilation/lazyCompilation.ts");
|
|
45196
45230
|
const LAZY_COMPILATION_PREFIX = "/lazy-compilation-using-";
|
|
45197
45231
|
const getDefaultClient = (compiler)=>require.resolve(`../hot/lazy-compilation-${compiler.options.externalsPresets.node ? "node" : "web"}.js`);
|
|
45198
45232
|
const noop = (_req, _res, next)=>{
|
|
@@ -45234,9 +45268,8 @@ const lazyCompilationMiddleware = (compiler)=>{
|
|
|
45234
45268
|
const prefix = options.prefix || LAZY_COMPILATION_PREFIX;
|
|
45235
45269
|
options.prefix = `${prefix}__${i++}`;
|
|
45236
45270
|
const activeModules = new Set();
|
|
45237
|
-
|
|
45238
|
-
|
|
45239
|
-
applyPlugin(c, options, activeModules, filesByKey);
|
|
45271
|
+
middlewareByCompiler.set(options.prefix, lazyCompilationMiddlewareInternal(compiler, activeModules, options.prefix));
|
|
45272
|
+
applyPlugin(c, options, activeModules);
|
|
45240
45273
|
}
|
|
45241
45274
|
const keys = [
|
|
45242
45275
|
...middlewareByCompiler.keys()
|
|
@@ -45257,34 +45290,28 @@ const lazyCompilationMiddleware = (compiler)=>{
|
|
|
45257
45290
|
}
|
|
45258
45291
|
if (!compiler.options.lazyCompilation && !compiler.options.experiments.lazyCompilation) return noop;
|
|
45259
45292
|
const activeModules = new Set();
|
|
45260
|
-
const filesByKey = new Map();
|
|
45261
45293
|
const options = {
|
|
45262
45294
|
...compiler.options.experiments.lazyCompilation,
|
|
45263
45295
|
...compiler.options.lazyCompilation
|
|
45264
45296
|
};
|
|
45265
|
-
applyPlugin(compiler, options, activeModules
|
|
45297
|
+
applyPlugin(compiler, options, activeModules);
|
|
45266
45298
|
const lazyCompilationPrefix = options.prefix || LAZY_COMPILATION_PREFIX;
|
|
45267
|
-
return lazyCompilationMiddlewareInternal(compiler, activeModules,
|
|
45299
|
+
return lazyCompilationMiddlewareInternal(compiler, activeModules, lazyCompilationPrefix);
|
|
45268
45300
|
};
|
|
45269
|
-
function applyPlugin(compiler, options, activeModules
|
|
45270
|
-
const plugin = new
|
|
45271
|
-
const
|
|
45272
|
-
|
|
45273
|
-
|
|
45274
|
-
|
|
45275
|
-
client: `${options.client || getDefaultClient(compiler)}?${encodeURIComponent(getFullServerUrl(options))}`,
|
|
45276
|
-
data,
|
|
45277
|
-
active
|
|
45278
|
-
};
|
|
45279
|
-
}, options.cacheable ?? true, options.entries ?? true, options.imports ?? true, options.test);
|
|
45301
|
+
function applyPlugin(compiler, options, activeModules) {
|
|
45302
|
+
const plugin = new lazyCompilation.a(()=>{
|
|
45303
|
+
const res = new Set(activeModules);
|
|
45304
|
+
activeModules.clear();
|
|
45305
|
+
return res;
|
|
45306
|
+
}, options.entries ?? true, options.imports ?? true, `${options.client || getDefaultClient(compiler)}?${encodeURIComponent(getFullServerUrl(options))}`, options.test);
|
|
45280
45307
|
plugin.apply(compiler);
|
|
45281
45308
|
}
|
|
45282
|
-
const lazyCompilationMiddlewareInternal = (compiler, activeModules,
|
|
45309
|
+
const lazyCompilationMiddlewareInternal = (compiler, activeModules, lazyCompilationPrefix)=>{
|
|
45283
45310
|
const logger = compiler.getInfrastructureLogger("LazyCompilation");
|
|
45284
45311
|
return (req, res, next)=>{
|
|
45285
45312
|
var _req_url;
|
|
45286
45313
|
if (!(null == (_req_url = req.url) ? void 0 : _req_url.startsWith(lazyCompilationPrefix))) return null == next ? void 0 : next();
|
|
45287
|
-
const modules = req.url.slice(lazyCompilationPrefix.length).split("@");
|
|
45314
|
+
const modules = req.url.slice(lazyCompilationPrefix.length).split("@").map(decodeURIComponent);
|
|
45288
45315
|
req.socket.setNoDelay(true);
|
|
45289
45316
|
res.setHeader("content-type", "text/event-stream");
|
|
45290
45317
|
res.writeHead(200);
|
|
@@ -45298,14 +45325,7 @@ const lazyCompilationMiddlewareInternal = (compiler, activeModules, filesByKey,
|
|
|
45298
45325
|
moduleActivated.push(key);
|
|
45299
45326
|
}
|
|
45300
45327
|
}
|
|
45301
|
-
if (moduleActivated.length && compiler.watching)
|
|
45302
|
-
const rebuiltModules = new Set(moduleActivated.map((key)=>{
|
|
45303
|
-
const filePath = filesByKey.get(key);
|
|
45304
|
-
if (!filePath) logger.warn(`Cannot find correct file path for module ${key}`);
|
|
45305
|
-
return filePath;
|
|
45306
|
-
}).filter(Boolean));
|
|
45307
|
-
if (rebuiltModules.size) compiler.watching.invalidateWithChangesAndRemovals(rebuiltModules);
|
|
45308
|
-
}
|
|
45328
|
+
if (moduleActivated.length && compiler.watching) compiler.watching.invalidate();
|
|
45309
45329
|
};
|
|
45310
45330
|
};
|
|
45311
45331
|
function MangleExportsPlugin_define_property(obj, key, value) {
|
|
@@ -45318,16 +45338,16 @@ function MangleExportsPlugin_define_property(obj, key, value) {
|
|
|
45318
45338
|
else obj[key] = value;
|
|
45319
45339
|
return obj;
|
|
45320
45340
|
}
|
|
45321
|
-
class MangleExportsPlugin extends
|
|
45341
|
+
class MangleExportsPlugin extends builtin_plugin_base.Xj {
|
|
45322
45342
|
raw(compiler) {
|
|
45323
|
-
return
|
|
45343
|
+
return (0, builtin_plugin_base.no)(this.name, this.deterministic);
|
|
45324
45344
|
}
|
|
45325
45345
|
constructor(deterministic){
|
|
45326
45346
|
super(), MangleExportsPlugin_define_property(this, "deterministic", void 0), MangleExportsPlugin_define_property(this, "name", void 0), MangleExportsPlugin_define_property(this, "affectedHooks", void 0), this.deterministic = deterministic, this.name = external_rspack_wasi_browser_js_.BuiltinPluginName.MangleExportsPlugin, this.affectedHooks = "compilation";
|
|
45327
45347
|
}
|
|
45328
45348
|
}
|
|
45329
|
-
const MergeDuplicateChunksPlugin =
|
|
45330
|
-
const ModuleChunkFormatPlugin =
|
|
45349
|
+
const MergeDuplicateChunksPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.MergeDuplicateChunksPlugin, ()=>{});
|
|
45350
|
+
const ModuleChunkFormatPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.ModuleChunkFormatPlugin, ()=>{});
|
|
45331
45351
|
function ModuleConcatenationPlugin_define_property(obj, key, value) {
|
|
45332
45352
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
45333
45353
|
value: value,
|
|
@@ -45338,17 +45358,17 @@ function ModuleConcatenationPlugin_define_property(obj, key, value) {
|
|
|
45338
45358
|
else obj[key] = value;
|
|
45339
45359
|
return obj;
|
|
45340
45360
|
}
|
|
45341
|
-
class ModuleConcatenationPlugin extends
|
|
45361
|
+
class ModuleConcatenationPlugin extends builtin_plugin_base.Xj {
|
|
45342
45362
|
raw(compiler) {
|
|
45343
|
-
return
|
|
45363
|
+
return (0, builtin_plugin_base.no)(this.name, void 0);
|
|
45344
45364
|
}
|
|
45345
45365
|
constructor(...args){
|
|
45346
45366
|
super(...args), ModuleConcatenationPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.ModuleConcatenationPlugin), ModuleConcatenationPlugin_define_property(this, "affectedHooks", "compilation");
|
|
45347
45367
|
}
|
|
45348
45368
|
}
|
|
45349
|
-
const ModuleInfoHeaderPlugin =
|
|
45350
|
-
const NamedChunkIdsPlugin =
|
|
45351
|
-
const NamedModuleIdsPlugin =
|
|
45369
|
+
const ModuleInfoHeaderPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.ModuleInfoHeaderPlugin, (verbose)=>verbose, "compilation");
|
|
45370
|
+
const NamedChunkIdsPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.NamedChunkIdsPlugin, ()=>{}, "compilation");
|
|
45371
|
+
const NamedModuleIdsPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.NamedModuleIdsPlugin, ()=>{}, "compilation");
|
|
45352
45372
|
function NaturalChunkIdsPlugin_define_property(obj, key, value) {
|
|
45353
45373
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
45354
45374
|
value: value,
|
|
@@ -45359,9 +45379,9 @@ function NaturalChunkIdsPlugin_define_property(obj, key, value) {
|
|
|
45359
45379
|
else obj[key] = value;
|
|
45360
45380
|
return obj;
|
|
45361
45381
|
}
|
|
45362
|
-
class NaturalChunkIdsPlugin extends
|
|
45382
|
+
class NaturalChunkIdsPlugin extends builtin_plugin_base.Xj {
|
|
45363
45383
|
raw(compiler) {
|
|
45364
|
-
return
|
|
45384
|
+
return (0, builtin_plugin_base.no)(this.name, void 0);
|
|
45365
45385
|
}
|
|
45366
45386
|
constructor(...args){
|
|
45367
45387
|
super(...args), NaturalChunkIdsPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.NaturalChunkIdsPlugin), NaturalChunkIdsPlugin_define_property(this, "affectedHooks", "compilation");
|
|
@@ -45377,27 +45397,27 @@ function NaturalModuleIdsPlugin_define_property(obj, key, value) {
|
|
|
45377
45397
|
else obj[key] = value;
|
|
45378
45398
|
return obj;
|
|
45379
45399
|
}
|
|
45380
|
-
class NaturalModuleIdsPlugin extends
|
|
45400
|
+
class NaturalModuleIdsPlugin extends builtin_plugin_base.Xj {
|
|
45381
45401
|
raw(compiler) {
|
|
45382
|
-
return
|
|
45402
|
+
return (0, builtin_plugin_base.no)(this.name, void 0);
|
|
45383
45403
|
}
|
|
45384
45404
|
constructor(...args){
|
|
45385
45405
|
super(...args), NaturalModuleIdsPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.NaturalModuleIdsPlugin), NaturalModuleIdsPlugin_define_property(this, "affectedHooks", "compilation");
|
|
45386
45406
|
}
|
|
45387
45407
|
}
|
|
45388
|
-
const NodeTargetPlugin =
|
|
45389
|
-
const NoEmitOnErrorsPlugin =
|
|
45390
|
-
const NormalModuleReplacementPlugin =
|
|
45408
|
+
const NodeTargetPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.NodeTargetPlugin, ()=>void 0);
|
|
45409
|
+
const NoEmitOnErrorsPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.NoEmitOnErrorsPlugin, ()=>void 0);
|
|
45410
|
+
const NormalModuleReplacementPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.NormalModuleReplacementPlugin, (resourceRegExp, newResource)=>({
|
|
45391
45411
|
resourceRegExp,
|
|
45392
45412
|
newResource: "function" == typeof newResource ? (data)=>{
|
|
45393
45413
|
newResource(data);
|
|
45394
45414
|
return data;
|
|
45395
45415
|
} : newResource
|
|
45396
45416
|
}));
|
|
45397
|
-
const OccurrenceChunkIdsPlugin =
|
|
45417
|
+
const OccurrenceChunkIdsPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.OccurrenceChunkIdsPlugin, (options)=>({
|
|
45398
45418
|
...options
|
|
45399
45419
|
}), "compilation");
|
|
45400
|
-
const ProgressPlugin =
|
|
45420
|
+
const ProgressPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.ProgressPlugin, (progress = {})=>{
|
|
45401
45421
|
if ("function" == typeof progress) return {
|
|
45402
45422
|
handler: (percentage, msg, items)=>{
|
|
45403
45423
|
progress(percentage, msg, ...items);
|
|
@@ -45405,7 +45425,7 @@ const ProgressPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPlugi
|
|
|
45405
45425
|
};
|
|
45406
45426
|
return progress;
|
|
45407
45427
|
});
|
|
45408
|
-
const ProvidePlugin =
|
|
45428
|
+
const ProvidePlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.ProvidePlugin, (provide)=>{
|
|
45409
45429
|
const entries = Object.entries(provide).map(([key, value])=>{
|
|
45410
45430
|
if ("string" == typeof value) value = [
|
|
45411
45431
|
value
|
|
@@ -45417,10 +45437,10 @@ const ProvidePlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPlugin
|
|
|
45417
45437
|
});
|
|
45418
45438
|
return Object.fromEntries(entries);
|
|
45419
45439
|
}, "compilation");
|
|
45420
|
-
const RealContentHashPlugin =
|
|
45421
|
-
const RemoveDuplicateModulesPlugin =
|
|
45422
|
-
const RemoveEmptyChunksPlugin =
|
|
45423
|
-
const RsdoctorPluginImpl =
|
|
45440
|
+
const RealContentHashPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.RealContentHashPlugin, ()=>{}, "compilation");
|
|
45441
|
+
const RemoveDuplicateModulesPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.RemoveDuplicateModulesPlugin, ()=>({}));
|
|
45442
|
+
const RemoveEmptyChunksPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.RemoveEmptyChunksPlugin, ()=>{}, "compilation");
|
|
45443
|
+
const RsdoctorPluginImpl = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.RsdoctorPlugin, function(c = {
|
|
45424
45444
|
moduleGraphFeatures: true,
|
|
45425
45445
|
chunkGraphFeatures: true
|
|
45426
45446
|
}) {
|
|
@@ -45495,10 +45515,10 @@ const createRsdoctorPluginHooksRegisters = (getCompiler, createTap, createMapTap
|
|
|
45495
45515
|
};
|
|
45496
45516
|
})
|
|
45497
45517
|
});
|
|
45498
|
-
const RslibPlugin =
|
|
45499
|
-
const RstestPlugin =
|
|
45500
|
-
const RuntimeChunkPlugin =
|
|
45501
|
-
const RuntimePluginImpl =
|
|
45518
|
+
const RslibPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.RslibPlugin, (rslib)=>rslib);
|
|
45519
|
+
const RstestPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.RstestPlugin, (rstest)=>rstest);
|
|
45520
|
+
const RuntimeChunkPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.RuntimeChunkPlugin, (options)=>options, "thisCompilation");
|
|
45521
|
+
const RuntimePluginImpl = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_["default"].BuiltinPluginName.RuntimePlugin, ()=>{}, "compilation");
|
|
45502
45522
|
const RuntimePlugin = RuntimePluginImpl;
|
|
45503
45523
|
const RuntimePlugin_compilationHooksMap = new WeakMap();
|
|
45504
45524
|
RuntimePlugin.getHooks = RuntimePlugin.getCompilationHooks = (compilation)=>{
|
|
@@ -45546,15 +45566,15 @@ const createRuntimePluginHooksRegisters = (getCompiler, createTap, createMapTap)
|
|
|
45546
45566
|
};
|
|
45547
45567
|
})
|
|
45548
45568
|
});
|
|
45549
|
-
const SideEffectsFlagPlugin =
|
|
45550
|
-
const SizeLimitsPlugin =
|
|
45569
|
+
const SideEffectsFlagPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.SideEffectsFlagPlugin, ()=>{}, "compilation");
|
|
45570
|
+
const SizeLimitsPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.SizeLimitsPlugin, (options)=>{
|
|
45551
45571
|
const hints = false === options.hints ? void 0 : options.hints;
|
|
45552
45572
|
return {
|
|
45553
45573
|
...options,
|
|
45554
45574
|
hints
|
|
45555
45575
|
};
|
|
45556
45576
|
});
|
|
45557
|
-
const SourceMapDevToolPlugin =
|
|
45577
|
+
const SourceMapDevToolPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.SourceMapDevToolPlugin, (options)=>options, "compilation");
|
|
45558
45578
|
class JsSplitChunkSizes {
|
|
45559
45579
|
static __to_binding(sizes) {
|
|
45560
45580
|
if ("number" == typeof sizes) return sizes;
|
|
@@ -45577,11 +45597,11 @@ function SplitChunksPlugin_define_property(obj, key, value) {
|
|
|
45577
45597
|
else obj[key] = value;
|
|
45578
45598
|
return obj;
|
|
45579
45599
|
}
|
|
45580
|
-
class SplitChunksPlugin extends
|
|
45600
|
+
class SplitChunksPlugin extends builtin_plugin_base.Xj {
|
|
45581
45601
|
raw(compiler) {
|
|
45582
45602
|
const rawOptions = toRawSplitChunksOptions(this.options, compiler);
|
|
45583
45603
|
assert_default()(void 0 !== rawOptions);
|
|
45584
|
-
return
|
|
45604
|
+
return (0, builtin_plugin_base.no)(this.name, rawOptions);
|
|
45585
45605
|
}
|
|
45586
45606
|
constructor(options){
|
|
45587
45607
|
super(), SplitChunksPlugin_define_property(this, "options", void 0), SplitChunksPlugin_define_property(this, "name", void 0), SplitChunksPlugin_define_property(this, "affectedHooks", void 0), this.options = options, this.name = external_rspack_wasi_browser_js_.BuiltinPluginName.SplitChunksPlugin, this.affectedHooks = "thisCompilation";
|
|
@@ -45658,7 +45678,7 @@ function SubresourceIntegrityPlugin_define_property(obj, key, value) {
|
|
|
45658
45678
|
}
|
|
45659
45679
|
const SubresourceIntegrityPlugin_PLUGIN_NAME = "SubresourceIntegrityPlugin";
|
|
45660
45680
|
const NATIVE_HTML_PLUGIN = "HtmlRspackPlugin";
|
|
45661
|
-
const NativeSubresourceIntegrityPlugin =
|
|
45681
|
+
const NativeSubresourceIntegrityPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.SubresourceIntegrityPlugin, function(options) {
|
|
45662
45682
|
let htmlPlugin = "Disabled";
|
|
45663
45683
|
if (options.htmlPlugin === NATIVE_HTML_PLUGIN) htmlPlugin = "Native";
|
|
45664
45684
|
else if ("string" == typeof options.htmlPlugin) htmlPlugin = "JavaScript";
|
|
@@ -45844,7 +45864,7 @@ function getRawExtractCommentsOptions(extractComments) {
|
|
|
45844
45864
|
return res;
|
|
45845
45865
|
}
|
|
45846
45866
|
}
|
|
45847
|
-
const SwcJsMinimizerRspackPlugin =
|
|
45867
|
+
const SwcJsMinimizerRspackPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.SwcJsMinimizerRspackPlugin, (options)=>{
|
|
45848
45868
|
var _options_minimizerOptions, _options_minimizerOptions1, _options_minimizerOptions2, _options_minimizerOptions3, _options_minimizerOptions4, _options_minimizerOptions5;
|
|
45849
45869
|
let compress = (null == options ? void 0 : null == (_options_minimizerOptions = options.minimizerOptions) ? void 0 : _options_minimizerOptions.compress) ?? true;
|
|
45850
45870
|
const mangle = (null == options ? void 0 : null == (_options_minimizerOptions1 = options.minimizerOptions) ? void 0 : _options_minimizerOptions1.mangle) ?? true;
|
|
@@ -45875,7 +45895,7 @@ const SwcJsMinimizerRspackPlugin = base_create(external_rspack_wasi_browser_js_.
|
|
|
45875
45895
|
}
|
|
45876
45896
|
};
|
|
45877
45897
|
}, "compilation");
|
|
45878
|
-
const WarnCaseSensitiveModulesPlugin =
|
|
45898
|
+
const WarnCaseSensitiveModulesPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.WarnCaseSensitiveModulesPlugin, ()=>{}, "compilation");
|
|
45879
45899
|
function WebWorkerTemplatePlugin_define_property(obj, key, value) {
|
|
45880
45900
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
45881
45901
|
value: value,
|
|
@@ -45886,10 +45906,10 @@ function WebWorkerTemplatePlugin_define_property(obj, key, value) {
|
|
|
45886
45906
|
else obj[key] = value;
|
|
45887
45907
|
return obj;
|
|
45888
45908
|
}
|
|
45889
|
-
class WebWorkerTemplatePlugin extends
|
|
45909
|
+
class WebWorkerTemplatePlugin extends builtin_plugin_base.Xj {
|
|
45890
45910
|
raw(compiler) {
|
|
45891
45911
|
compiler.options.output.chunkLoading = "import-scripts";
|
|
45892
|
-
return
|
|
45912
|
+
return (0, builtin_plugin_base.no)(this.name, void 0);
|
|
45893
45913
|
}
|
|
45894
45914
|
constructor(...args){
|
|
45895
45915
|
super(...args), WebWorkerTemplatePlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.WebWorkerTemplatePlugin);
|
|
@@ -45905,11 +45925,11 @@ function WorkerPlugin_define_property(obj, key, value) {
|
|
|
45905
45925
|
else obj[key] = value;
|
|
45906
45926
|
return obj;
|
|
45907
45927
|
}
|
|
45908
|
-
class WorkerPlugin extends
|
|
45928
|
+
class WorkerPlugin extends builtin_plugin_base.Xj {
|
|
45909
45929
|
raw(compiler) {
|
|
45910
45930
|
if (this.chunkLoading) new EnableChunkLoadingPlugin(this.chunkLoading).apply(compiler);
|
|
45911
45931
|
if (this.wasmLoading) new EnableWasmLoadingPlugin(this.wasmLoading).apply(compiler);
|
|
45912
|
-
return
|
|
45932
|
+
return (0, builtin_plugin_base.no)(this.name, void 0);
|
|
45913
45933
|
}
|
|
45914
45934
|
constructor(chunkLoading, wasmLoading, module, workerPublicPath){
|
|
45915
45935
|
super(), WorkerPlugin_define_property(this, "chunkLoading", void 0), WorkerPlugin_define_property(this, "wasmLoading", void 0), WorkerPlugin_define_property(this, "module", void 0), WorkerPlugin_define_property(this, "workerPublicPath", void 0), WorkerPlugin_define_property(this, "name", void 0), this.chunkLoading = chunkLoading, this.wasmLoading = wasmLoading, this.module = module, this.workerPublicPath = workerPublicPath, this.name = external_rspack_wasi_browser_js_.BuiltinPluginName.WorkerPlugin;
|
|
@@ -47027,7 +47047,7 @@ const applyExperimentsDefaults = (experiments, { production, development })=>{
|
|
|
47027
47047
|
D(experiments.incremental, "providedExports", true);
|
|
47028
47048
|
D(experiments.incremental, "dependenciesDiagnostics", true);
|
|
47029
47049
|
D(experiments.incremental, "sideEffects", true);
|
|
47030
|
-
D(experiments.incremental, "buildChunkGraph",
|
|
47050
|
+
D(experiments.incremental, "buildChunkGraph", false);
|
|
47031
47051
|
D(experiments.incremental, "moduleIds", true);
|
|
47032
47052
|
D(experiments.incremental, "chunkIds", true);
|
|
47033
47053
|
D(experiments.incremental, "modulesHashes", true);
|
|
@@ -47051,7 +47071,7 @@ const applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
|
47051
47071
|
if ("object" == typeof rspackFuture) {
|
|
47052
47072
|
D(rspackFuture, "bundlerInfo", {});
|
|
47053
47073
|
if ("object" == typeof rspackFuture.bundlerInfo) {
|
|
47054
|
-
D(rspackFuture.bundlerInfo, "version", "1.5.
|
|
47074
|
+
D(rspackFuture.bundlerInfo, "version", "1.5.2");
|
|
47055
47075
|
D(rspackFuture.bundlerInfo, "bundler", "rspack");
|
|
47056
47076
|
D(rspackFuture.bundlerInfo, "force", !library);
|
|
47057
47077
|
}
|
|
@@ -50679,7 +50699,7 @@ class Compiler {
|
|
|
50679
50699
|
]);
|
|
50680
50700
|
for(const hookName in this.hooks){
|
|
50681
50701
|
const name = hookName;
|
|
50682
|
-
if (
|
|
50702
|
+
if ((0, builtin_plugin_base.Gp)(name)) {
|
|
50683
50703
|
if (childCompiler.hooks[name]) childCompiler.hooks[name].taps = this.hooks[name].taps.slice();
|
|
50684
50704
|
}
|
|
50685
50705
|
}
|
|
@@ -51146,7 +51166,7 @@ class MultiStats {
|
|
|
51146
51166
|
return obj;
|
|
51147
51167
|
});
|
|
51148
51168
|
if (childOptions.version) {
|
|
51149
|
-
obj.rspackVersion = "1.5.
|
|
51169
|
+
obj.rspackVersion = "1.5.2";
|
|
51150
51170
|
obj.version = "5.75.0";
|
|
51151
51171
|
}
|
|
51152
51172
|
if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join("");
|
|
@@ -52456,7 +52476,7 @@ const SIMPLE_EXTRACTORS = {
|
|
|
52456
52476
|
},
|
|
52457
52477
|
version: (object)=>{
|
|
52458
52478
|
object.version = "5.75.0";
|
|
52459
|
-
object.rspackVersion = "1.5.
|
|
52479
|
+
object.rspackVersion = "1.5.2";
|
|
52460
52480
|
},
|
|
52461
52481
|
env: (object, _compilation, _context, { _env })=>{
|
|
52462
52482
|
object.env = _env;
|
|
@@ -54296,7 +54316,7 @@ const matchObject = (obj, str)=>{
|
|
|
54296
54316
|
}
|
|
54297
54317
|
return true;
|
|
54298
54318
|
};
|
|
54299
|
-
const FlagAllModulesAsUsedPlugin =
|
|
54319
|
+
const FlagAllModulesAsUsedPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.FlagAllModulesAsUsedPlugin, (explanation)=>({
|
|
54300
54320
|
explanation
|
|
54301
54321
|
}));
|
|
54302
54322
|
function DllPlugin_define_property(obj, key, value) {
|
|
@@ -55176,6 +55196,7 @@ const getZodSwcLoaderOptionsSchema = memoize(()=>{
|
|
|
55176
55196
|
"2022-03"
|
|
55177
55197
|
]),
|
|
55178
55198
|
treatConstEnumAsEnum: schemas_boolean(),
|
|
55199
|
+
tsEnumIsMutable: schemas_boolean(),
|
|
55179
55200
|
useDefineForClassFields: schemas_boolean(),
|
|
55180
55201
|
verbatimModuleSyntax: schemas_boolean()
|
|
55181
55202
|
}).partial();
|
|
@@ -56250,6 +56271,7 @@ const getRspackOptionsSchema = memoize(()=>{
|
|
|
56250
56271
|
prefix: schemas_string()
|
|
56251
56272
|
}).partial();
|
|
56252
56273
|
const incremental = strictObject({
|
|
56274
|
+
silent: schemas_boolean(),
|
|
56253
56275
|
make: schemas_boolean(),
|
|
56254
56276
|
inferAsyncModules: schemas_boolean(),
|
|
56255
56277
|
providedExports: schemas_boolean(),
|
|
@@ -56370,7 +56392,7 @@ const getRspackOptionsSchema = memoize(()=>{
|
|
|
56370
56392
|
}).partial().check(externalUmdChecker);
|
|
56371
56393
|
return rspackOptions;
|
|
56372
56394
|
});
|
|
56373
|
-
const ModuleFederationRuntimePlugin =
|
|
56395
|
+
const ModuleFederationRuntimePlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.ModuleFederationRuntimePlugin, (options = {})=>options);
|
|
56374
56396
|
const options_process = (options, normalizeSimple, normalizeOptions, fn)=>{
|
|
56375
56397
|
const array = (items)=>{
|
|
56376
56398
|
for (const item of items)if ("string" == typeof item) fn(item, normalizeSimple(item, item));
|
|
@@ -56550,11 +56572,11 @@ function isSingleton(compiler) {
|
|
|
56550
56572
|
function setSingleton(compiler) {
|
|
56551
56573
|
compilerSet.add(compiler);
|
|
56552
56574
|
}
|
|
56553
|
-
class ShareRuntimePlugin extends
|
|
56575
|
+
class ShareRuntimePlugin extends builtin_plugin_base.Xj {
|
|
56554
56576
|
raw(compiler) {
|
|
56555
56577
|
if (isSingleton(compiler)) return;
|
|
56556
56578
|
setSingleton(compiler);
|
|
56557
|
-
return
|
|
56579
|
+
return (0, builtin_plugin_base.no)(this.name, this.enhanced);
|
|
56558
56580
|
}
|
|
56559
56581
|
constructor(enhanced = false){
|
|
56560
56582
|
super(), ShareRuntimePlugin_define_property(this, "enhanced", void 0), ShareRuntimePlugin_define_property(this, "name", void 0), this.enhanced = enhanced, this.name = external_rspack_wasi_browser_js_.BuiltinPluginName.ShareRuntimePlugin;
|
|
@@ -56574,7 +56596,7 @@ function ConsumeSharedPlugin_define_property(obj, key, value) {
|
|
|
56574
56596
|
else obj[key] = value;
|
|
56575
56597
|
return obj;
|
|
56576
56598
|
}
|
|
56577
|
-
class ConsumeSharedPlugin extends
|
|
56599
|
+
class ConsumeSharedPlugin extends builtin_plugin_base.Xj {
|
|
56578
56600
|
raw(compiler) {
|
|
56579
56601
|
new ShareRuntimePlugin(this._options.enhanced).apply(compiler);
|
|
56580
56602
|
const rawOptions = {
|
|
@@ -56584,7 +56606,7 @@ class ConsumeSharedPlugin extends RspackBuiltinPlugin {
|
|
|
56584
56606
|
})),
|
|
56585
56607
|
enhanced: this._options.enhanced
|
|
56586
56608
|
};
|
|
56587
|
-
return
|
|
56609
|
+
return (0, builtin_plugin_base.no)(this.name, rawOptions);
|
|
56588
56610
|
}
|
|
56589
56611
|
constructor(options){
|
|
56590
56612
|
super(), ConsumeSharedPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.ConsumeSharedPlugin), ConsumeSharedPlugin_define_property(this, "_options", void 0);
|
|
@@ -56635,14 +56657,14 @@ function ProvideSharedPlugin_define_property(obj, key, value) {
|
|
|
56635
56657
|
else obj[key] = value;
|
|
56636
56658
|
return obj;
|
|
56637
56659
|
}
|
|
56638
|
-
class ProvideSharedPlugin extends
|
|
56660
|
+
class ProvideSharedPlugin extends builtin_plugin_base.Xj {
|
|
56639
56661
|
raw(compiler) {
|
|
56640
56662
|
new ShareRuntimePlugin(this._enhanced ?? false).apply(compiler);
|
|
56641
56663
|
const rawOptions = this._provides.map(([key, v])=>({
|
|
56642
56664
|
key,
|
|
56643
56665
|
...v
|
|
56644
56666
|
}));
|
|
56645
|
-
return
|
|
56667
|
+
return (0, builtin_plugin_base.no)(this.name, rawOptions);
|
|
56646
56668
|
}
|
|
56647
56669
|
constructor(options){
|
|
56648
56670
|
super(), ProvideSharedPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.ProvideSharedPlugin), ProvideSharedPlugin_define_property(this, "_provides", void 0), ProvideSharedPlugin_define_property(this, "_enhanced", void 0);
|
|
@@ -56752,7 +56774,7 @@ function ContainerPlugin_define_property(obj, key, value) {
|
|
|
56752
56774
|
else obj[key] = value;
|
|
56753
56775
|
return obj;
|
|
56754
56776
|
}
|
|
56755
|
-
class ContainerPlugin extends
|
|
56777
|
+
class ContainerPlugin extends builtin_plugin_base.Xj {
|
|
56756
56778
|
raw(compiler) {
|
|
56757
56779
|
const { name, shareScope, library, runtime, filename, exposes, enhanced } = this._options;
|
|
56758
56780
|
if (!compiler.options.output.enabledLibraryTypes.includes(library.type)) compiler.options.output.enabledLibraryTypes.push(library.type);
|
|
@@ -56769,7 +56791,7 @@ class ContainerPlugin extends RspackBuiltinPlugin {
|
|
|
56769
56791
|
})),
|
|
56770
56792
|
enhanced
|
|
56771
56793
|
};
|
|
56772
|
-
return
|
|
56794
|
+
return (0, builtin_plugin_base.no)(this.name, rawOptions);
|
|
56773
56795
|
}
|
|
56774
56796
|
constructor(options){
|
|
56775
56797
|
super(), ContainerPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.ContainerPlugin), ContainerPlugin_define_property(this, "_options", void 0);
|
|
@@ -56807,7 +56829,7 @@ function ContainerReferencePlugin_define_property(obj, key, value) {
|
|
|
56807
56829
|
else obj[key] = value;
|
|
56808
56830
|
return obj;
|
|
56809
56831
|
}
|
|
56810
|
-
class ContainerReferencePlugin extends
|
|
56832
|
+
class ContainerReferencePlugin extends builtin_plugin_base.Xj {
|
|
56811
56833
|
raw(compiler) {
|
|
56812
56834
|
const { remoteType, remotes } = this._options;
|
|
56813
56835
|
const remoteExternals = {};
|
|
@@ -56828,7 +56850,7 @@ class ContainerReferencePlugin extends RspackBuiltinPlugin {
|
|
|
56828
56850
|
})),
|
|
56829
56851
|
enhanced: this._options.enhanced
|
|
56830
56852
|
};
|
|
56831
|
-
return
|
|
56853
|
+
return (0, builtin_plugin_base.no)(this.name, rawOptions);
|
|
56832
56854
|
}
|
|
56833
56855
|
constructor(options){
|
|
56834
56856
|
super(), ContainerReferencePlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.ContainerReferencePlugin), ContainerReferencePlugin_define_property(this, "_options", void 0);
|
|
@@ -56914,7 +56936,7 @@ function transformSync(source, options) {
|
|
|
56914
56936
|
const _options = JSON.stringify(options || {});
|
|
56915
56937
|
return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
|
|
56916
56938
|
}
|
|
56917
|
-
const exports_rspackVersion = "1.5.
|
|
56939
|
+
const exports_rspackVersion = "1.5.2";
|
|
56918
56940
|
const exports_version = "5.75.0";
|
|
56919
56941
|
const exports_WebpackError = Error;
|
|
56920
56942
|
const sources = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.3_patch_hash=b2a26650f08a2359d0a3cd81fa6fa272aa7441a28dd7e601792da5ed5d2b4aee/node_modules/webpack-sources/lib/index.js");
|
|
@@ -57000,7 +57022,7 @@ const exports_experiments = {
|
|
|
57000
57022
|
sync: external_rspack_wasi_browser_js_.sync
|
|
57001
57023
|
},
|
|
57002
57024
|
CssChunkingPlugin: CssChunkingPlugin,
|
|
57003
|
-
createNativePlugin:
|
|
57025
|
+
createNativePlugin: builtin_plugin_base.dE,
|
|
57004
57026
|
VirtualModulesPlugin: VirtualModulesPlugin
|
|
57005
57027
|
};
|
|
57006
57028
|
var rspack_process = __webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");
|
package/dist/napi-binding.d.ts
CHANGED
|
@@ -495,6 +495,10 @@ export declare class VirtualFileStore {
|
|
|
495
495
|
}
|
|
496
496
|
export type JsVirtualFileStore = VirtualFileStore
|
|
497
497
|
|
|
498
|
+
export interface AssetInfoRelated {
|
|
499
|
+
sourceMap?: string | null
|
|
500
|
+
}
|
|
501
|
+
|
|
498
502
|
export declare function async(path: string, request: string): Promise<ResolveResult>
|
|
499
503
|
|
|
500
504
|
export interface BuiltinPlugin {
|
|
@@ -674,10 +678,6 @@ export interface JsAssetEmittedArgs {
|
|
|
674
678
|
targetPath: string
|
|
675
679
|
}
|
|
676
680
|
|
|
677
|
-
export interface JsAssetInfoRelated {
|
|
678
|
-
sourceMap?: string
|
|
679
|
-
}
|
|
680
|
-
|
|
681
681
|
export interface JsBannerContentFnCtx {
|
|
682
682
|
hash: string
|
|
683
683
|
chunk: Chunk
|
|
@@ -1503,7 +1503,7 @@ export interface KnownAssetInfo {
|
|
|
1503
1503
|
/** when asset is javascript and an ESM */
|
|
1504
1504
|
javascriptModule?: boolean
|
|
1505
1505
|
/** related object to other assets, keyed by type of relation (only points from parent to child) */
|
|
1506
|
-
related?:
|
|
1506
|
+
related?: AssetInfoRelated
|
|
1507
1507
|
/** unused css local ident for the css chunk */
|
|
1508
1508
|
cssUnusedIdents?: Array<string>
|
|
1509
1509
|
/** whether this asset is over the size limit */
|
|
@@ -2348,11 +2348,11 @@ export interface RawJsonParserOptions {
|
|
|
2348
2348
|
}
|
|
2349
2349
|
|
|
2350
2350
|
export interface RawLazyCompilationOption {
|
|
2351
|
-
|
|
2351
|
+
currentActiveModules: ((err: Error | null, ) => Set<string>)
|
|
2352
2352
|
test?: RawLazyCompilationTest
|
|
2353
2353
|
entries: boolean
|
|
2354
2354
|
imports: boolean
|
|
2355
|
-
|
|
2355
|
+
client: string
|
|
2356
2356
|
}
|
|
2357
2357
|
|
|
2358
2358
|
export interface RawLibManifestPluginOptions {
|
|
@@ -2410,11 +2410,6 @@ export interface RawLimitChunkCountPluginOptions {
|
|
|
2410
2410
|
maxChunks: number
|
|
2411
2411
|
}
|
|
2412
2412
|
|
|
2413
|
-
export interface RawModuleArg {
|
|
2414
|
-
module: string
|
|
2415
|
-
path: string
|
|
2416
|
-
}
|
|
2417
|
-
|
|
2418
2413
|
export interface RawModuleFederationRuntimePluginOptions {
|
|
2419
2414
|
entryRuntime?: string | undefined
|
|
2420
2415
|
}
|
|
Binary file
|
package/dist/schema/config.d.ts
CHANGED
|
@@ -362,6 +362,7 @@ export declare const getRspackOptionsSchema: () => z.ZodObject<{
|
|
|
362
362
|
css: z.ZodOptional<z.ZodBoolean>;
|
|
363
363
|
layers: z.ZodOptional<z.ZodBoolean>;
|
|
364
364
|
incremental: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"safe">]>, z.ZodLiteral<"advance">]>, z.ZodLiteral<"advance-silent">]>, z.ZodObject<{
|
|
365
|
+
silent: z.ZodOptional<z.ZodBoolean>;
|
|
365
366
|
make: z.ZodOptional<z.ZodBoolean>;
|
|
366
367
|
inferAsyncModules: z.ZodOptional<z.ZodBoolean>;
|
|
367
368
|
providedExports: z.ZodOptional<z.ZodBoolean>;
|
package/dist/schema/loaders.d.ts
CHANGED
|
@@ -115,6 +115,7 @@ export declare const getZodSwcLoaderOptionsSchema: () => z.ZodObject<{
|
|
|
115
115
|
"2022-03": "2022-03";
|
|
116
116
|
}>>;
|
|
117
117
|
treatConstEnumAsEnum: z.ZodOptional<z.ZodBoolean>;
|
|
118
|
+
tsEnumIsMutable: z.ZodOptional<z.ZodBoolean>;
|
|
118
119
|
useDefineForClassFields: z.ZodOptional<z.ZodBoolean>;
|
|
119
120
|
verbatimModuleSyntax: z.ZodOptional<z.ZodBoolean>;
|
|
120
121
|
}, z.core.$strict>>;
|
package/package.json
CHANGED