@rspack/browser 1.5.0-rc.0 → 1.5.1
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/README.md +15 -0
- package/dist/Compiler.d.ts +5 -0
- package/dist/MultiWatching.d.ts +1 -1
- package/dist/browser/{BrowserImportEsmPlugin.d.ts → BrowserHttpImportEsmPlugin.d.ts} +3 -4
- package/dist/browser/BrowserRequire.d.ts +32 -0
- package/dist/browser/index.d.ts +2 -1
- package/dist/builtin-plugin/ExternalsPlugin.d.ts +2 -1
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +2 -16
- package/dist/config/adapterRuleUse.d.ts +26 -2
- package/dist/index.mjs +312 -271
- package/dist/napi-binding.d.ts +8 -12
- package/dist/rspack.wasm32-wasi.wasm +0 -0
- package/dist/schema/loaders.d.ts +1 -0
- package/package.json +1 -1
- package/dist/util/require.d.ts +0 -3
package/dist/index.mjs
CHANGED
|
@@ -35090,39 +35090,92 @@ var __webpack_modules__ = {
|
|
|
35090
35090
|
const { readFileSync, readdirSync, lstat, existsSync, readdir, watch } = fs;
|
|
35091
35091
|
const __WEBPACK_DEFAULT_EXPORT__ = fs;
|
|
35092
35092
|
},
|
|
35093
|
-
"./src/
|
|
35093
|
+
"./src/builtin-plugin/base.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
35094
35094
|
__webpack_require__.d(__webpack_exports__, {
|
|
35095
|
-
|
|
35096
|
-
|
|
35097
|
-
|
|
35098
|
-
|
|
35099
|
-
|
|
35100
|
-
|
|
35101
|
-
|
|
35102
|
-
|
|
35103
|
-
|
|
35104
|
-
|
|
35105
|
-
|
|
35106
|
-
|
|
35107
|
-
|
|
35108
|
-
|
|
35109
|
-
|
|
35110
|
-
|
|
35111
|
-
|
|
35112
|
-
|
|
35113
|
-
|
|
35114
|
-
|
|
35115
|
-
|
|
35116
|
-
|
|
35117
|
-
|
|
35118
|
-
|
|
35119
|
-
|
|
35120
|
-
|
|
35121
|
-
|
|
35122
|
-
|
|
35123
|
-
|
|
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
|
|
35124
35141
|
};
|
|
35125
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");
|
|
35126
35179
|
},
|
|
35127
35180
|
"@rspack/binding": function(module) {
|
|
35128
35181
|
module.exports = __WEBPACK_EXTERNAL_MODULE__rspack_wasi_browser_js_bd433424__;
|
|
@@ -35379,6 +35432,19 @@ function __webpack_require__(moduleId) {
|
|
|
35379
35432
|
});
|
|
35380
35433
|
};
|
|
35381
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
|
+
})();
|
|
35382
35448
|
(()=>{
|
|
35383
35449
|
__webpack_require__.g = (()=>{
|
|
35384
35450
|
if ('object' == typeof globalThis) return globalThis;
|
|
@@ -37725,72 +37791,12 @@ class Entries {
|
|
|
37725
37791
|
Compilation_class_private_field_set(this, _data, data);
|
|
37726
37792
|
}
|
|
37727
37793
|
}
|
|
37728
|
-
|
|
37729
|
-
|
|
37730
|
-
|
|
37731
|
-
|
|
37732
|
-
|
|
37733
|
-
|
|
37734
|
-
});
|
|
37735
|
-
else obj[key] = value;
|
|
37736
|
-
return obj;
|
|
37737
|
-
}
|
|
37738
|
-
const HOOKS_CAN_NOT_INHERENT_FROM_PARENT = [
|
|
37739
|
-
"make",
|
|
37740
|
-
"compile",
|
|
37741
|
-
"emit",
|
|
37742
|
-
"afterEmit",
|
|
37743
|
-
"invalid",
|
|
37744
|
-
"done",
|
|
37745
|
-
"thisCompilation"
|
|
37746
|
-
];
|
|
37747
|
-
function canInherentFromParent(affectedHooks) {
|
|
37748
|
-
if (void 0 === affectedHooks) return false;
|
|
37749
|
-
return !HOOKS_CAN_NOT_INHERENT_FROM_PARENT.includes(affectedHooks);
|
|
37750
|
-
}
|
|
37751
|
-
class RspackBuiltinPlugin {
|
|
37752
|
-
apply(compiler) {
|
|
37753
|
-
const raw = this.raw(compiler);
|
|
37754
|
-
if (raw) {
|
|
37755
|
-
raw.canInherentFromParent = canInherentFromParent(this.affectedHooks);
|
|
37756
|
-
compiler.__internal__registerBuiltinPlugin(raw);
|
|
37757
|
-
}
|
|
37758
|
-
}
|
|
37759
|
-
constructor(){
|
|
37760
|
-
base_define_property(this, "affectedHooks", void 0);
|
|
37761
|
-
}
|
|
37762
|
-
}
|
|
37763
|
-
function createBuiltinPlugin(name, options) {
|
|
37764
|
-
return {
|
|
37765
|
-
name: name,
|
|
37766
|
-
options: options ?? false
|
|
37767
|
-
};
|
|
37768
|
-
}
|
|
37769
|
-
function base_create(name, resolve, affectedHooks) {
|
|
37770
|
-
class Plugin extends RspackBuiltinPlugin {
|
|
37771
|
-
raw(compiler) {
|
|
37772
|
-
return createBuiltinPlugin(name, resolve.apply(compiler, this._args));
|
|
37773
|
-
}
|
|
37774
|
-
constructor(...args){
|
|
37775
|
-
super(), base_define_property(this, "name", name), base_define_property(this, "_args", void 0), base_define_property(this, "affectedHooks", affectedHooks);
|
|
37776
|
-
this._args = args;
|
|
37777
|
-
}
|
|
37778
|
-
}
|
|
37779
|
-
Object.defineProperty(Plugin, "name", {
|
|
37780
|
-
value: name
|
|
37781
|
-
});
|
|
37782
|
-
return Plugin;
|
|
37783
|
-
}
|
|
37784
|
-
const INTERNAL_PLUGIN_NAMES = Object.keys(external_rspack_wasi_browser_js_["default"].BuiltinPluginName);
|
|
37785
|
-
function createNativePlugin(name, resolve, affectedHooks) {
|
|
37786
|
-
if (INTERNAL_PLUGIN_NAMES.includes(name)) throw new Error(`Cannot register native plugin with name '${name}', it conflicts with internal plugin names.`);
|
|
37787
|
-
return base_create(name, resolve, affectedHooks);
|
|
37788
|
-
}
|
|
37789
|
-
const APIPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.APIPlugin, ()=>{});
|
|
37790
|
-
const ArrayPushCallbackChunkFormatPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.ArrayPushCallbackChunkFormatPlugin, ()=>{});
|
|
37791
|
-
const AssetModulesPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.AssetModulesPlugin, ()=>{}, "compilation");
|
|
37792
|
-
const AsyncWebAssemblyModulesPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.AsyncWebAssemblyModulesPlugin, ()=>{}, "compilation");
|
|
37793
|
-
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)=>{
|
|
37794
37800
|
if ("string" == typeof args || "function" == typeof args) return {
|
|
37795
37801
|
banner: args
|
|
37796
37802
|
};
|
|
@@ -37805,12 +37811,12 @@ const BannerPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginN
|
|
|
37805
37811
|
exclude: args.exclude
|
|
37806
37812
|
};
|
|
37807
37813
|
});
|
|
37808
|
-
const BundlerInfoRspackPlugin =
|
|
37814
|
+
const BundlerInfoRspackPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.BundlerInfoRspackPlugin, (options)=>({
|
|
37809
37815
|
version: options.version || "unknown",
|
|
37810
37816
|
bundler: options.bundler || "rspack",
|
|
37811
37817
|
force: options.force ?? true
|
|
37812
37818
|
}));
|
|
37813
|
-
const ChunkPrefetchPreloadPlugin =
|
|
37819
|
+
const ChunkPrefetchPreloadPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.ChunkPrefetchPreloadPlugin, ()=>{});
|
|
37814
37820
|
function CircularDependencyRspackPlugin_define_property(obj, key, value) {
|
|
37815
37821
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
37816
37822
|
value: value,
|
|
@@ -37821,7 +37827,7 @@ function CircularDependencyRspackPlugin_define_property(obj, key, value) {
|
|
|
37821
37827
|
else obj[key] = value;
|
|
37822
37828
|
return obj;
|
|
37823
37829
|
}
|
|
37824
|
-
class CircularDependencyRspackPlugin extends
|
|
37830
|
+
class CircularDependencyRspackPlugin extends builtin_plugin_base.Xj {
|
|
37825
37831
|
raw(compiler) {
|
|
37826
37832
|
const { failOnError, allowAsyncCycles, exclude, ignoredConnections } = this._options;
|
|
37827
37833
|
const rawOptions = {
|
|
@@ -37846,15 +37852,15 @@ class CircularDependencyRspackPlugin extends RspackBuiltinPlugin {
|
|
|
37846
37852
|
this._options.onEnd(compilation);
|
|
37847
37853
|
} : void 0
|
|
37848
37854
|
};
|
|
37849
|
-
return
|
|
37855
|
+
return (0, builtin_plugin_base.no)(this.name, rawOptions);
|
|
37850
37856
|
}
|
|
37851
37857
|
constructor(options){
|
|
37852
37858
|
super(), CircularDependencyRspackPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.CircularDependencyRspackPlugin), CircularDependencyRspackPlugin_define_property(this, "_options", void 0);
|
|
37853
37859
|
this._options = options;
|
|
37854
37860
|
}
|
|
37855
37861
|
}
|
|
37856
|
-
const CommonJsChunkFormatPlugin =
|
|
37857
|
-
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)=>{
|
|
37858
37864
|
const rawOptions = {
|
|
37859
37865
|
resourceRegExp
|
|
37860
37866
|
};
|
|
@@ -37879,7 +37885,7 @@ const ContextReplacementPlugin = base_create(external_rspack_wasi_browser_js_.Bu
|
|
|
37879
37885
|
}
|
|
37880
37886
|
return rawOptions;
|
|
37881
37887
|
});
|
|
37882
|
-
const CopyRspackPlugin =
|
|
37888
|
+
const CopyRspackPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.CopyRspackPlugin, (copy)=>{
|
|
37883
37889
|
const ret = {
|
|
37884
37890
|
patterns: []
|
|
37885
37891
|
};
|
|
@@ -37899,7 +37905,7 @@ const CopyRspackPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPlu
|
|
|
37899
37905
|
});
|
|
37900
37906
|
return ret;
|
|
37901
37907
|
});
|
|
37902
|
-
const CssChunkingPlugin =
|
|
37908
|
+
const CssChunkingPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_["default"].BuiltinPluginName.CssChunkingPlugin, function(options = {}) {
|
|
37903
37909
|
if (options.nextjs) return {
|
|
37904
37910
|
strict: options.strict,
|
|
37905
37911
|
minSize: options.minSize,
|
|
@@ -37915,7 +37921,7 @@ const CssChunkingPlugin = base_create(external_rspack_wasi_browser_js_["default"
|
|
|
37915
37921
|
}
|
|
37916
37922
|
return options;
|
|
37917
37923
|
});
|
|
37918
|
-
const CssModulesPlugin =
|
|
37924
|
+
const CssModulesPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.CssModulesPlugin, ()=>{}, "compilation");
|
|
37919
37925
|
var path_browserify = __webpack_require__("../../node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.js");
|
|
37920
37926
|
var path_browserify_default = /*#__PURE__*/ __webpack_require__.n(path_browserify);
|
|
37921
37927
|
const utils_PLUGIN_NAME = "css-extract-rspack-plugin";
|
|
@@ -37982,8 +37988,8 @@ class CssExtractRspackPlugin {
|
|
|
37982
37988
|
}
|
|
37983
37989
|
css_extract_define_property(CssExtractRspackPlugin, "pluginName", utils_PLUGIN_NAME);
|
|
37984
37990
|
css_extract_define_property(CssExtractRspackPlugin, "loader", LOADER_PATH);
|
|
37985
|
-
const DataUriPlugin =
|
|
37986
|
-
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) {
|
|
37987
37993
|
var _this_options_output_environment;
|
|
37988
37994
|
const supportsBigIntLiteral = (null == (_this_options_output_environment = this.options.output.environment) ? void 0 : _this_options_output_environment.bigIntLiteral) ?? false;
|
|
37989
37995
|
return normalizeValue(define1, supportsBigIntLiteral);
|
|
@@ -38021,9 +38027,9 @@ function DeterministicChunkIdsPlugin_define_property(obj, key, value) {
|
|
|
38021
38027
|
else obj[key] = value;
|
|
38022
38028
|
return obj;
|
|
38023
38029
|
}
|
|
38024
|
-
class DeterministicChunkIdsPlugin extends
|
|
38030
|
+
class DeterministicChunkIdsPlugin extends builtin_plugin_base.Xj {
|
|
38025
38031
|
raw(compiler) {
|
|
38026
|
-
return
|
|
38032
|
+
return (0, builtin_plugin_base.no)(this.name, void 0);
|
|
38027
38033
|
}
|
|
38028
38034
|
constructor(...args){
|
|
38029
38035
|
super(...args), DeterministicChunkIdsPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.DeterministicChunkIdsPlugin), DeterministicChunkIdsPlugin_define_property(this, "affectedHooks", "compilation");
|
|
@@ -38039,20 +38045,20 @@ function DeterministicModuleIdsPlugin_define_property(obj, key, value) {
|
|
|
38039
38045
|
else obj[key] = value;
|
|
38040
38046
|
return obj;
|
|
38041
38047
|
}
|
|
38042
|
-
class DeterministicModuleIdsPlugin extends
|
|
38048
|
+
class DeterministicModuleIdsPlugin extends builtin_plugin_base.Xj {
|
|
38043
38049
|
raw(compiler) {
|
|
38044
|
-
return
|
|
38050
|
+
return (0, builtin_plugin_base.no)(this.name, void 0);
|
|
38045
38051
|
}
|
|
38046
38052
|
constructor(...args){
|
|
38047
38053
|
super(...args), DeterministicModuleIdsPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.DeterministicModuleIdsPlugin), DeterministicModuleIdsPlugin_define_property(this, "affectedHooks", "compilation");
|
|
38048
38054
|
}
|
|
38049
38055
|
}
|
|
38050
|
-
const DllEntryPlugin =
|
|
38056
|
+
const DllEntryPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.DllEntryPlugin, (context, entries, options)=>({
|
|
38051
38057
|
context,
|
|
38052
38058
|
entries,
|
|
38053
38059
|
name: options.name
|
|
38054
38060
|
}));
|
|
38055
|
-
const DllReferenceAgencyPlugin =
|
|
38061
|
+
const DllReferenceAgencyPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.DllReferenceAgencyPlugin, (options)=>options);
|
|
38056
38062
|
var assert = __webpack_require__("../../node_modules/.pnpm/assert@2.1.0/node_modules/assert/build/assert.js");
|
|
38057
38063
|
var assert_default = /*#__PURE__*/ __webpack_require__.n(assert);
|
|
38058
38064
|
class EntryOptionPlugin {
|
|
@@ -38089,7 +38095,7 @@ class EntryOptionPlugin {
|
|
|
38089
38095
|
}
|
|
38090
38096
|
}
|
|
38091
38097
|
const lib_EntryOptionPlugin = EntryOptionPlugin;
|
|
38092
|
-
const OriginEntryPlugin =
|
|
38098
|
+
const OriginEntryPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.EntryPlugin, (context, entry, options = "")=>{
|
|
38093
38099
|
const entryOptions = "string" == typeof options ? {
|
|
38094
38100
|
name: options
|
|
38095
38101
|
} : options;
|
|
@@ -38127,7 +38133,7 @@ function DynamicEntryPlugin_define_property(obj, key, value) {
|
|
|
38127
38133
|
else obj[key] = value;
|
|
38128
38134
|
return obj;
|
|
38129
38135
|
}
|
|
38130
|
-
class DynamicEntryPlugin extends
|
|
38136
|
+
class DynamicEntryPlugin extends builtin_plugin_base.Xj {
|
|
38131
38137
|
raw(compiler) {
|
|
38132
38138
|
const raw = {
|
|
38133
38139
|
context: this.context,
|
|
@@ -38142,14 +38148,14 @@ class DynamicEntryPlugin extends RspackBuiltinPlugin {
|
|
|
38142
38148
|
});
|
|
38143
38149
|
}
|
|
38144
38150
|
};
|
|
38145
|
-
return
|
|
38151
|
+
return (0, builtin_plugin_base.no)(this.name, raw);
|
|
38146
38152
|
}
|
|
38147
38153
|
constructor(context, entry){
|
|
38148
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";
|
|
38149
38155
|
}
|
|
38150
38156
|
}
|
|
38151
|
-
const ElectronTargetPlugin =
|
|
38152
|
-
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);
|
|
38153
38159
|
const enabledTypes = new WeakMap();
|
|
38154
38160
|
const getEnabledTypes = (compiler)=>{
|
|
38155
38161
|
let set = enabledTypes.get(compiler);
|
|
@@ -38209,7 +38215,7 @@ const EnableLibraryPlugin_getEnabledTypes = (compiler)=>{
|
|
|
38209
38215
|
}
|
|
38210
38216
|
return set;
|
|
38211
38217
|
};
|
|
38212
|
-
class EnableLibraryPlugin extends
|
|
38218
|
+
class EnableLibraryPlugin extends builtin_plugin_base.Xj {
|
|
38213
38219
|
static setEnabled(compiler, type) {
|
|
38214
38220
|
EnableLibraryPlugin_getEnabledTypes(compiler).add(type);
|
|
38215
38221
|
}
|
|
@@ -38221,16 +38227,16 @@ class EnableLibraryPlugin extends RspackBuiltinPlugin {
|
|
|
38221
38227
|
const enabled = EnableLibraryPlugin_getEnabledTypes(compiler);
|
|
38222
38228
|
if (enabled.has(type)) return;
|
|
38223
38229
|
enabled.add(type);
|
|
38224
|
-
return
|
|
38230
|
+
return (0, builtin_plugin_base.no)(this.name, type);
|
|
38225
38231
|
}
|
|
38226
38232
|
constructor(type){
|
|
38227
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;
|
|
38228
38234
|
}
|
|
38229
38235
|
}
|
|
38230
|
-
const EnableWasmLoadingPlugin =
|
|
38231
|
-
const EnsureChunkConditionsPlugin =
|
|
38232
|
-
const EvalDevToolModulePlugin =
|
|
38233
|
-
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");
|
|
38234
38240
|
function isNil(value) {
|
|
38235
38241
|
return null == value;
|
|
38236
38242
|
}
|
|
@@ -39188,7 +39194,6 @@ class ModuleWarning extends lib_WebpackError {
|
|
|
39188
39194
|
async function service_run() {
|
|
39189
39195
|
throw new Error("Not support browser");
|
|
39190
39196
|
}
|
|
39191
|
-
var util_require = __webpack_require__("./src/util/require.ts");
|
|
39192
39197
|
class LoadingLoaderError extends Error {
|
|
39193
39198
|
constructor(message){
|
|
39194
39199
|
super(message);
|
|
@@ -39198,9 +39203,15 @@ class LoadingLoaderError extends Error {
|
|
|
39198
39203
|
}
|
|
39199
39204
|
const LoaderLoadingError = LoadingLoaderError;
|
|
39200
39205
|
function loadLoader(loader, compiler, callback) {
|
|
39201
|
-
|
|
39202
|
-
|
|
39203
|
-
|
|
39206
|
+
{
|
|
39207
|
+
let module;
|
|
39208
|
+
try {
|
|
39209
|
+
module = compiler.__internal_browser_require(loader.path);
|
|
39210
|
+
} catch (e) {
|
|
39211
|
+
return callback(e);
|
|
39212
|
+
}
|
|
39213
|
+
return handleResult(loader, module, callback);
|
|
39214
|
+
}
|
|
39204
39215
|
}
|
|
39205
39216
|
function handleResult(loader, module, callback) {
|
|
39206
39217
|
if ("function" != typeof module && "object" != typeof module) return callback(new LoaderLoadingError(`Module '${loader.path}' is not a loader (export function or es6 module)`));
|
|
@@ -40605,7 +40616,7 @@ function ExternalsPlugin_define_property(obj, key, value) {
|
|
|
40605
40616
|
return obj;
|
|
40606
40617
|
}
|
|
40607
40618
|
var _resolveRequestCache = /*#__PURE__*/ new WeakMap(), _processResolveResult = /*#__PURE__*/ new WeakMap(), _processRequest = /*#__PURE__*/ new WeakSet(), _getRawExternalItem = /*#__PURE__*/ new WeakMap();
|
|
40608
|
-
class ExternalsPlugin extends
|
|
40619
|
+
class ExternalsPlugin extends builtin_plugin_base.Xj {
|
|
40609
40620
|
raw() {
|
|
40610
40621
|
const type = this.type;
|
|
40611
40622
|
const externals = this.externals;
|
|
@@ -40613,12 +40624,13 @@ class ExternalsPlugin extends RspackBuiltinPlugin {
|
|
|
40613
40624
|
type,
|
|
40614
40625
|
externals: (Array.isArray(externals) ? externals : [
|
|
40615
40626
|
externals
|
|
40616
|
-
]).filter(Boolean).map((item)=>ExternalsPlugin_class_private_field_get(this, _getRawExternalItem).call(this, item))
|
|
40627
|
+
]).filter(Boolean).map((item)=>ExternalsPlugin_class_private_field_get(this, _getRawExternalItem).call(this, item)),
|
|
40628
|
+
placeInInitial: this.placeInInitial ?? false
|
|
40617
40629
|
};
|
|
40618
|
-
return
|
|
40630
|
+
return (0, builtin_plugin_base.no)(this.name, raw);
|
|
40619
40631
|
}
|
|
40620
|
-
constructor(type, externals){
|
|
40621
|
-
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, "name", void 0), ExternalsPlugin_class_private_field_init(this, _resolveRequestCache, {
|
|
40632
|
+
constructor(type, externals, placeInInitial){
|
|
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, {
|
|
40622
40634
|
writable: true,
|
|
40623
40635
|
value: void 0
|
|
40624
40636
|
}), ExternalsPlugin_class_private_field_init(this, _processResolveResult, {
|
|
@@ -40627,7 +40639,7 @@ class ExternalsPlugin extends RspackBuiltinPlugin {
|
|
|
40627
40639
|
}), ExternalsPlugin_class_private_field_init(this, _getRawExternalItem, {
|
|
40628
40640
|
writable: true,
|
|
40629
40641
|
value: void 0
|
|
40630
|
-
}), this.type = type, this.externals = externals, this.name = external_rspack_wasi_browser_js_.BuiltinPluginName.ExternalsPlugin, ExternalsPlugin_class_private_field_set(this, _resolveRequestCache, new Map()), ExternalsPlugin_class_private_field_set(this, _processResolveResult, (text)=>{
|
|
40642
|
+
}), this.type = type, this.externals = externals, this.placeInInitial = placeInInitial, this.name = external_rspack_wasi_browser_js_.BuiltinPluginName.ExternalsPlugin, ExternalsPlugin_class_private_field_set(this, _resolveRequestCache, new Map()), ExternalsPlugin_class_private_field_set(this, _processResolveResult, (text)=>{
|
|
40631
40643
|
if (!text) return;
|
|
40632
40644
|
let resolveRequest = ExternalsPlugin_class_private_field_get(this, _resolveRequestCache).get(text);
|
|
40633
40645
|
if (!resolveRequest) {
|
|
@@ -40711,9 +40723,9 @@ function getRawExternalItemValue(value) {
|
|
|
40711
40723
|
]));
|
|
40712
40724
|
return value;
|
|
40713
40725
|
}
|
|
40714
|
-
const FetchCompileAsyncWasmPlugin =
|
|
40715
|
-
const FileUriPlugin =
|
|
40716
|
-
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");
|
|
40717
40729
|
function FlagDependencyUsagePlugin_define_property(obj, key, value) {
|
|
40718
40730
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
40719
40731
|
value: value,
|
|
@@ -40724,9 +40736,9 @@ function FlagDependencyUsagePlugin_define_property(obj, key, value) {
|
|
|
40724
40736
|
else obj[key] = value;
|
|
40725
40737
|
return obj;
|
|
40726
40738
|
}
|
|
40727
|
-
class FlagDependencyUsagePlugin extends
|
|
40739
|
+
class FlagDependencyUsagePlugin extends builtin_plugin_base.Xj {
|
|
40728
40740
|
raw(compiler) {
|
|
40729
|
-
return
|
|
40741
|
+
return (0, builtin_plugin_base.no)(this.name, this.global);
|
|
40730
40742
|
}
|
|
40731
40743
|
constructor(global){
|
|
40732
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";
|
|
@@ -40742,16 +40754,16 @@ function HotModuleReplacementPlugin_define_property(obj, key, value) {
|
|
|
40742
40754
|
else obj[key] = value;
|
|
40743
40755
|
return obj;
|
|
40744
40756
|
}
|
|
40745
|
-
class HotModuleReplacementPlugin extends
|
|
40757
|
+
class HotModuleReplacementPlugin extends builtin_plugin_base.Xj {
|
|
40746
40758
|
raw(compiler) {
|
|
40747
40759
|
if (void 0 === compiler.options.output.strictModuleErrorHandling) compiler.options.output.strictModuleErrorHandling = true;
|
|
40748
|
-
return
|
|
40760
|
+
return (0, builtin_plugin_base.no)(this.name, void 0);
|
|
40749
40761
|
}
|
|
40750
40762
|
constructor(...args){
|
|
40751
40763
|
super(...args), HotModuleReplacementPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.HotModuleReplacementPlugin);
|
|
40752
40764
|
}
|
|
40753
40765
|
}
|
|
40754
|
-
const HttpExternalsRspackPlugin =
|
|
40766
|
+
const HttpExternalsRspackPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.HttpExternalsRspackPlugin, (css, webAsync)=>({
|
|
40755
40767
|
css,
|
|
40756
40768
|
webAsync
|
|
40757
40769
|
}));
|
|
@@ -40780,7 +40792,7 @@ const defaultHttpClientForBrowser = async (url, headers)=>{
|
|
|
40780
40792
|
body: Buffer.from(await res.arrayBuffer())
|
|
40781
40793
|
};
|
|
40782
40794
|
};
|
|
40783
|
-
class HttpUriPlugin extends
|
|
40795
|
+
class HttpUriPlugin extends builtin_plugin_base.Xj {
|
|
40784
40796
|
raw(compiler) {
|
|
40785
40797
|
const options = this.options;
|
|
40786
40798
|
const lockfileLocation = options.lockfileLocation ?? path_browserify_default().join(compiler.context, compiler.name ? `${compiler.name}.rspack.lock` : "rspack.lock");
|
|
@@ -40793,7 +40805,7 @@ class HttpUriPlugin extends RspackBuiltinPlugin {
|
|
|
40793
40805
|
upgrade: options.upgrade ?? false,
|
|
40794
40806
|
httpClient: options.httpClient ?? defaultHttpClient
|
|
40795
40807
|
};
|
|
40796
|
-
return
|
|
40808
|
+
return (0, builtin_plugin_base.no)(this.name, raw);
|
|
40797
40809
|
}
|
|
40798
40810
|
constructor(options){
|
|
40799
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";
|
|
@@ -44971,7 +44983,7 @@ const cleanPluginHooks = (compilation)=>{
|
|
|
44971
44983
|
};
|
|
44972
44984
|
var plugin_process = __webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");
|
|
44973
44985
|
let HTML_PLUGIN_UID = 0;
|
|
44974
|
-
const HtmlRspackPluginImpl =
|
|
44986
|
+
const HtmlRspackPluginImpl = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.HtmlRspackPlugin, function(c = {}) {
|
|
44975
44987
|
validateHtmlPluginOptions(c);
|
|
44976
44988
|
const uid = HTML_PLUGIN_UID++;
|
|
44977
44989
|
const meta = {};
|
|
@@ -45047,7 +45059,7 @@ const HtmlRspackPluginImpl = base_create(external_rspack_wasi_browser_js_.Builti
|
|
|
45047
45059
|
const templateFilePath = path_browserify_default().resolve(context, filename);
|
|
45048
45060
|
if (!browser_fs["default"].existsSync(templateFilePath)) throw new Error(`HtmlRspackPlugin: could not load file \`${filename}\` from \`${context}\``);
|
|
45049
45061
|
try {
|
|
45050
|
-
const renderer =
|
|
45062
|
+
const renderer = this.__internal_browser_require(templateFilePath);
|
|
45051
45063
|
if (false === c.templateParameters) return await renderer({});
|
|
45052
45064
|
return await renderer(generateRenderData(data));
|
|
45053
45065
|
} catch (e) {
|
|
@@ -45132,11 +45144,11 @@ HtmlRspackPlugin.createHtmlTagObject = (tagName, attributes, innerHTML)=>({
|
|
|
45132
45144
|
});
|
|
45133
45145
|
HtmlRspackPlugin.getHooks = HtmlRspackPlugin.getCompilationHooks = getPluginHooks;
|
|
45134
45146
|
HtmlRspackPlugin.version = 5;
|
|
45135
|
-
const IgnorePlugin =
|
|
45147
|
+
const IgnorePlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.IgnorePlugin, (options)=>{
|
|
45136
45148
|
validate(options, getIgnorePluginOptionsSchema);
|
|
45137
45149
|
return options;
|
|
45138
45150
|
});
|
|
45139
|
-
const InferAsyncModulesPlugin =
|
|
45151
|
+
const InferAsyncModulesPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.InferAsyncModulesPlugin, ()=>{}, "compilation");
|
|
45140
45152
|
function JavascriptModulesPlugin_define_property(obj, key, value) {
|
|
45141
45153
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
45142
45154
|
value: value,
|
|
@@ -45148,9 +45160,9 @@ function JavascriptModulesPlugin_define_property(obj, key, value) {
|
|
|
45148
45160
|
return obj;
|
|
45149
45161
|
}
|
|
45150
45162
|
const JavascriptModulesPlugin_compilationHooksMap = new WeakMap();
|
|
45151
|
-
class JavascriptModulesPlugin extends
|
|
45163
|
+
class JavascriptModulesPlugin extends builtin_plugin_base.Xj {
|
|
45152
45164
|
raw() {
|
|
45153
|
-
return
|
|
45165
|
+
return (0, builtin_plugin_base.no)(this.name, void 0);
|
|
45154
45166
|
}
|
|
45155
45167
|
static getCompilationHooks(compilation) {
|
|
45156
45168
|
checkCompilation(compilation);
|
|
@@ -45170,9 +45182,9 @@ class JavascriptModulesPlugin extends RspackBuiltinPlugin {
|
|
|
45170
45182
|
super(...args), JavascriptModulesPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.JavascriptModulesPlugin), JavascriptModulesPlugin_define_property(this, "affectedHooks", "compilation");
|
|
45171
45183
|
}
|
|
45172
45184
|
}
|
|
45173
|
-
const JsLoaderRspackPlugin =
|
|
45174
|
-
const JsonModulesPlugin =
|
|
45175
|
-
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)=>{
|
|
45176
45188
|
const { context, entryOnly, format, name, path, type } = options;
|
|
45177
45189
|
return {
|
|
45178
45190
|
context,
|
|
@@ -45183,7 +45195,7 @@ const LibManifestPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPl
|
|
|
45183
45195
|
type
|
|
45184
45196
|
};
|
|
45185
45197
|
});
|
|
45186
|
-
const LightningCssMinimizerRspackPlugin =
|
|
45198
|
+
const LightningCssMinimizerRspackPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.LightningCssMinimizerRspackPlugin, (options)=>{
|
|
45187
45199
|
var _options_minimizerOptions, _options_minimizerOptions1, _options_minimizerOptions2;
|
|
45188
45200
|
const { include, exclude, draft, nonStandard, pseudoClasses, drafts } = (null == options ? void 0 : options.minimizerOptions) ?? {};
|
|
45189
45201
|
const targets = (null == options ? void 0 : null == (_options_minimizerOptions = options.minimizerOptions) ? void 0 : _options_minimizerOptions.targets) ?? "fully supports es6";
|
|
@@ -45213,14 +45225,8 @@ const LightningCssMinimizerRspackPlugin = base_create(external_rspack_wasi_brows
|
|
|
45213
45225
|
}
|
|
45214
45226
|
};
|
|
45215
45227
|
});
|
|
45216
|
-
const LimitChunkCountPlugin =
|
|
45217
|
-
|
|
45218
|
-
module,
|
|
45219
|
-
cacheable,
|
|
45220
|
-
imports,
|
|
45221
|
-
entries,
|
|
45222
|
-
test
|
|
45223
|
-
}), "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");
|
|
45224
45230
|
const LAZY_COMPILATION_PREFIX = "/lazy-compilation-using-";
|
|
45225
45231
|
const getDefaultClient = (compiler)=>require.resolve(`../hot/lazy-compilation-${compiler.options.externalsPresets.node ? "node" : "web"}.js`);
|
|
45226
45232
|
const noop = (_req, _res, next)=>{
|
|
@@ -45262,9 +45268,8 @@ const lazyCompilationMiddleware = (compiler)=>{
|
|
|
45262
45268
|
const prefix = options.prefix || LAZY_COMPILATION_PREFIX;
|
|
45263
45269
|
options.prefix = `${prefix}__${i++}`;
|
|
45264
45270
|
const activeModules = new Set();
|
|
45265
|
-
|
|
45266
|
-
|
|
45267
|
-
applyPlugin(c, options, activeModules, filesByKey);
|
|
45271
|
+
middlewareByCompiler.set(options.prefix, lazyCompilationMiddlewareInternal(compiler, activeModules, options.prefix));
|
|
45272
|
+
applyPlugin(c, options, activeModules);
|
|
45268
45273
|
}
|
|
45269
45274
|
const keys = [
|
|
45270
45275
|
...middlewareByCompiler.keys()
|
|
@@ -45285,34 +45290,28 @@ const lazyCompilationMiddleware = (compiler)=>{
|
|
|
45285
45290
|
}
|
|
45286
45291
|
if (!compiler.options.lazyCompilation && !compiler.options.experiments.lazyCompilation) return noop;
|
|
45287
45292
|
const activeModules = new Set();
|
|
45288
|
-
const filesByKey = new Map();
|
|
45289
45293
|
const options = {
|
|
45290
45294
|
...compiler.options.experiments.lazyCompilation,
|
|
45291
45295
|
...compiler.options.lazyCompilation
|
|
45292
45296
|
};
|
|
45293
|
-
applyPlugin(compiler, options, activeModules
|
|
45297
|
+
applyPlugin(compiler, options, activeModules);
|
|
45294
45298
|
const lazyCompilationPrefix = options.prefix || LAZY_COMPILATION_PREFIX;
|
|
45295
|
-
return lazyCompilationMiddlewareInternal(compiler, activeModules,
|
|
45299
|
+
return lazyCompilationMiddlewareInternal(compiler, activeModules, lazyCompilationPrefix);
|
|
45296
45300
|
};
|
|
45297
|
-
function applyPlugin(compiler, options, activeModules
|
|
45298
|
-
const plugin = new
|
|
45299
|
-
const
|
|
45300
|
-
|
|
45301
|
-
|
|
45302
|
-
|
|
45303
|
-
client: `${options.client || getDefaultClient(compiler)}?${encodeURIComponent(getFullServerUrl(options))}`,
|
|
45304
|
-
data,
|
|
45305
|
-
active
|
|
45306
|
-
};
|
|
45307
|
-
}, 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);
|
|
45308
45307
|
plugin.apply(compiler);
|
|
45309
45308
|
}
|
|
45310
|
-
const lazyCompilationMiddlewareInternal = (compiler, activeModules,
|
|
45309
|
+
const lazyCompilationMiddlewareInternal = (compiler, activeModules, lazyCompilationPrefix)=>{
|
|
45311
45310
|
const logger = compiler.getInfrastructureLogger("LazyCompilation");
|
|
45312
45311
|
return (req, res, next)=>{
|
|
45313
45312
|
var _req_url;
|
|
45314
45313
|
if (!(null == (_req_url = req.url) ? void 0 : _req_url.startsWith(lazyCompilationPrefix))) return null == next ? void 0 : next();
|
|
45315
|
-
const modules = req.url.slice(lazyCompilationPrefix.length).split("@");
|
|
45314
|
+
const modules = req.url.slice(lazyCompilationPrefix.length).split("@").map(decodeURIComponent);
|
|
45316
45315
|
req.socket.setNoDelay(true);
|
|
45317
45316
|
res.setHeader("content-type", "text/event-stream");
|
|
45318
45317
|
res.writeHead(200);
|
|
@@ -45326,14 +45325,7 @@ const lazyCompilationMiddlewareInternal = (compiler, activeModules, filesByKey,
|
|
|
45326
45325
|
moduleActivated.push(key);
|
|
45327
45326
|
}
|
|
45328
45327
|
}
|
|
45329
|
-
if (moduleActivated.length && compiler.watching)
|
|
45330
|
-
const rebuiltModules = new Set(moduleActivated.map((key)=>{
|
|
45331
|
-
const filePath = filesByKey.get(key);
|
|
45332
|
-
if (!filePath) logger.warn(`Cannot find correct file path for module ${key}`);
|
|
45333
|
-
return filePath;
|
|
45334
|
-
}).filter(Boolean));
|
|
45335
|
-
if (rebuiltModules.size) compiler.watching.invalidateWithChangesAndRemovals(rebuiltModules);
|
|
45336
|
-
}
|
|
45328
|
+
if (moduleActivated.length && compiler.watching) compiler.watching.invalidate();
|
|
45337
45329
|
};
|
|
45338
45330
|
};
|
|
45339
45331
|
function MangleExportsPlugin_define_property(obj, key, value) {
|
|
@@ -45346,16 +45338,16 @@ function MangleExportsPlugin_define_property(obj, key, value) {
|
|
|
45346
45338
|
else obj[key] = value;
|
|
45347
45339
|
return obj;
|
|
45348
45340
|
}
|
|
45349
|
-
class MangleExportsPlugin extends
|
|
45341
|
+
class MangleExportsPlugin extends builtin_plugin_base.Xj {
|
|
45350
45342
|
raw(compiler) {
|
|
45351
|
-
return
|
|
45343
|
+
return (0, builtin_plugin_base.no)(this.name, this.deterministic);
|
|
45352
45344
|
}
|
|
45353
45345
|
constructor(deterministic){
|
|
45354
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";
|
|
45355
45347
|
}
|
|
45356
45348
|
}
|
|
45357
|
-
const MergeDuplicateChunksPlugin =
|
|
45358
|
-
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, ()=>{});
|
|
45359
45351
|
function ModuleConcatenationPlugin_define_property(obj, key, value) {
|
|
45360
45352
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
45361
45353
|
value: value,
|
|
@@ -45366,17 +45358,17 @@ function ModuleConcatenationPlugin_define_property(obj, key, value) {
|
|
|
45366
45358
|
else obj[key] = value;
|
|
45367
45359
|
return obj;
|
|
45368
45360
|
}
|
|
45369
|
-
class ModuleConcatenationPlugin extends
|
|
45361
|
+
class ModuleConcatenationPlugin extends builtin_plugin_base.Xj {
|
|
45370
45362
|
raw(compiler) {
|
|
45371
|
-
return
|
|
45363
|
+
return (0, builtin_plugin_base.no)(this.name, void 0);
|
|
45372
45364
|
}
|
|
45373
45365
|
constructor(...args){
|
|
45374
45366
|
super(...args), ModuleConcatenationPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.ModuleConcatenationPlugin), ModuleConcatenationPlugin_define_property(this, "affectedHooks", "compilation");
|
|
45375
45367
|
}
|
|
45376
45368
|
}
|
|
45377
|
-
const ModuleInfoHeaderPlugin =
|
|
45378
|
-
const NamedChunkIdsPlugin =
|
|
45379
|
-
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");
|
|
45380
45372
|
function NaturalChunkIdsPlugin_define_property(obj, key, value) {
|
|
45381
45373
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
45382
45374
|
value: value,
|
|
@@ -45387,9 +45379,9 @@ function NaturalChunkIdsPlugin_define_property(obj, key, value) {
|
|
|
45387
45379
|
else obj[key] = value;
|
|
45388
45380
|
return obj;
|
|
45389
45381
|
}
|
|
45390
|
-
class NaturalChunkIdsPlugin extends
|
|
45382
|
+
class NaturalChunkIdsPlugin extends builtin_plugin_base.Xj {
|
|
45391
45383
|
raw(compiler) {
|
|
45392
|
-
return
|
|
45384
|
+
return (0, builtin_plugin_base.no)(this.name, void 0);
|
|
45393
45385
|
}
|
|
45394
45386
|
constructor(...args){
|
|
45395
45387
|
super(...args), NaturalChunkIdsPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.NaturalChunkIdsPlugin), NaturalChunkIdsPlugin_define_property(this, "affectedHooks", "compilation");
|
|
@@ -45405,27 +45397,27 @@ function NaturalModuleIdsPlugin_define_property(obj, key, value) {
|
|
|
45405
45397
|
else obj[key] = value;
|
|
45406
45398
|
return obj;
|
|
45407
45399
|
}
|
|
45408
|
-
class NaturalModuleIdsPlugin extends
|
|
45400
|
+
class NaturalModuleIdsPlugin extends builtin_plugin_base.Xj {
|
|
45409
45401
|
raw(compiler) {
|
|
45410
|
-
return
|
|
45402
|
+
return (0, builtin_plugin_base.no)(this.name, void 0);
|
|
45411
45403
|
}
|
|
45412
45404
|
constructor(...args){
|
|
45413
45405
|
super(...args), NaturalModuleIdsPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.NaturalModuleIdsPlugin), NaturalModuleIdsPlugin_define_property(this, "affectedHooks", "compilation");
|
|
45414
45406
|
}
|
|
45415
45407
|
}
|
|
45416
|
-
const NodeTargetPlugin =
|
|
45417
|
-
const NoEmitOnErrorsPlugin =
|
|
45418
|
-
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)=>({
|
|
45419
45411
|
resourceRegExp,
|
|
45420
45412
|
newResource: "function" == typeof newResource ? (data)=>{
|
|
45421
45413
|
newResource(data);
|
|
45422
45414
|
return data;
|
|
45423
45415
|
} : newResource
|
|
45424
45416
|
}));
|
|
45425
|
-
const OccurrenceChunkIdsPlugin =
|
|
45417
|
+
const OccurrenceChunkIdsPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.OccurrenceChunkIdsPlugin, (options)=>({
|
|
45426
45418
|
...options
|
|
45427
45419
|
}), "compilation");
|
|
45428
|
-
const ProgressPlugin =
|
|
45420
|
+
const ProgressPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.ProgressPlugin, (progress = {})=>{
|
|
45429
45421
|
if ("function" == typeof progress) return {
|
|
45430
45422
|
handler: (percentage, msg, items)=>{
|
|
45431
45423
|
progress(percentage, msg, ...items);
|
|
@@ -45433,7 +45425,7 @@ const ProgressPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPlugi
|
|
|
45433
45425
|
};
|
|
45434
45426
|
return progress;
|
|
45435
45427
|
});
|
|
45436
|
-
const ProvidePlugin =
|
|
45428
|
+
const ProvidePlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.ProvidePlugin, (provide)=>{
|
|
45437
45429
|
const entries = Object.entries(provide).map(([key, value])=>{
|
|
45438
45430
|
if ("string" == typeof value) value = [
|
|
45439
45431
|
value
|
|
@@ -45445,10 +45437,10 @@ const ProvidePlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPlugin
|
|
|
45445
45437
|
});
|
|
45446
45438
|
return Object.fromEntries(entries);
|
|
45447
45439
|
}, "compilation");
|
|
45448
|
-
const RealContentHashPlugin =
|
|
45449
|
-
const RemoveDuplicateModulesPlugin =
|
|
45450
|
-
const RemoveEmptyChunksPlugin =
|
|
45451
|
-
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 = {
|
|
45452
45444
|
moduleGraphFeatures: true,
|
|
45453
45445
|
chunkGraphFeatures: true
|
|
45454
45446
|
}) {
|
|
@@ -45523,10 +45515,10 @@ const createRsdoctorPluginHooksRegisters = (getCompiler, createTap, createMapTap
|
|
|
45523
45515
|
};
|
|
45524
45516
|
})
|
|
45525
45517
|
});
|
|
45526
|
-
const RslibPlugin =
|
|
45527
|
-
const RstestPlugin =
|
|
45528
|
-
const RuntimeChunkPlugin =
|
|
45529
|
-
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");
|
|
45530
45522
|
const RuntimePlugin = RuntimePluginImpl;
|
|
45531
45523
|
const RuntimePlugin_compilationHooksMap = new WeakMap();
|
|
45532
45524
|
RuntimePlugin.getHooks = RuntimePlugin.getCompilationHooks = (compilation)=>{
|
|
@@ -45574,15 +45566,15 @@ const createRuntimePluginHooksRegisters = (getCompiler, createTap, createMapTap)
|
|
|
45574
45566
|
};
|
|
45575
45567
|
})
|
|
45576
45568
|
});
|
|
45577
|
-
const SideEffectsFlagPlugin =
|
|
45578
|
-
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)=>{
|
|
45579
45571
|
const hints = false === options.hints ? void 0 : options.hints;
|
|
45580
45572
|
return {
|
|
45581
45573
|
...options,
|
|
45582
45574
|
hints
|
|
45583
45575
|
};
|
|
45584
45576
|
});
|
|
45585
|
-
const SourceMapDevToolPlugin =
|
|
45577
|
+
const SourceMapDevToolPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.SourceMapDevToolPlugin, (options)=>options, "compilation");
|
|
45586
45578
|
class JsSplitChunkSizes {
|
|
45587
45579
|
static __to_binding(sizes) {
|
|
45588
45580
|
if ("number" == typeof sizes) return sizes;
|
|
@@ -45605,11 +45597,11 @@ function SplitChunksPlugin_define_property(obj, key, value) {
|
|
|
45605
45597
|
else obj[key] = value;
|
|
45606
45598
|
return obj;
|
|
45607
45599
|
}
|
|
45608
|
-
class SplitChunksPlugin extends
|
|
45600
|
+
class SplitChunksPlugin extends builtin_plugin_base.Xj {
|
|
45609
45601
|
raw(compiler) {
|
|
45610
45602
|
const rawOptions = toRawSplitChunksOptions(this.options, compiler);
|
|
45611
45603
|
assert_default()(void 0 !== rawOptions);
|
|
45612
|
-
return
|
|
45604
|
+
return (0, builtin_plugin_base.no)(this.name, rawOptions);
|
|
45613
45605
|
}
|
|
45614
45606
|
constructor(options){
|
|
45615
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";
|
|
@@ -45686,7 +45678,7 @@ function SubresourceIntegrityPlugin_define_property(obj, key, value) {
|
|
|
45686
45678
|
}
|
|
45687
45679
|
const SubresourceIntegrityPlugin_PLUGIN_NAME = "SubresourceIntegrityPlugin";
|
|
45688
45680
|
const NATIVE_HTML_PLUGIN = "HtmlRspackPlugin";
|
|
45689
|
-
const NativeSubresourceIntegrityPlugin =
|
|
45681
|
+
const NativeSubresourceIntegrityPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.SubresourceIntegrityPlugin, function(options) {
|
|
45690
45682
|
let htmlPlugin = "Disabled";
|
|
45691
45683
|
if (options.htmlPlugin === NATIVE_HTML_PLUGIN) htmlPlugin = "Native";
|
|
45692
45684
|
else if ("string" == typeof options.htmlPlugin) htmlPlugin = "JavaScript";
|
|
@@ -45772,9 +45764,12 @@ class SubresourceIntegrityPlugin extends NativeSubresourceIntegrityPlugin {
|
|
|
45772
45764
|
});
|
|
45773
45765
|
});
|
|
45774
45766
|
}
|
|
45775
|
-
|
|
45767
|
+
try {
|
|
45768
|
+
const htmlPlugin = compiler.__internal_browser_require(this.options.htmlPlugin);
|
|
45769
|
+
bindingHtmlHooks(htmlPlugin);
|
|
45770
|
+
} catch (e) {
|
|
45776
45771
|
if (!isErrorWithCode(e) || "MODULE_NOT_FOUND" !== e.code) throw e;
|
|
45777
|
-
}
|
|
45772
|
+
}
|
|
45778
45773
|
}
|
|
45779
45774
|
}
|
|
45780
45775
|
constructor(options = {}){
|
|
@@ -45869,7 +45864,7 @@ function getRawExtractCommentsOptions(extractComments) {
|
|
|
45869
45864
|
return res;
|
|
45870
45865
|
}
|
|
45871
45866
|
}
|
|
45872
|
-
const SwcJsMinimizerRspackPlugin =
|
|
45867
|
+
const SwcJsMinimizerRspackPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.SwcJsMinimizerRspackPlugin, (options)=>{
|
|
45873
45868
|
var _options_minimizerOptions, _options_minimizerOptions1, _options_minimizerOptions2, _options_minimizerOptions3, _options_minimizerOptions4, _options_minimizerOptions5;
|
|
45874
45869
|
let compress = (null == options ? void 0 : null == (_options_minimizerOptions = options.minimizerOptions) ? void 0 : _options_minimizerOptions.compress) ?? true;
|
|
45875
45870
|
const mangle = (null == options ? void 0 : null == (_options_minimizerOptions1 = options.minimizerOptions) ? void 0 : _options_minimizerOptions1.mangle) ?? true;
|
|
@@ -45900,7 +45895,7 @@ const SwcJsMinimizerRspackPlugin = base_create(external_rspack_wasi_browser_js_.
|
|
|
45900
45895
|
}
|
|
45901
45896
|
};
|
|
45902
45897
|
}, "compilation");
|
|
45903
|
-
const WarnCaseSensitiveModulesPlugin =
|
|
45898
|
+
const WarnCaseSensitiveModulesPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.WarnCaseSensitiveModulesPlugin, ()=>{}, "compilation");
|
|
45904
45899
|
function WebWorkerTemplatePlugin_define_property(obj, key, value) {
|
|
45905
45900
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
45906
45901
|
value: value,
|
|
@@ -45911,10 +45906,10 @@ function WebWorkerTemplatePlugin_define_property(obj, key, value) {
|
|
|
45911
45906
|
else obj[key] = value;
|
|
45912
45907
|
return obj;
|
|
45913
45908
|
}
|
|
45914
|
-
class WebWorkerTemplatePlugin extends
|
|
45909
|
+
class WebWorkerTemplatePlugin extends builtin_plugin_base.Xj {
|
|
45915
45910
|
raw(compiler) {
|
|
45916
45911
|
compiler.options.output.chunkLoading = "import-scripts";
|
|
45917
|
-
return
|
|
45912
|
+
return (0, builtin_plugin_base.no)(this.name, void 0);
|
|
45918
45913
|
}
|
|
45919
45914
|
constructor(...args){
|
|
45920
45915
|
super(...args), WebWorkerTemplatePlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.WebWorkerTemplatePlugin);
|
|
@@ -45930,11 +45925,11 @@ function WorkerPlugin_define_property(obj, key, value) {
|
|
|
45930
45925
|
else obj[key] = value;
|
|
45931
45926
|
return obj;
|
|
45932
45927
|
}
|
|
45933
|
-
class WorkerPlugin extends
|
|
45928
|
+
class WorkerPlugin extends builtin_plugin_base.Xj {
|
|
45934
45929
|
raw(compiler) {
|
|
45935
45930
|
if (this.chunkLoading) new EnableChunkLoadingPlugin(this.chunkLoading).apply(compiler);
|
|
45936
45931
|
if (this.wasmLoading) new EnableWasmLoadingPlugin(this.wasmLoading).apply(compiler);
|
|
45937
|
-
return
|
|
45932
|
+
return (0, builtin_plugin_base.no)(this.name, void 0);
|
|
45938
45933
|
}
|
|
45939
45934
|
constructor(chunkLoading, wasmLoading, module, workerPublicPath){
|
|
45940
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;
|
|
@@ -47076,7 +47071,7 @@ const applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
|
47076
47071
|
if ("object" == typeof rspackFuture) {
|
|
47077
47072
|
D(rspackFuture, "bundlerInfo", {});
|
|
47078
47073
|
if ("object" == typeof rspackFuture.bundlerInfo) {
|
|
47079
|
-
D(rspackFuture.bundlerInfo, "version", "1.5.
|
|
47074
|
+
D(rspackFuture.bundlerInfo, "version", "1.5.1");
|
|
47080
47075
|
D(rspackFuture.bundlerInfo, "bundler", "rspack");
|
|
47081
47076
|
D(rspackFuture.bundlerInfo, "force", !library);
|
|
47082
47077
|
}
|
|
@@ -50704,7 +50699,7 @@ class Compiler {
|
|
|
50704
50699
|
]);
|
|
50705
50700
|
for(const hookName in this.hooks){
|
|
50706
50701
|
const name = hookName;
|
|
50707
|
-
if (
|
|
50702
|
+
if ((0, builtin_plugin_base.Gp)(name)) {
|
|
50708
50703
|
if (childCompiler.hooks[name]) childCompiler.hooks[name].taps = this.hooks[name].taps.slice();
|
|
50709
50704
|
}
|
|
50710
50705
|
}
|
|
@@ -50861,6 +50856,7 @@ class Compiler {
|
|
|
50861
50856
|
Compiler_define_property(this, "cache", void 0);
|
|
50862
50857
|
Compiler_define_property(this, "compilerPath", void 0);
|
|
50863
50858
|
Compiler_define_property(this, "options", void 0);
|
|
50859
|
+
Compiler_define_property(this, "__internal_browser_require", void 0);
|
|
50864
50860
|
Compiler_class_private_field_set(this, Compiler_initial, true);
|
|
50865
50861
|
Compiler_class_private_field_set(this, _builtinPlugins, []);
|
|
50866
50862
|
Compiler_class_private_field_set(this, _nonSkippableRegisters, []);
|
|
@@ -50969,6 +50965,9 @@ class Compiler {
|
|
|
50969
50965
|
this.running = false;
|
|
50970
50966
|
this.idle = false;
|
|
50971
50967
|
this.watchMode = false;
|
|
50968
|
+
this.__internal_browser_require = ()=>{
|
|
50969
|
+
throw new Error("Cannot execute user defined code in browser without `BrowserRequirePlugin`");
|
|
50970
|
+
};
|
|
50972
50971
|
this.resolverFactory = new ResolverFactory(options.resolve.pnp ?? getPnpDefault(), options.resolve, options.resolveLoader);
|
|
50973
50972
|
new JsLoaderRspackPlugin(this).apply(this);
|
|
50974
50973
|
new ExecuteModulePlugin().apply(this);
|
|
@@ -51167,7 +51166,7 @@ class MultiStats {
|
|
|
51167
51166
|
return obj;
|
|
51168
51167
|
});
|
|
51169
51168
|
if (childOptions.version) {
|
|
51170
|
-
obj.rspackVersion = "1.5.
|
|
51169
|
+
obj.rspackVersion = "1.5.1";
|
|
51171
51170
|
obj.version = "5.75.0";
|
|
51172
51171
|
}
|
|
51173
51172
|
if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join("");
|
|
@@ -51287,7 +51286,7 @@ function MultiWatching_define_property(obj, key, value) {
|
|
|
51287
51286
|
else obj[key] = value;
|
|
51288
51287
|
return obj;
|
|
51289
51288
|
}
|
|
51290
|
-
class
|
|
51289
|
+
class MultiWatching {
|
|
51291
51290
|
invalidate(callback) {
|
|
51292
51291
|
if (callback) asyncLib.each(this.watchings, (watching, callback)=>watching.invalidate(callback), callback);
|
|
51293
51292
|
else for (const watching of this.watchings)watching.invalidate();
|
|
@@ -51320,7 +51319,7 @@ class MultiWatching_MultiWatching {
|
|
|
51320
51319
|
this.compiler = compiler;
|
|
51321
51320
|
}
|
|
51322
51321
|
}
|
|
51323
|
-
const
|
|
51322
|
+
const src_MultiWatching = MultiWatching;
|
|
51324
51323
|
function ArrayQueue_define_property(obj, key, value) {
|
|
51325
51324
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
51326
51325
|
value: value,
|
|
@@ -51497,10 +51496,10 @@ class MultiCompiler {
|
|
|
51497
51496
|
if (compiler.watching !== watching) return;
|
|
51498
51497
|
if (!watching.running) watching.invalidate();
|
|
51499
51498
|
}, handler);
|
|
51500
|
-
this.watching = new
|
|
51499
|
+
this.watching = new src_MultiWatching(watchings, this);
|
|
51501
51500
|
return this.watching;
|
|
51502
51501
|
}
|
|
51503
|
-
this.watching = new
|
|
51502
|
+
this.watching = new src_MultiWatching([], this);
|
|
51504
51503
|
return this.watching;
|
|
51505
51504
|
}
|
|
51506
51505
|
run(callback, options) {
|
|
@@ -52477,7 +52476,7 @@ const SIMPLE_EXTRACTORS = {
|
|
|
52477
52476
|
},
|
|
52478
52477
|
version: (object)=>{
|
|
52479
52478
|
object.version = "5.75.0";
|
|
52480
|
-
object.rspackVersion = "1.5.
|
|
52479
|
+
object.rspackVersion = "1.5.1";
|
|
52481
52480
|
},
|
|
52482
52481
|
env: (object, _compilation, _context, { _env })=>{
|
|
52483
52482
|
object.env = _env;
|
|
@@ -54088,14 +54087,14 @@ class RspackOptionsApply {
|
|
|
54088
54087
|
compiler.outputFileSystem = browser_fs["default"];
|
|
54089
54088
|
if (options.externals) {
|
|
54090
54089
|
assert_default()(options.externalsType, "options.externalsType should have value after `applyRspackOptionsDefaults`");
|
|
54091
|
-
new ExternalsPlugin(options.externalsType, options.externals).apply(compiler);
|
|
54090
|
+
new ExternalsPlugin(options.externalsType, options.externals, false).apply(compiler);
|
|
54092
54091
|
}
|
|
54093
54092
|
if (options.externalsPresets.node) new NodeTargetPlugin().apply(compiler);
|
|
54094
54093
|
if (options.externalsPresets.electronMain) new ElectronTargetPlugin("main").apply(compiler);
|
|
54095
54094
|
if (options.externalsPresets.electronPreload) new ElectronTargetPlugin("preload").apply(compiler);
|
|
54096
54095
|
if (options.externalsPresets.electronRenderer) new ElectronTargetPlugin("renderer").apply(compiler);
|
|
54097
54096
|
if (options.externalsPresets.electron && !options.externalsPresets.electronMain && !options.externalsPresets.electronPreload && !options.externalsPresets.electronRenderer) new ElectronTargetPlugin().apply(compiler);
|
|
54098
|
-
if (options.externalsPresets.nwjs) new ExternalsPlugin("node-commonjs", "nw.gui").apply(compiler);
|
|
54097
|
+
if (options.externalsPresets.nwjs) new ExternalsPlugin("node-commonjs", "nw.gui", false).apply(compiler);
|
|
54099
54098
|
if (options.externalsPresets.web || options.externalsPresets.webAsync || options.externalsPresets.node && options.experiments.css) new HttpExternalsRspackPlugin(!!options.experiments.css, !!options.externalsPresets.webAsync).apply(compiler);
|
|
54100
54099
|
new ChunkPrefetchPreloadPlugin().apply(compiler);
|
|
54101
54100
|
if (options.output.pathinfo) new ModuleInfoHeaderPlugin("verbose" === options.output.pathinfo).apply(compiler);
|
|
@@ -54317,7 +54316,7 @@ const matchObject = (obj, str)=>{
|
|
|
54317
54316
|
}
|
|
54318
54317
|
return true;
|
|
54319
54318
|
};
|
|
54320
|
-
const FlagAllModulesAsUsedPlugin =
|
|
54319
|
+
const FlagAllModulesAsUsedPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.FlagAllModulesAsUsedPlugin, (explanation)=>({
|
|
54321
54320
|
explanation
|
|
54322
54321
|
}));
|
|
54323
54322
|
function DllPlugin_define_property(obj, key, value) {
|
|
@@ -55197,6 +55196,7 @@ const getZodSwcLoaderOptionsSchema = memoize(()=>{
|
|
|
55197
55196
|
"2022-03"
|
|
55198
55197
|
]),
|
|
55199
55198
|
treatConstEnumAsEnum: schemas_boolean(),
|
|
55199
|
+
tsEnumIsMutable: schemas_boolean(),
|
|
55200
55200
|
useDefineForClassFields: schemas_boolean(),
|
|
55201
55201
|
verbatimModuleSyntax: schemas_boolean()
|
|
55202
55202
|
}).partial();
|
|
@@ -56391,7 +56391,7 @@ const getRspackOptionsSchema = memoize(()=>{
|
|
|
56391
56391
|
}).partial().check(externalUmdChecker);
|
|
56392
56392
|
return rspackOptions;
|
|
56393
56393
|
});
|
|
56394
|
-
const ModuleFederationRuntimePlugin =
|
|
56394
|
+
const ModuleFederationRuntimePlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.ModuleFederationRuntimePlugin, (options = {})=>options);
|
|
56395
56395
|
const options_process = (options, normalizeSimple, normalizeOptions, fn)=>{
|
|
56396
56396
|
const array = (items)=>{
|
|
56397
56397
|
for (const item of items)if ("string" == typeof item) fn(item, normalizeSimple(item, item));
|
|
@@ -56550,11 +56550,7 @@ function getDefaultEntryRuntime(paths, options, compiler) {
|
|
|
56550
56550
|
`const __module_federation_remote_infos__ = ${JSON.stringify(remoteInfos)}`,
|
|
56551
56551
|
`const __module_federation_container_name__ = ${JSON.stringify(options.name ?? compiler.options.output.uniqueName)}`,
|
|
56552
56552
|
`const __module_federation_share_strategy__ = ${JSON.stringify(options.shareStrategy ?? "version-first")}`,
|
|
56553
|
-
compiler.webpack.Template.getFunctionContent(
|
|
56554
|
-
var e = new Error("Cannot find module './moduleFederationDefaultRuntime.js'");
|
|
56555
|
-
e.code = 'MODULE_NOT_FOUND';
|
|
56556
|
-
throw e;
|
|
56557
|
-
}())))
|
|
56553
|
+
compiler.webpack.Template.getFunctionContent(compiler.__internal_browser_require("@rspack/browser/moduleFederationDefaultRuntime.js"))
|
|
56558
56554
|
].join(";");
|
|
56559
56555
|
return `@module-federation/runtime/rspack.js!=!data:text/javascript,${content}`;
|
|
56560
56556
|
}
|
|
@@ -56575,11 +56571,11 @@ function isSingleton(compiler) {
|
|
|
56575
56571
|
function setSingleton(compiler) {
|
|
56576
56572
|
compilerSet.add(compiler);
|
|
56577
56573
|
}
|
|
56578
|
-
class ShareRuntimePlugin extends
|
|
56574
|
+
class ShareRuntimePlugin extends builtin_plugin_base.Xj {
|
|
56579
56575
|
raw(compiler) {
|
|
56580
56576
|
if (isSingleton(compiler)) return;
|
|
56581
56577
|
setSingleton(compiler);
|
|
56582
|
-
return
|
|
56578
|
+
return (0, builtin_plugin_base.no)(this.name, this.enhanced);
|
|
56583
56579
|
}
|
|
56584
56580
|
constructor(enhanced = false){
|
|
56585
56581
|
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;
|
|
@@ -56599,7 +56595,7 @@ function ConsumeSharedPlugin_define_property(obj, key, value) {
|
|
|
56599
56595
|
else obj[key] = value;
|
|
56600
56596
|
return obj;
|
|
56601
56597
|
}
|
|
56602
|
-
class ConsumeSharedPlugin extends
|
|
56598
|
+
class ConsumeSharedPlugin extends builtin_plugin_base.Xj {
|
|
56603
56599
|
raw(compiler) {
|
|
56604
56600
|
new ShareRuntimePlugin(this._options.enhanced).apply(compiler);
|
|
56605
56601
|
const rawOptions = {
|
|
@@ -56609,7 +56605,7 @@ class ConsumeSharedPlugin extends RspackBuiltinPlugin {
|
|
|
56609
56605
|
})),
|
|
56610
56606
|
enhanced: this._options.enhanced
|
|
56611
56607
|
};
|
|
56612
|
-
return
|
|
56608
|
+
return (0, builtin_plugin_base.no)(this.name, rawOptions);
|
|
56613
56609
|
}
|
|
56614
56610
|
constructor(options){
|
|
56615
56611
|
super(), ConsumeSharedPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.ConsumeSharedPlugin), ConsumeSharedPlugin_define_property(this, "_options", void 0);
|
|
@@ -56660,14 +56656,14 @@ function ProvideSharedPlugin_define_property(obj, key, value) {
|
|
|
56660
56656
|
else obj[key] = value;
|
|
56661
56657
|
return obj;
|
|
56662
56658
|
}
|
|
56663
|
-
class ProvideSharedPlugin extends
|
|
56659
|
+
class ProvideSharedPlugin extends builtin_plugin_base.Xj {
|
|
56664
56660
|
raw(compiler) {
|
|
56665
56661
|
new ShareRuntimePlugin(this._enhanced ?? false).apply(compiler);
|
|
56666
56662
|
const rawOptions = this._provides.map(([key, v])=>({
|
|
56667
56663
|
key,
|
|
56668
56664
|
...v
|
|
56669
56665
|
}));
|
|
56670
|
-
return
|
|
56666
|
+
return (0, builtin_plugin_base.no)(this.name, rawOptions);
|
|
56671
56667
|
}
|
|
56672
56668
|
constructor(options){
|
|
56673
56669
|
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);
|
|
@@ -56777,7 +56773,7 @@ function ContainerPlugin_define_property(obj, key, value) {
|
|
|
56777
56773
|
else obj[key] = value;
|
|
56778
56774
|
return obj;
|
|
56779
56775
|
}
|
|
56780
|
-
class ContainerPlugin extends
|
|
56776
|
+
class ContainerPlugin extends builtin_plugin_base.Xj {
|
|
56781
56777
|
raw(compiler) {
|
|
56782
56778
|
const { name, shareScope, library, runtime, filename, exposes, enhanced } = this._options;
|
|
56783
56779
|
if (!compiler.options.output.enabledLibraryTypes.includes(library.type)) compiler.options.output.enabledLibraryTypes.push(library.type);
|
|
@@ -56794,7 +56790,7 @@ class ContainerPlugin extends RspackBuiltinPlugin {
|
|
|
56794
56790
|
})),
|
|
56795
56791
|
enhanced
|
|
56796
56792
|
};
|
|
56797
|
-
return
|
|
56793
|
+
return (0, builtin_plugin_base.no)(this.name, rawOptions);
|
|
56798
56794
|
}
|
|
56799
56795
|
constructor(options){
|
|
56800
56796
|
super(), ContainerPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.ContainerPlugin), ContainerPlugin_define_property(this, "_options", void 0);
|
|
@@ -56832,7 +56828,7 @@ function ContainerReferencePlugin_define_property(obj, key, value) {
|
|
|
56832
56828
|
else obj[key] = value;
|
|
56833
56829
|
return obj;
|
|
56834
56830
|
}
|
|
56835
|
-
class ContainerReferencePlugin extends
|
|
56831
|
+
class ContainerReferencePlugin extends builtin_plugin_base.Xj {
|
|
56836
56832
|
raw(compiler) {
|
|
56837
56833
|
const { remoteType, remotes } = this._options;
|
|
56838
56834
|
const remoteExternals = {};
|
|
@@ -56843,7 +56839,7 @@ class ContainerReferencePlugin extends RspackBuiltinPlugin {
|
|
|
56843
56839
|
i++;
|
|
56844
56840
|
}
|
|
56845
56841
|
}
|
|
56846
|
-
new ExternalsPlugin(remoteType, remoteExternals).apply(compiler);
|
|
56842
|
+
new ExternalsPlugin(remoteType, remoteExternals, true).apply(compiler);
|
|
56847
56843
|
new ShareRuntimePlugin(this._options.enhanced).apply(compiler);
|
|
56848
56844
|
const rawOptions = {
|
|
56849
56845
|
remoteType: this._options.remoteType,
|
|
@@ -56853,7 +56849,7 @@ class ContainerReferencePlugin extends RspackBuiltinPlugin {
|
|
|
56853
56849
|
})),
|
|
56854
56850
|
enhanced: this._options.enhanced
|
|
56855
56851
|
};
|
|
56856
|
-
return
|
|
56852
|
+
return (0, builtin_plugin_base.no)(this.name, rawOptions);
|
|
56857
56853
|
}
|
|
56858
56854
|
constructor(options){
|
|
56859
56855
|
super(), ContainerReferencePlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.ContainerReferencePlugin), ContainerReferencePlugin_define_property(this, "_options", void 0);
|
|
@@ -56939,7 +56935,7 @@ function transformSync(source, options) {
|
|
|
56939
56935
|
const _options = JSON.stringify(options || {});
|
|
56940
56936
|
return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
|
|
56941
56937
|
}
|
|
56942
|
-
const exports_rspackVersion = "1.5.
|
|
56938
|
+
const exports_rspackVersion = "1.5.1";
|
|
56943
56939
|
const exports_version = "5.75.0";
|
|
56944
56940
|
const exports_WebpackError = Error;
|
|
56945
56941
|
const sources = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.3_patch_hash=b2a26650f08a2359d0a3cd81fa6fa272aa7441a28dd7e601792da5ed5d2b4aee/node_modules/webpack-sources/lib/index.js");
|
|
@@ -57025,7 +57021,7 @@ const exports_experiments = {
|
|
|
57025
57021
|
sync: external_rspack_wasi_browser_js_.sync
|
|
57026
57022
|
},
|
|
57027
57023
|
CssChunkingPlugin: CssChunkingPlugin,
|
|
57028
|
-
createNativePlugin:
|
|
57024
|
+
createNativePlugin: builtin_plugin_base.dE,
|
|
57029
57025
|
VirtualModulesPlugin: VirtualModulesPlugin
|
|
57030
57026
|
};
|
|
57031
57027
|
var rspack_process = __webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");
|
|
@@ -57110,7 +57106,7 @@ const src_fn = Object.assign(rspack_rspack, exports_namespaceObject);
|
|
|
57110
57106
|
src_fn.rspack = src_fn;
|
|
57111
57107
|
src_fn.webpack = src_fn;
|
|
57112
57108
|
const src_rspack = src_fn;
|
|
57113
|
-
function
|
|
57109
|
+
function BrowserHttpImportEsmPlugin_define_property(obj, key, value) {
|
|
57114
57110
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
57115
57111
|
value: value,
|
|
57116
57112
|
enumerable: true,
|
|
@@ -57120,13 +57116,13 @@ function BrowserImportEsmPlugin_define_property(obj, key, value) {
|
|
|
57120
57116
|
else obj[key] = value;
|
|
57121
57117
|
return obj;
|
|
57122
57118
|
}
|
|
57123
|
-
|
|
57124
|
-
class BrowserImportEsmPlugin {
|
|
57119
|
+
class BrowserHttpImportEsmPlugin {
|
|
57125
57120
|
apply(compiler) {
|
|
57126
57121
|
compiler.hooks.normalModuleFactory.tap("BrowserHttpImportPlugin", (nmf)=>{
|
|
57127
57122
|
nmf.hooks.resolve.tap("BrowserHttpImportPlugin", (resolveData)=>{
|
|
57128
57123
|
const request = resolveData.request;
|
|
57129
57124
|
const packageName = getPackageName(request);
|
|
57125
|
+
if (request.includes("!")) return;
|
|
57130
57126
|
if (this.options.dependencyUrl) {
|
|
57131
57127
|
if ("function" == typeof this.options.dependencyUrl) {
|
|
57132
57128
|
const url = this.options.dependencyUrl(packageName);
|
|
@@ -57142,7 +57138,7 @@ class BrowserImportEsmPlugin {
|
|
|
57142
57138
|
}
|
|
57143
57139
|
}
|
|
57144
57140
|
}
|
|
57145
|
-
const issuerUrl =
|
|
57141
|
+
const issuerUrl = toHttpUrl(resolveData.contextInfo.issuer);
|
|
57146
57142
|
if (issuerUrl) {
|
|
57147
57143
|
resolveData.request = this.resolveWithUrlIssuer(request, issuerUrl);
|
|
57148
57144
|
return;
|
|
@@ -57159,7 +57155,7 @@ class BrowserImportEsmPlugin {
|
|
|
57159
57155
|
}
|
|
57160
57156
|
resolveNodeModule(request, packageName) {
|
|
57161
57157
|
var _this_options_dependencyVersions;
|
|
57162
|
-
let domain =
|
|
57158
|
+
let domain = "";
|
|
57163
57159
|
if ("function" == typeof this.options.domain) domain = this.options.domain(request, packageName);
|
|
57164
57160
|
else if ("string" == typeof this.options.domain) domain = this.options.domain;
|
|
57165
57161
|
const version = (null == (_this_options_dependencyVersions = this.options.dependencyVersions) ? void 0 : _this_options_dependencyVersions[packageName]) || "latest";
|
|
@@ -57167,11 +57163,11 @@ class BrowserImportEsmPlugin {
|
|
|
57167
57163
|
return `${domain}/${versionedRequest}`;
|
|
57168
57164
|
}
|
|
57169
57165
|
isNodeModule(request) {
|
|
57170
|
-
if (
|
|
57166
|
+
if (toHttpUrl(request)) return false;
|
|
57171
57167
|
return !request.startsWith(".") && !request.startsWith("/") && !request.startsWith("!");
|
|
57172
57168
|
}
|
|
57173
|
-
constructor(options
|
|
57174
|
-
|
|
57169
|
+
constructor(options){
|
|
57170
|
+
BrowserHttpImportEsmPlugin_define_property(this, "options", void 0);
|
|
57175
57171
|
this.options = options;
|
|
57176
57172
|
}
|
|
57177
57173
|
}
|
|
@@ -57202,14 +57198,59 @@ function getRequestWithVersion(request, version) {
|
|
|
57202
57198
|
}
|
|
57203
57199
|
}
|
|
57204
57200
|
}
|
|
57205
|
-
function
|
|
57201
|
+
function toHttpUrl(request) {
|
|
57206
57202
|
try {
|
|
57207
57203
|
const url = new URL(request);
|
|
57208
|
-
return url;
|
|
57204
|
+
if ("http:" === url.protocol || "https:" === url.protocol) return url;
|
|
57209
57205
|
} catch {
|
|
57210
57206
|
return;
|
|
57211
57207
|
}
|
|
57212
57208
|
}
|
|
57209
|
+
function BrowserRequire_define_property(obj, key, value) {
|
|
57210
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
57211
|
+
value: value,
|
|
57212
|
+
enumerable: true,
|
|
57213
|
+
configurable: true,
|
|
57214
|
+
writable: true
|
|
57215
|
+
});
|
|
57216
|
+
else obj[key] = value;
|
|
57217
|
+
return obj;
|
|
57218
|
+
}
|
|
57219
|
+
const unsafeExecute = (code, runtime)=>{
|
|
57220
|
+
const wrapper = new Function("module", "exports", "require", code);
|
|
57221
|
+
wrapper(runtime.module, runtime.exports, runtime.require);
|
|
57222
|
+
};
|
|
57223
|
+
class BrowserRequirePlugin {
|
|
57224
|
+
apply(compiler) {
|
|
57225
|
+
const execute = this.options.execute;
|
|
57226
|
+
compiler.__internal_browser_require = function browserRequire(id) {
|
|
57227
|
+
const { path: loaderPath } = (0, external_rspack_wasi_browser_js_.sync)("", id);
|
|
57228
|
+
if (!loaderPath) throw new Error(`Cannot find loader of ${id}`);
|
|
57229
|
+
const data = browser_fs["default"].readFileSync(loaderPath);
|
|
57230
|
+
const code = (null == data ? void 0 : data.toString()) || "";
|
|
57231
|
+
const module = {
|
|
57232
|
+
exports: {}
|
|
57233
|
+
};
|
|
57234
|
+
const exports = module.exports;
|
|
57235
|
+
const cjs = (0, external_rspack_wasi_browser_js_.transformSync)(code, JSON.stringify({
|
|
57236
|
+
module: {
|
|
57237
|
+
type: "commonjs"
|
|
57238
|
+
}
|
|
57239
|
+
}));
|
|
57240
|
+
execute(cjs.code, {
|
|
57241
|
+
exports,
|
|
57242
|
+
module,
|
|
57243
|
+
require: browserRequire
|
|
57244
|
+
});
|
|
57245
|
+
return exports.default ?? module.exports;
|
|
57246
|
+
};
|
|
57247
|
+
}
|
|
57248
|
+
constructor(options){
|
|
57249
|
+
BrowserRequire_define_property(this, "options", void 0);
|
|
57250
|
+
this.options = options;
|
|
57251
|
+
}
|
|
57252
|
+
}
|
|
57253
|
+
BrowserRequire_define_property(BrowserRequirePlugin, "unsafeExecute", unsafeExecute);
|
|
57213
57254
|
const builtinMemFs = {
|
|
57214
57255
|
fs: browser_fs.fs,
|
|
57215
57256
|
volume: browser_fs.volume
|
|
@@ -57222,4 +57263,4 @@ var __webpack_exports__EntryDependency = external_rspack_wasi_browser_js_.EntryD
|
|
|
57222
57263
|
var __webpack_exports__ExternalModule = external_rspack_wasi_browser_js_.ExternalModule;
|
|
57223
57264
|
var __webpack_exports__Module = external_rspack_wasi_browser_js_.Module;
|
|
57224
57265
|
var __webpack_exports__NormalModule = external_rspack_wasi_browser_js_.NormalModule;
|
|
57225
|
-
export { BannerPlugin,
|
|
57266
|
+
export { BannerPlugin, BrowserHttpImportEsmPlugin, BrowserRequirePlugin, CircularDependencyRspackPlugin, Compilation, Compiler, ContextReplacementPlugin, CopyRspackPlugin, CssExtractRspackPlugin, DefinePlugin, DllPlugin, DllReferencePlugin, DynamicEntryPlugin, lib_EntryOptionPlugin as 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, validate_ValidationError as 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 };
|