@rspack-canary/browser 1.5.0-canary-e5e47098-20250820070851 → 1.5.1-canary-7c68c987-20250828115508

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/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/util/require.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
35093
+ "./src/builtin-plugin/base.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
35094
35094
  __webpack_require__.d(__webpack_exports__, {
35095
- y: ()=>nonWebpackRequire
35096
- });
35097
- var node_fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./src/browser/fs.ts");
35098
- var _rspack_binding__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("@rspack/binding");
35099
- function nonWebpackRequire() {
35100
- return async function(id) {
35101
- return new Promise((resolve, reject)=>{
35102
- (0, _rspack_binding__WEBPACK_IMPORTED_MODULE_1__.async)("", id).then(({ path: loaderPath })=>{
35103
- if (!loaderPath) return void reject(`Cannot find loader of ${id}`);
35104
- node_fs__WEBPACK_IMPORTED_MODULE_0__["default"].readFile(loaderPath, {}, (err, data)=>{
35105
- if (err) return void reject(err);
35106
- const loaderCode = (null == data ? void 0 : data.toString()) || "";
35107
- const codeUrl = URL.createObjectURL(new Blob([
35108
- loaderCode
35109
- ], {
35110
- type: "text/javascript"
35111
- }));
35112
- try {
35113
- const modulePromise = eval(`import("${codeUrl}")`);
35114
- modulePromise.then((module)=>{
35115
- URL.revokeObjectURL(codeUrl);
35116
- resolve(module);
35117
- });
35118
- } catch (e) {
35119
- reject(e);
35120
- }
35121
- });
35122
- }).catch((err)=>reject(err));
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
- function base_define_property(obj, key, value) {
37729
- if (key in obj) Object.defineProperty(obj, key, {
37730
- value: value,
37731
- enumerable: true,
37732
- configurable: true,
37733
- writable: true
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 = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.BundlerInfoRspackPlugin, (options)=>({
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 = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.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 RspackBuiltinPlugin {
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 createBuiltinPlugin(this.name, rawOptions);
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 = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.CommonJsChunkFormatPlugin, ()=>{});
37857
- const ContextReplacementPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.ContextReplacementPlugin, (resourceRegExp, newContentResource, newContentRecursive, newContentRegExp)=>{
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 = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.CopyRspackPlugin, (copy)=>{
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 = base_create(external_rspack_wasi_browser_js_["default"].BuiltinPluginName.CssChunkingPlugin, function(options = {}) {
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 = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.CssModulesPlugin, ()=>{}, "compilation");
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 = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.DataUriPlugin, ()=>{}, "compilation");
37986
- const DefinePlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.DefinePlugin, function(define1) {
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 RspackBuiltinPlugin {
38030
+ class DeterministicChunkIdsPlugin extends builtin_plugin_base.Xj {
38025
38031
  raw(compiler) {
38026
- return createBuiltinPlugin(this.name, void 0);
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 RspackBuiltinPlugin {
38048
+ class DeterministicModuleIdsPlugin extends builtin_plugin_base.Xj {
38043
38049
  raw(compiler) {
38044
- return createBuiltinPlugin(this.name, void 0);
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 = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.DllEntryPlugin, (context, entries, options)=>({
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 = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.DllReferenceAgencyPlugin, (options)=>options);
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 = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.EntryPlugin, (context, entry, options = "")=>{
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 RspackBuiltinPlugin {
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 createBuiltinPlugin(this.name, raw);
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 = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.ElectronTargetPlugin, (context)=>context ?? "none");
38152
- const EnableChunkLoadingPluginInner = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.EnableChunkLoadingPlugin, (type)=>type);
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 RspackBuiltinPlugin {
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 createBuiltinPlugin(this.name, type);
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 = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.EnableWasmLoadingPlugin, (type)=>type);
38231
- const EnsureChunkConditionsPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.EnsureChunkConditionsPlugin, ()=>{});
38232
- const EvalDevToolModulePlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.EvalDevToolModulePlugin, (options)=>options, "compilation");
38233
- const EvalSourceMapDevToolPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.EvalSourceMapDevToolPlugin, (options)=>options, "compilation");
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
  }
@@ -38710,11 +38716,11 @@ function trace_define_property(obj, key, value) {
38710
38716
  }
38711
38717
  class JavaScriptTracer {
38712
38718
  static async initJavaScriptTrace(layer, output) {
38713
- const { Session } = __webpack_require__(Object(function() {
38719
+ const { Session } = await Promise.resolve().then(function() {
38714
38720
  var e = new Error("Cannot find module 'node:inspector'");
38715
38721
  e.code = 'MODULE_NOT_FOUND';
38716
38722
  throw e;
38717
- }()));
38723
+ });
38718
38724
  this.session = new Session();
38719
38725
  this.layer = layer;
38720
38726
  this.output = output;
@@ -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
- (0, util_require.y)()(loader.path).then((module)=>{
39202
- handleResult(loader, module, callback);
39203
- }, callback);
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 RspackBuiltinPlugin {
40619
+ class ExternalsPlugin extends builtin_plugin_base.Xj {
40609
40620
  raw() {
40610
40621
  const type = this.type;
40611
40622
  const externals = this.externals;
@@ -40616,7 +40627,7 @@ class ExternalsPlugin extends RspackBuiltinPlugin {
40616
40627
  ]).filter(Boolean).map((item)=>ExternalsPlugin_class_private_field_get(this, _getRawExternalItem).call(this, item)),
40617
40628
  placeInInitial: this.placeInInitial ?? false
40618
40629
  };
40619
- return createBuiltinPlugin(this.name, raw);
40630
+ return (0, builtin_plugin_base.no)(this.name, raw);
40620
40631
  }
40621
40632
  constructor(type, externals, placeInInitial){
40622
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, {
@@ -40712,9 +40723,9 @@ function getRawExternalItemValue(value) {
40712
40723
  ]));
40713
40724
  return value;
40714
40725
  }
40715
- const FetchCompileAsyncWasmPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.FetchCompileAsyncWasmPlugin, ()=>{}, "thisCompilation");
40716
- const FileUriPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.FileUriPlugin, ()=>{}, "compilation");
40717
- const FlagDependencyExportsPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.FlagDependencyExportsPlugin, ()=>{}, "compilation");
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");
40718
40729
  function FlagDependencyUsagePlugin_define_property(obj, key, value) {
40719
40730
  if (key in obj) Object.defineProperty(obj, key, {
40720
40731
  value: value,
@@ -40725,9 +40736,9 @@ function FlagDependencyUsagePlugin_define_property(obj, key, value) {
40725
40736
  else obj[key] = value;
40726
40737
  return obj;
40727
40738
  }
40728
- class FlagDependencyUsagePlugin extends RspackBuiltinPlugin {
40739
+ class FlagDependencyUsagePlugin extends builtin_plugin_base.Xj {
40729
40740
  raw(compiler) {
40730
- return createBuiltinPlugin(this.name, this.global);
40741
+ return (0, builtin_plugin_base.no)(this.name, this.global);
40731
40742
  }
40732
40743
  constructor(global){
40733
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";
@@ -40743,16 +40754,16 @@ function HotModuleReplacementPlugin_define_property(obj, key, value) {
40743
40754
  else obj[key] = value;
40744
40755
  return obj;
40745
40756
  }
40746
- class HotModuleReplacementPlugin extends RspackBuiltinPlugin {
40757
+ class HotModuleReplacementPlugin extends builtin_plugin_base.Xj {
40747
40758
  raw(compiler) {
40748
40759
  if (void 0 === compiler.options.output.strictModuleErrorHandling) compiler.options.output.strictModuleErrorHandling = true;
40749
- return createBuiltinPlugin(this.name, void 0);
40760
+ return (0, builtin_plugin_base.no)(this.name, void 0);
40750
40761
  }
40751
40762
  constructor(...args){
40752
40763
  super(...args), HotModuleReplacementPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.HotModuleReplacementPlugin);
40753
40764
  }
40754
40765
  }
40755
- const HttpExternalsRspackPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.HttpExternalsRspackPlugin, (css, webAsync)=>({
40766
+ const HttpExternalsRspackPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.HttpExternalsRspackPlugin, (css, webAsync)=>({
40756
40767
  css,
40757
40768
  webAsync
40758
40769
  }));
@@ -40766,52 +40777,27 @@ function HttpUriPlugin_define_property(obj, key, value) {
40766
40777
  else obj[key] = value;
40767
40778
  return obj;
40768
40779
  }
40769
- const getHttp = memoize(()=>__webpack_require__("../../node_modules/.pnpm/stream-http@3.2.0/node_modules/stream-http/index.js"));
40770
- const getHttps = memoize(()=>__webpack_require__("../../node_modules/.pnpm/https-browserify@1.0.0/node_modules/https-browserify/index.js"));
40771
- function fetch(url, options) {
40772
- const parsedURL = new URL(url);
40773
- const send = "https:" === parsedURL.protocol ? getHttps() : getHttp();
40774
- const { createBrotliDecompress, createGunzip, createInflate } = __webpack_require__("../../node_modules/.pnpm/browserify-zlib@0.2.0/node_modules/browserify-zlib/lib/index.js");
40775
- return new Promise((resolve, reject)=>{
40776
- send.get(url, options, (res)=>{
40777
- const contentEncoding = res.headers["content-encoding"];
40778
- let stream = res;
40779
- if ("gzip" === contentEncoding) stream = stream.pipe(createGunzip());
40780
- else if ("br" === contentEncoding) stream = stream.pipe(createBrotliDecompress());
40781
- else if ("deflate" === contentEncoding) stream = stream.pipe(createInflate());
40782
- const chunks = [];
40783
- stream.on("data", (chunk)=>{
40784
- chunks.push(chunk);
40785
- });
40786
- stream.on("end", ()=>{
40787
- const bodyBuffer = Buffer.concat(chunks);
40788
- if (!res.complete) return void reject(new Error(`${url} request was terminated early`));
40789
- resolve({
40790
- res,
40791
- body: bodyBuffer
40792
- });
40793
- });
40794
- }).on("error", reject);
40795
- });
40796
- }
40797
- const defaultHttpClient = async (url, headers)=>{
40798
- const { res, body } = await fetch(url, {
40780
+ memoize(()=>__webpack_require__("../../node_modules/.pnpm/stream-http@3.2.0/node_modules/stream-http/index.js"));
40781
+ memoize(()=>__webpack_require__("../../node_modules/.pnpm/https-browserify@1.0.0/node_modules/https-browserify/index.js"));
40782
+ const defaultHttpClientForBrowser = async (url, headers)=>{
40783
+ const res = await fetch(url, {
40799
40784
  headers
40800
40785
  });
40801
40786
  const responseHeaders = {};
40802
40787
  for (const [key, value] of Object.entries(res.headers))if (Array.isArray(value)) responseHeaders[key] = value.join(", ");
40803
40788
  else responseHeaders[key] = value;
40804
40789
  return {
40805
- status: res.statusCode,
40790
+ status: res.status,
40806
40791
  headers: responseHeaders,
40807
- body: Buffer.from(body)
40792
+ body: Buffer.from(await res.arrayBuffer())
40808
40793
  };
40809
40794
  };
40810
- class HttpUriPlugin extends RspackBuiltinPlugin {
40795
+ class HttpUriPlugin extends builtin_plugin_base.Xj {
40811
40796
  raw(compiler) {
40812
40797
  const options = this.options;
40813
40798
  const lockfileLocation = options.lockfileLocation ?? path_browserify_default().join(compiler.context, compiler.name ? `${compiler.name}.rspack.lock` : "rspack.lock");
40814
40799
  const cacheLocation = false === options.cacheLocation ? void 0 : options.cacheLocation ?? `${lockfileLocation}.data`;
40800
+ const defaultHttpClient = defaultHttpClientForBrowser;
40815
40801
  const raw = {
40816
40802
  allowedUris: options.allowedUris,
40817
40803
  lockfileLocation,
@@ -40819,7 +40805,7 @@ class HttpUriPlugin extends RspackBuiltinPlugin {
40819
40805
  upgrade: options.upgrade ?? false,
40820
40806
  httpClient: options.httpClient ?? defaultHttpClient
40821
40807
  };
40822
- return createBuiltinPlugin(this.name, raw);
40808
+ return (0, builtin_plugin_base.no)(this.name, raw);
40823
40809
  }
40824
40810
  constructor(options){
40825
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";
@@ -44997,7 +44983,7 @@ const cleanPluginHooks = (compilation)=>{
44997
44983
  };
44998
44984
  var plugin_process = __webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");
44999
44985
  let HTML_PLUGIN_UID = 0;
45000
- const HtmlRspackPluginImpl = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.HtmlRspackPlugin, function(c = {}) {
44986
+ const HtmlRspackPluginImpl = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.HtmlRspackPlugin, function(c = {}) {
45001
44987
  validateHtmlPluginOptions(c);
45002
44988
  const uid = HTML_PLUGIN_UID++;
45003
44989
  const meta = {};
@@ -45073,7 +45059,7 @@ const HtmlRspackPluginImpl = base_create(external_rspack_wasi_browser_js_.Builti
45073
45059
  const templateFilePath = path_browserify_default().resolve(context, filename);
45074
45060
  if (!browser_fs["default"].existsSync(templateFilePath)) throw new Error(`HtmlRspackPlugin: could not load file \`${filename}\` from \`${context}\``);
45075
45061
  try {
45076
- const renderer = await (0, util_require.y)()(templateFilePath);
45062
+ const renderer = this.__internal_browser_require(templateFilePath);
45077
45063
  if (false === c.templateParameters) return await renderer({});
45078
45064
  return await renderer(generateRenderData(data));
45079
45065
  } catch (e) {
@@ -45158,11 +45144,11 @@ HtmlRspackPlugin.createHtmlTagObject = (tagName, attributes, innerHTML)=>({
45158
45144
  });
45159
45145
  HtmlRspackPlugin.getHooks = HtmlRspackPlugin.getCompilationHooks = getPluginHooks;
45160
45146
  HtmlRspackPlugin.version = 5;
45161
- const IgnorePlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.IgnorePlugin, (options)=>{
45147
+ const IgnorePlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.IgnorePlugin, (options)=>{
45162
45148
  validate(options, getIgnorePluginOptionsSchema);
45163
45149
  return options;
45164
45150
  });
45165
- const InferAsyncModulesPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.InferAsyncModulesPlugin, ()=>{}, "compilation");
45151
+ const InferAsyncModulesPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.InferAsyncModulesPlugin, ()=>{}, "compilation");
45166
45152
  function JavascriptModulesPlugin_define_property(obj, key, value) {
45167
45153
  if (key in obj) Object.defineProperty(obj, key, {
45168
45154
  value: value,
@@ -45174,9 +45160,9 @@ function JavascriptModulesPlugin_define_property(obj, key, value) {
45174
45160
  return obj;
45175
45161
  }
45176
45162
  const JavascriptModulesPlugin_compilationHooksMap = new WeakMap();
45177
- class JavascriptModulesPlugin extends RspackBuiltinPlugin {
45163
+ class JavascriptModulesPlugin extends builtin_plugin_base.Xj {
45178
45164
  raw() {
45179
- return createBuiltinPlugin(this.name, void 0);
45165
+ return (0, builtin_plugin_base.no)(this.name, void 0);
45180
45166
  }
45181
45167
  static getCompilationHooks(compilation) {
45182
45168
  checkCompilation(compilation);
@@ -45196,9 +45182,9 @@ class JavascriptModulesPlugin extends RspackBuiltinPlugin {
45196
45182
  super(...args), JavascriptModulesPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.JavascriptModulesPlugin), JavascriptModulesPlugin_define_property(this, "affectedHooks", "compilation");
45197
45183
  }
45198
45184
  }
45199
- const JsLoaderRspackPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.JsLoaderRspackPlugin, (compiler)=>runLoaders.bind(null, compiler), "thisCompilation");
45200
- const JsonModulesPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.JsonModulesPlugin, ()=>{}, "compilation");
45201
- const LibManifestPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.LibManifestPlugin, (options)=>{
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)=>{
45202
45188
  const { context, entryOnly, format, name, path, type } = options;
45203
45189
  return {
45204
45190
  context,
@@ -45209,7 +45195,7 @@ const LibManifestPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPl
45209
45195
  type
45210
45196
  };
45211
45197
  });
45212
- const LightningCssMinimizerRspackPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.LightningCssMinimizerRspackPlugin, (options)=>{
45198
+ const LightningCssMinimizerRspackPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.LightningCssMinimizerRspackPlugin, (options)=>{
45213
45199
  var _options_minimizerOptions, _options_minimizerOptions1, _options_minimizerOptions2;
45214
45200
  const { include, exclude, draft, nonStandard, pseudoClasses, drafts } = (null == options ? void 0 : options.minimizerOptions) ?? {};
45215
45201
  const targets = (null == options ? void 0 : null == (_options_minimizerOptions = options.minimizerOptions) ? void 0 : _options_minimizerOptions.targets) ?? "fully supports es6";
@@ -45239,14 +45225,8 @@ const LightningCssMinimizerRspackPlugin = base_create(external_rspack_wasi_brows
45239
45225
  }
45240
45226
  };
45241
45227
  });
45242
- const LimitChunkCountPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.LimitChunkCountPlugin, (options)=>options);
45243
- const BuiltinLazyCompilationPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.LazyCompilationPlugin, (module, cacheable, entries, imports, test)=>({
45244
- module,
45245
- cacheable,
45246
- imports,
45247
- entries,
45248
- test
45249
- }), "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");
45250
45230
  const LAZY_COMPILATION_PREFIX = "/lazy-compilation-using-";
45251
45231
  const getDefaultClient = (compiler)=>require.resolve(`../hot/lazy-compilation-${compiler.options.externalsPresets.node ? "node" : "web"}.js`);
45252
45232
  const noop = (_req, _res, next)=>{
@@ -45288,9 +45268,8 @@ const lazyCompilationMiddleware = (compiler)=>{
45288
45268
  const prefix = options.prefix || LAZY_COMPILATION_PREFIX;
45289
45269
  options.prefix = `${prefix}__${i++}`;
45290
45270
  const activeModules = new Set();
45291
- const filesByKey = new Map();
45292
- middlewareByCompiler.set(options.prefix, lazyCompilationMiddlewareInternal(compiler, activeModules, filesByKey, options.prefix));
45293
- applyPlugin(c, options, activeModules, filesByKey);
45271
+ middlewareByCompiler.set(options.prefix, lazyCompilationMiddlewareInternal(compiler, activeModules, options.prefix));
45272
+ applyPlugin(c, options, activeModules);
45294
45273
  }
45295
45274
  const keys = [
45296
45275
  ...middlewareByCompiler.keys()
@@ -45311,34 +45290,28 @@ const lazyCompilationMiddleware = (compiler)=>{
45311
45290
  }
45312
45291
  if (!compiler.options.lazyCompilation && !compiler.options.experiments.lazyCompilation) return noop;
45313
45292
  const activeModules = new Set();
45314
- const filesByKey = new Map();
45315
45293
  const options = {
45316
45294
  ...compiler.options.experiments.lazyCompilation,
45317
45295
  ...compiler.options.lazyCompilation
45318
45296
  };
45319
- applyPlugin(compiler, options, activeModules, filesByKey);
45297
+ applyPlugin(compiler, options, activeModules);
45320
45298
  const lazyCompilationPrefix = options.prefix || LAZY_COMPILATION_PREFIX;
45321
- return lazyCompilationMiddlewareInternal(compiler, activeModules, filesByKey, lazyCompilationPrefix);
45299
+ return lazyCompilationMiddlewareInternal(compiler, activeModules, lazyCompilationPrefix);
45322
45300
  };
45323
- function applyPlugin(compiler, options, activeModules, filesByKey) {
45324
- const plugin = new BuiltinLazyCompilationPlugin(({ module, path })=>{
45325
- const data = `${encodeURIComponent(module.replace(/\\/g, "/").replace(/@/g, "_"))}`;
45326
- filesByKey.set(data, path);
45327
- const active = activeModules.has(data);
45328
- return {
45329
- client: `${options.client || getDefaultClient(compiler)}?${encodeURIComponent(getFullServerUrl(options))}`,
45330
- data,
45331
- active
45332
- };
45333
- }, 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);
45334
45307
  plugin.apply(compiler);
45335
45308
  }
45336
- const lazyCompilationMiddlewareInternal = (compiler, activeModules, filesByKey, lazyCompilationPrefix)=>{
45309
+ const lazyCompilationMiddlewareInternal = (compiler, activeModules, lazyCompilationPrefix)=>{
45337
45310
  const logger = compiler.getInfrastructureLogger("LazyCompilation");
45338
45311
  return (req, res, next)=>{
45339
45312
  var _req_url;
45340
45313
  if (!(null == (_req_url = req.url) ? void 0 : _req_url.startsWith(lazyCompilationPrefix))) return null == next ? void 0 : next();
45341
- const modules = req.url.slice(lazyCompilationPrefix.length).split("@");
45314
+ const modules = req.url.slice(lazyCompilationPrefix.length).split("@").map(decodeURIComponent);
45342
45315
  req.socket.setNoDelay(true);
45343
45316
  res.setHeader("content-type", "text/event-stream");
45344
45317
  res.writeHead(200);
@@ -45352,14 +45325,7 @@ const lazyCompilationMiddlewareInternal = (compiler, activeModules, filesByKey,
45352
45325
  moduleActivated.push(key);
45353
45326
  }
45354
45327
  }
45355
- if (moduleActivated.length && compiler.watching) {
45356
- const rebuiltModules = new Set(moduleActivated.map((key)=>{
45357
- const filePath = filesByKey.get(key);
45358
- if (!filePath) logger.warn(`Cannot find correct file path for module ${key}`);
45359
- return filePath;
45360
- }).filter(Boolean));
45361
- if (rebuiltModules.size) compiler.watching.invalidateWithChangesAndRemovals(rebuiltModules);
45362
- }
45328
+ if (moduleActivated.length && compiler.watching) compiler.watching.invalidate();
45363
45329
  };
45364
45330
  };
45365
45331
  function MangleExportsPlugin_define_property(obj, key, value) {
@@ -45372,16 +45338,16 @@ function MangleExportsPlugin_define_property(obj, key, value) {
45372
45338
  else obj[key] = value;
45373
45339
  return obj;
45374
45340
  }
45375
- class MangleExportsPlugin extends RspackBuiltinPlugin {
45341
+ class MangleExportsPlugin extends builtin_plugin_base.Xj {
45376
45342
  raw(compiler) {
45377
- return createBuiltinPlugin(this.name, this.deterministic);
45343
+ return (0, builtin_plugin_base.no)(this.name, this.deterministic);
45378
45344
  }
45379
45345
  constructor(deterministic){
45380
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";
45381
45347
  }
45382
45348
  }
45383
- const MergeDuplicateChunksPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.MergeDuplicateChunksPlugin, ()=>{});
45384
- const ModuleChunkFormatPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.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, ()=>{});
45385
45351
  function ModuleConcatenationPlugin_define_property(obj, key, value) {
45386
45352
  if (key in obj) Object.defineProperty(obj, key, {
45387
45353
  value: value,
@@ -45392,17 +45358,17 @@ function ModuleConcatenationPlugin_define_property(obj, key, value) {
45392
45358
  else obj[key] = value;
45393
45359
  return obj;
45394
45360
  }
45395
- class ModuleConcatenationPlugin extends RspackBuiltinPlugin {
45361
+ class ModuleConcatenationPlugin extends builtin_plugin_base.Xj {
45396
45362
  raw(compiler) {
45397
- return createBuiltinPlugin(this.name, void 0);
45363
+ return (0, builtin_plugin_base.no)(this.name, void 0);
45398
45364
  }
45399
45365
  constructor(...args){
45400
45366
  super(...args), ModuleConcatenationPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.ModuleConcatenationPlugin), ModuleConcatenationPlugin_define_property(this, "affectedHooks", "compilation");
45401
45367
  }
45402
45368
  }
45403
- const ModuleInfoHeaderPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.ModuleInfoHeaderPlugin, (verbose)=>verbose, "compilation");
45404
- const NamedChunkIdsPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.NamedChunkIdsPlugin, ()=>{}, "compilation");
45405
- const NamedModuleIdsPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.NamedModuleIdsPlugin, ()=>{}, "compilation");
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");
45406
45372
  function NaturalChunkIdsPlugin_define_property(obj, key, value) {
45407
45373
  if (key in obj) Object.defineProperty(obj, key, {
45408
45374
  value: value,
@@ -45413,9 +45379,9 @@ function NaturalChunkIdsPlugin_define_property(obj, key, value) {
45413
45379
  else obj[key] = value;
45414
45380
  return obj;
45415
45381
  }
45416
- class NaturalChunkIdsPlugin extends RspackBuiltinPlugin {
45382
+ class NaturalChunkIdsPlugin extends builtin_plugin_base.Xj {
45417
45383
  raw(compiler) {
45418
- return createBuiltinPlugin(this.name, void 0);
45384
+ return (0, builtin_plugin_base.no)(this.name, void 0);
45419
45385
  }
45420
45386
  constructor(...args){
45421
45387
  super(...args), NaturalChunkIdsPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.NaturalChunkIdsPlugin), NaturalChunkIdsPlugin_define_property(this, "affectedHooks", "compilation");
@@ -45431,27 +45397,27 @@ function NaturalModuleIdsPlugin_define_property(obj, key, value) {
45431
45397
  else obj[key] = value;
45432
45398
  return obj;
45433
45399
  }
45434
- class NaturalModuleIdsPlugin extends RspackBuiltinPlugin {
45400
+ class NaturalModuleIdsPlugin extends builtin_plugin_base.Xj {
45435
45401
  raw(compiler) {
45436
- return createBuiltinPlugin(this.name, void 0);
45402
+ return (0, builtin_plugin_base.no)(this.name, void 0);
45437
45403
  }
45438
45404
  constructor(...args){
45439
45405
  super(...args), NaturalModuleIdsPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.NaturalModuleIdsPlugin), NaturalModuleIdsPlugin_define_property(this, "affectedHooks", "compilation");
45440
45406
  }
45441
45407
  }
45442
- const NodeTargetPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.NodeTargetPlugin, ()=>void 0);
45443
- const NoEmitOnErrorsPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.NoEmitOnErrorsPlugin, ()=>void 0);
45444
- const NormalModuleReplacementPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.NormalModuleReplacementPlugin, (resourceRegExp, newResource)=>({
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)=>({
45445
45411
  resourceRegExp,
45446
45412
  newResource: "function" == typeof newResource ? (data)=>{
45447
45413
  newResource(data);
45448
45414
  return data;
45449
45415
  } : newResource
45450
45416
  }));
45451
- const OccurrenceChunkIdsPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.OccurrenceChunkIdsPlugin, (options)=>({
45417
+ const OccurrenceChunkIdsPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.OccurrenceChunkIdsPlugin, (options)=>({
45452
45418
  ...options
45453
45419
  }), "compilation");
45454
- const ProgressPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.ProgressPlugin, (progress = {})=>{
45420
+ const ProgressPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.ProgressPlugin, (progress = {})=>{
45455
45421
  if ("function" == typeof progress) return {
45456
45422
  handler: (percentage, msg, items)=>{
45457
45423
  progress(percentage, msg, ...items);
@@ -45459,7 +45425,7 @@ const ProgressPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPlugi
45459
45425
  };
45460
45426
  return progress;
45461
45427
  });
45462
- const ProvidePlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.ProvidePlugin, (provide)=>{
45428
+ const ProvidePlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.ProvidePlugin, (provide)=>{
45463
45429
  const entries = Object.entries(provide).map(([key, value])=>{
45464
45430
  if ("string" == typeof value) value = [
45465
45431
  value
@@ -45471,10 +45437,10 @@ const ProvidePlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPlugin
45471
45437
  });
45472
45438
  return Object.fromEntries(entries);
45473
45439
  }, "compilation");
45474
- const RealContentHashPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.RealContentHashPlugin, ()=>{}, "compilation");
45475
- const RemoveDuplicateModulesPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.RemoveDuplicateModulesPlugin, ()=>({}));
45476
- const RemoveEmptyChunksPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.RemoveEmptyChunksPlugin, ()=>{}, "compilation");
45477
- const RsdoctorPluginImpl = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.RsdoctorPlugin, function(c = {
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 = {
45478
45444
  moduleGraphFeatures: true,
45479
45445
  chunkGraphFeatures: true
45480
45446
  }) {
@@ -45549,10 +45515,10 @@ const createRsdoctorPluginHooksRegisters = (getCompiler, createTap, createMapTap
45549
45515
  };
45550
45516
  })
45551
45517
  });
45552
- const RslibPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.RslibPlugin, (rslib)=>rslib);
45553
- const RstestPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.RstestPlugin, (rstest)=>rstest);
45554
- const RuntimeChunkPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.RuntimeChunkPlugin, (options)=>options, "thisCompilation");
45555
- const RuntimePluginImpl = base_create(external_rspack_wasi_browser_js_["default"].BuiltinPluginName.RuntimePlugin, ()=>{}, "compilation");
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");
45556
45522
  const RuntimePlugin = RuntimePluginImpl;
45557
45523
  const RuntimePlugin_compilationHooksMap = new WeakMap();
45558
45524
  RuntimePlugin.getHooks = RuntimePlugin.getCompilationHooks = (compilation)=>{
@@ -45600,15 +45566,15 @@ const createRuntimePluginHooksRegisters = (getCompiler, createTap, createMapTap)
45600
45566
  };
45601
45567
  })
45602
45568
  });
45603
- const SideEffectsFlagPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.SideEffectsFlagPlugin, ()=>{}, "compilation");
45604
- const SizeLimitsPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.SizeLimitsPlugin, (options)=>{
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)=>{
45605
45571
  const hints = false === options.hints ? void 0 : options.hints;
45606
45572
  return {
45607
45573
  ...options,
45608
45574
  hints
45609
45575
  };
45610
45576
  });
45611
- const SourceMapDevToolPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.SourceMapDevToolPlugin, (options)=>options, "compilation");
45577
+ const SourceMapDevToolPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.SourceMapDevToolPlugin, (options)=>options, "compilation");
45612
45578
  class JsSplitChunkSizes {
45613
45579
  static __to_binding(sizes) {
45614
45580
  if ("number" == typeof sizes) return sizes;
@@ -45631,11 +45597,11 @@ function SplitChunksPlugin_define_property(obj, key, value) {
45631
45597
  else obj[key] = value;
45632
45598
  return obj;
45633
45599
  }
45634
- class SplitChunksPlugin extends RspackBuiltinPlugin {
45600
+ class SplitChunksPlugin extends builtin_plugin_base.Xj {
45635
45601
  raw(compiler) {
45636
45602
  const rawOptions = toRawSplitChunksOptions(this.options, compiler);
45637
45603
  assert_default()(void 0 !== rawOptions);
45638
- return createBuiltinPlugin(this.name, rawOptions);
45604
+ return (0, builtin_plugin_base.no)(this.name, rawOptions);
45639
45605
  }
45640
45606
  constructor(options){
45641
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";
@@ -45712,7 +45678,7 @@ function SubresourceIntegrityPlugin_define_property(obj, key, value) {
45712
45678
  }
45713
45679
  const SubresourceIntegrityPlugin_PLUGIN_NAME = "SubresourceIntegrityPlugin";
45714
45680
  const NATIVE_HTML_PLUGIN = "HtmlRspackPlugin";
45715
- const NativeSubresourceIntegrityPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.SubresourceIntegrityPlugin, function(options) {
45681
+ const NativeSubresourceIntegrityPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.SubresourceIntegrityPlugin, function(options) {
45716
45682
  let htmlPlugin = "Disabled";
45717
45683
  if (options.htmlPlugin === NATIVE_HTML_PLUGIN) htmlPlugin = "Native";
45718
45684
  else if ("string" == typeof options.htmlPlugin) htmlPlugin = "JavaScript";
@@ -45798,9 +45764,12 @@ class SubresourceIntegrityPlugin extends NativeSubresourceIntegrityPlugin {
45798
45764
  });
45799
45765
  });
45800
45766
  }
45801
- (0, util_require.y)()(this.options.htmlPlugin).then(bindingHtmlHooks).catch((e)=>{
45767
+ try {
45768
+ const htmlPlugin = compiler.__internal_browser_require(this.options.htmlPlugin);
45769
+ bindingHtmlHooks(htmlPlugin);
45770
+ } catch (e) {
45802
45771
  if (!isErrorWithCode(e) || "MODULE_NOT_FOUND" !== e.code) throw e;
45803
- });
45772
+ }
45804
45773
  }
45805
45774
  }
45806
45775
  constructor(options = {}){
@@ -45895,7 +45864,7 @@ function getRawExtractCommentsOptions(extractComments) {
45895
45864
  return res;
45896
45865
  }
45897
45866
  }
45898
- const SwcJsMinimizerRspackPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.SwcJsMinimizerRspackPlugin, (options)=>{
45867
+ const SwcJsMinimizerRspackPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.SwcJsMinimizerRspackPlugin, (options)=>{
45899
45868
  var _options_minimizerOptions, _options_minimizerOptions1, _options_minimizerOptions2, _options_minimizerOptions3, _options_minimizerOptions4, _options_minimizerOptions5;
45900
45869
  let compress = (null == options ? void 0 : null == (_options_minimizerOptions = options.minimizerOptions) ? void 0 : _options_minimizerOptions.compress) ?? true;
45901
45870
  const mangle = (null == options ? void 0 : null == (_options_minimizerOptions1 = options.minimizerOptions) ? void 0 : _options_minimizerOptions1.mangle) ?? true;
@@ -45926,7 +45895,7 @@ const SwcJsMinimizerRspackPlugin = base_create(external_rspack_wasi_browser_js_.
45926
45895
  }
45927
45896
  };
45928
45897
  }, "compilation");
45929
- const WarnCaseSensitiveModulesPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.WarnCaseSensitiveModulesPlugin, ()=>{}, "compilation");
45898
+ const WarnCaseSensitiveModulesPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.WarnCaseSensitiveModulesPlugin, ()=>{}, "compilation");
45930
45899
  function WebWorkerTemplatePlugin_define_property(obj, key, value) {
45931
45900
  if (key in obj) Object.defineProperty(obj, key, {
45932
45901
  value: value,
@@ -45937,10 +45906,10 @@ function WebWorkerTemplatePlugin_define_property(obj, key, value) {
45937
45906
  else obj[key] = value;
45938
45907
  return obj;
45939
45908
  }
45940
- class WebWorkerTemplatePlugin extends RspackBuiltinPlugin {
45909
+ class WebWorkerTemplatePlugin extends builtin_plugin_base.Xj {
45941
45910
  raw(compiler) {
45942
45911
  compiler.options.output.chunkLoading = "import-scripts";
45943
- return createBuiltinPlugin(this.name, void 0);
45912
+ return (0, builtin_plugin_base.no)(this.name, void 0);
45944
45913
  }
45945
45914
  constructor(...args){
45946
45915
  super(...args), WebWorkerTemplatePlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.WebWorkerTemplatePlugin);
@@ -45956,11 +45925,11 @@ function WorkerPlugin_define_property(obj, key, value) {
45956
45925
  else obj[key] = value;
45957
45926
  return obj;
45958
45927
  }
45959
- class WorkerPlugin extends RspackBuiltinPlugin {
45928
+ class WorkerPlugin extends builtin_plugin_base.Xj {
45960
45929
  raw(compiler) {
45961
45930
  if (this.chunkLoading) new EnableChunkLoadingPlugin(this.chunkLoading).apply(compiler);
45962
45931
  if (this.wasmLoading) new EnableWasmLoadingPlugin(this.wasmLoading).apply(compiler);
45963
- return createBuiltinPlugin(this.name, void 0);
45932
+ return (0, builtin_plugin_base.no)(this.name, void 0);
45964
45933
  }
45965
45934
  constructor(chunkLoading, wasmLoading, module, workerPublicPath){
45966
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;
@@ -47102,7 +47071,7 @@ const applybundlerInfoDefaults = (rspackFuture, library)=>{
47102
47071
  if ("object" == typeof rspackFuture) {
47103
47072
  D(rspackFuture, "bundlerInfo", {});
47104
47073
  if ("object" == typeof rspackFuture.bundlerInfo) {
47105
- D(rspackFuture.bundlerInfo, "version", "1.5.0-canary-e5e47098-20250820070851");
47074
+ D(rspackFuture.bundlerInfo, "version", "1.5.1-canary-7c68c987-20250828115508");
47106
47075
  D(rspackFuture.bundlerInfo, "bundler", "rspack");
47107
47076
  D(rspackFuture.bundlerInfo, "force", !library);
47108
47077
  }
@@ -49971,7 +49940,7 @@ const toJsWatcherIgnored = (ignored)=>{
49971
49940
  if (Array.isArray(ignored) || "string" == typeof ignored || ignored instanceof RegExp) return ignored;
49972
49941
  if ("function" == typeof ignored) throw new Error("NativeWatcher does not support using a function for the 'ignored' option");
49973
49942
  };
49974
- var NativeWatchFileSystem_inner = /*#__PURE__*/ new WeakMap(), _inputFileSystem = /*#__PURE__*/ new WeakMap();
49943
+ var NativeWatchFileSystem_inner = /*#__PURE__*/ new WeakMap(), _isFirstWatch = /*#__PURE__*/ new WeakMap(), _inputFileSystem = /*#__PURE__*/ new WeakMap();
49975
49944
  class NativeWatchFileSystem {
49976
49945
  watch(files, directories, missing, _startTime, options, callback, callbackUndelayed) {
49977
49946
  if ((!files.added || "function" != typeof files.added[Symbol.iterator]) && (!files.removed || "function" != typeof files.removed[Symbol.iterator])) throw new Error("Invalid arguments: 'files'");
@@ -49980,16 +49949,7 @@ class NativeWatchFileSystem {
49980
49949
  if ("object" != typeof options) throw new Error("Invalid arguments: 'options'");
49981
49950
  if ("function" != typeof callbackUndelayed && callbackUndelayed) throw new Error("Invalid arguments: 'callbackUndelayed'");
49982
49951
  const nativeWatcher = this.getNativeWatcher(options);
49983
- nativeWatcher.watch([
49984
- Array.from(files.added),
49985
- Array.from(files.removed)
49986
- ], [
49987
- Array.from(directories.added),
49988
- Array.from(directories.removed)
49989
- ], [
49990
- Array.from(missing.added),
49991
- Array.from(missing.removed)
49992
- ], (err, result)=>{
49952
+ nativeWatcher.watch(this.formatWatchDependencies(files), this.formatWatchDependencies(directories), this.formatWatchDependencies(missing), (err, result)=>{
49993
49953
  var _class_private_field_get1;
49994
49954
  if (err) return void callback(err, new Map(), new Map(), new Set(), new Set());
49995
49955
  nativeWatcher.pause();
@@ -50010,6 +49970,7 @@ class NativeWatchFileSystem {
50010
49970
  }, (fileName)=>{
50011
49971
  callbackUndelayed(fileName, Date.now());
50012
49972
  });
49973
+ NativeWatchFileSystem_class_private_field_set(this, _isFirstWatch, false);
50013
49974
  return {
50014
49975
  close: ()=>{
50015
49976
  nativeWatcher.close().then(()=>{
@@ -50047,11 +50008,25 @@ class NativeWatchFileSystem {
50047
50008
  var _class_private_field_get1;
50048
50009
  null == (_class_private_field_get1 = NativeWatchFileSystem_class_private_field_get(this, NativeWatchFileSystem_inner)) || _class_private_field_get1.triggerEvent(kind, path);
50049
50010
  }
50011
+ formatWatchDependencies(dependencies) {
50012
+ if (NativeWatchFileSystem_class_private_field_get(this, _isFirstWatch)) return [
50013
+ Array.from(dependencies),
50014
+ []
50015
+ ];
50016
+ return [
50017
+ Array.from(dependencies.added ?? []),
50018
+ Array.from(dependencies.removed ?? [])
50019
+ ];
50020
+ }
50050
50021
  constructor(inputFileSystem){
50051
50022
  NativeWatchFileSystem_class_private_field_init(this, NativeWatchFileSystem_inner, {
50052
50023
  writable: true,
50053
50024
  value: void 0
50054
50025
  });
50026
+ NativeWatchFileSystem_class_private_field_init(this, _isFirstWatch, {
50027
+ writable: true,
50028
+ value: true
50029
+ });
50055
50030
  NativeWatchFileSystem_class_private_field_init(this, _inputFileSystem, {
50056
50031
  writable: true,
50057
50032
  value: void 0
@@ -50724,7 +50699,7 @@ class Compiler {
50724
50699
  ]);
50725
50700
  for(const hookName in this.hooks){
50726
50701
  const name = hookName;
50727
- if (canInherentFromParent(name)) {
50702
+ if ((0, builtin_plugin_base.Gp)(name)) {
50728
50703
  if (childCompiler.hooks[name]) childCompiler.hooks[name].taps = this.hooks[name].taps.slice();
50729
50704
  }
50730
50705
  }
@@ -50881,6 +50856,7 @@ class Compiler {
50881
50856
  Compiler_define_property(this, "cache", void 0);
50882
50857
  Compiler_define_property(this, "compilerPath", void 0);
50883
50858
  Compiler_define_property(this, "options", void 0);
50859
+ Compiler_define_property(this, "__internal_browser_require", void 0);
50884
50860
  Compiler_class_private_field_set(this, Compiler_initial, true);
50885
50861
  Compiler_class_private_field_set(this, _builtinPlugins, []);
50886
50862
  Compiler_class_private_field_set(this, _nonSkippableRegisters, []);
@@ -50989,6 +50965,9 @@ class Compiler {
50989
50965
  this.running = false;
50990
50966
  this.idle = false;
50991
50967
  this.watchMode = false;
50968
+ this.__internal_browser_require = ()=>{
50969
+ throw new Error("Cannot execute user defined code in browser without `BrowserRequirePlugin`");
50970
+ };
50992
50971
  this.resolverFactory = new ResolverFactory(options.resolve.pnp ?? getPnpDefault(), options.resolve, options.resolveLoader);
50993
50972
  new JsLoaderRspackPlugin(this).apply(this);
50994
50973
  new ExecuteModulePlugin().apply(this);
@@ -51187,7 +51166,7 @@ class MultiStats {
51187
51166
  return obj;
51188
51167
  });
51189
51168
  if (childOptions.version) {
51190
- obj.rspackVersion = "1.5.0-canary-e5e47098-20250820070851";
51169
+ obj.rspackVersion = "1.5.1-canary-7c68c987-20250828115508";
51191
51170
  obj.version = "5.75.0";
51192
51171
  }
51193
51172
  if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join("");
@@ -51307,7 +51286,7 @@ function MultiWatching_define_property(obj, key, value) {
51307
51286
  else obj[key] = value;
51308
51287
  return obj;
51309
51288
  }
51310
- class MultiWatching_MultiWatching {
51289
+ class MultiWatching {
51311
51290
  invalidate(callback) {
51312
51291
  if (callback) asyncLib.each(this.watchings, (watching, callback)=>watching.invalidate(callback), callback);
51313
51292
  else for (const watching of this.watchings)watching.invalidate();
@@ -51340,7 +51319,7 @@ class MultiWatching_MultiWatching {
51340
51319
  this.compiler = compiler;
51341
51320
  }
51342
51321
  }
51343
- const MultiWatching = MultiWatching_MultiWatching;
51322
+ const src_MultiWatching = MultiWatching;
51344
51323
  function ArrayQueue_define_property(obj, key, value) {
51345
51324
  if (key in obj) Object.defineProperty(obj, key, {
51346
51325
  value: value,
@@ -51517,10 +51496,10 @@ class MultiCompiler {
51517
51496
  if (compiler.watching !== watching) return;
51518
51497
  if (!watching.running) watching.invalidate();
51519
51498
  }, handler);
51520
- this.watching = new MultiWatching(watchings, this);
51499
+ this.watching = new src_MultiWatching(watchings, this);
51521
51500
  return this.watching;
51522
51501
  }
51523
- this.watching = new MultiWatching([], this);
51502
+ this.watching = new src_MultiWatching([], this);
51524
51503
  return this.watching;
51525
51504
  }
51526
51505
  run(callback, options) {
@@ -52497,7 +52476,7 @@ const SIMPLE_EXTRACTORS = {
52497
52476
  },
52498
52477
  version: (object)=>{
52499
52478
  object.version = "5.75.0";
52500
- object.rspackVersion = "1.5.0-canary-e5e47098-20250820070851";
52479
+ object.rspackVersion = "1.5.1-canary-7c68c987-20250828115508";
52501
52480
  },
52502
52481
  env: (object, _compilation, _context, { _env })=>{
52503
52482
  object.env = _env;
@@ -54337,7 +54316,7 @@ const matchObject = (obj, str)=>{
54337
54316
  }
54338
54317
  return true;
54339
54318
  };
54340
- const FlagAllModulesAsUsedPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.FlagAllModulesAsUsedPlugin, (explanation)=>({
54319
+ const FlagAllModulesAsUsedPlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.FlagAllModulesAsUsedPlugin, (explanation)=>({
54341
54320
  explanation
54342
54321
  }));
54343
54322
  function DllPlugin_define_property(obj, key, value) {
@@ -55217,6 +55196,7 @@ const getZodSwcLoaderOptionsSchema = memoize(()=>{
55217
55196
  "2022-03"
55218
55197
  ]),
55219
55198
  treatConstEnumAsEnum: schemas_boolean(),
55199
+ tsEnumIsMutable: schemas_boolean(),
55220
55200
  useDefineForClassFields: schemas_boolean(),
55221
55201
  verbatimModuleSyntax: schemas_boolean()
55222
55202
  }).partial();
@@ -56411,7 +56391,7 @@ const getRspackOptionsSchema = memoize(()=>{
56411
56391
  }).partial().check(externalUmdChecker);
56412
56392
  return rspackOptions;
56413
56393
  });
56414
- const ModuleFederationRuntimePlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.ModuleFederationRuntimePlugin, (options = {})=>options);
56394
+ const ModuleFederationRuntimePlugin = (0, builtin_plugin_base.vt)(external_rspack_wasi_browser_js_.BuiltinPluginName.ModuleFederationRuntimePlugin, (options = {})=>options);
56415
56395
  const options_process = (options, normalizeSimple, normalizeOptions, fn)=>{
56416
56396
  const array = (items)=>{
56417
56397
  for (const item of items)if ("string" == typeof item) fn(item, normalizeSimple(item, item));
@@ -56570,11 +56550,7 @@ function getDefaultEntryRuntime(paths, options, compiler) {
56570
56550
  `const __module_federation_remote_infos__ = ${JSON.stringify(remoteInfos)}`,
56571
56551
  `const __module_federation_container_name__ = ${JSON.stringify(options.name ?? compiler.options.output.uniqueName)}`,
56572
56552
  `const __module_federation_share_strategy__ = ${JSON.stringify(options.shareStrategy ?? "version-first")}`,
56573
- compiler.webpack.Template.getFunctionContent(__webpack_require__(Object(function() {
56574
- var e = new Error("Cannot find module './moduleFederationDefaultRuntime.js'");
56575
- e.code = 'MODULE_NOT_FOUND';
56576
- throw e;
56577
- }())))
56553
+ compiler.webpack.Template.getFunctionContent(compiler.__internal_browser_require("@rspack/browser/moduleFederationDefaultRuntime.js"))
56578
56554
  ].join(";");
56579
56555
  return `@module-federation/runtime/rspack.js!=!data:text/javascript,${content}`;
56580
56556
  }
@@ -56595,11 +56571,11 @@ function isSingleton(compiler) {
56595
56571
  function setSingleton(compiler) {
56596
56572
  compilerSet.add(compiler);
56597
56573
  }
56598
- class ShareRuntimePlugin extends RspackBuiltinPlugin {
56574
+ class ShareRuntimePlugin extends builtin_plugin_base.Xj {
56599
56575
  raw(compiler) {
56600
56576
  if (isSingleton(compiler)) return;
56601
56577
  setSingleton(compiler);
56602
- return createBuiltinPlugin(this.name, this.enhanced);
56578
+ return (0, builtin_plugin_base.no)(this.name, this.enhanced);
56603
56579
  }
56604
56580
  constructor(enhanced = false){
56605
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;
@@ -56619,7 +56595,7 @@ function ConsumeSharedPlugin_define_property(obj, key, value) {
56619
56595
  else obj[key] = value;
56620
56596
  return obj;
56621
56597
  }
56622
- class ConsumeSharedPlugin extends RspackBuiltinPlugin {
56598
+ class ConsumeSharedPlugin extends builtin_plugin_base.Xj {
56623
56599
  raw(compiler) {
56624
56600
  new ShareRuntimePlugin(this._options.enhanced).apply(compiler);
56625
56601
  const rawOptions = {
@@ -56629,7 +56605,7 @@ class ConsumeSharedPlugin extends RspackBuiltinPlugin {
56629
56605
  })),
56630
56606
  enhanced: this._options.enhanced
56631
56607
  };
56632
- return createBuiltinPlugin(this.name, rawOptions);
56608
+ return (0, builtin_plugin_base.no)(this.name, rawOptions);
56633
56609
  }
56634
56610
  constructor(options){
56635
56611
  super(), ConsumeSharedPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.ConsumeSharedPlugin), ConsumeSharedPlugin_define_property(this, "_options", void 0);
@@ -56680,14 +56656,14 @@ function ProvideSharedPlugin_define_property(obj, key, value) {
56680
56656
  else obj[key] = value;
56681
56657
  return obj;
56682
56658
  }
56683
- class ProvideSharedPlugin extends RspackBuiltinPlugin {
56659
+ class ProvideSharedPlugin extends builtin_plugin_base.Xj {
56684
56660
  raw(compiler) {
56685
56661
  new ShareRuntimePlugin(this._enhanced ?? false).apply(compiler);
56686
56662
  const rawOptions = this._provides.map(([key, v])=>({
56687
56663
  key,
56688
56664
  ...v
56689
56665
  }));
56690
- return createBuiltinPlugin(this.name, rawOptions);
56666
+ return (0, builtin_plugin_base.no)(this.name, rawOptions);
56691
56667
  }
56692
56668
  constructor(options){
56693
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);
@@ -56797,7 +56773,7 @@ function ContainerPlugin_define_property(obj, key, value) {
56797
56773
  else obj[key] = value;
56798
56774
  return obj;
56799
56775
  }
56800
- class ContainerPlugin extends RspackBuiltinPlugin {
56776
+ class ContainerPlugin extends builtin_plugin_base.Xj {
56801
56777
  raw(compiler) {
56802
56778
  const { name, shareScope, library, runtime, filename, exposes, enhanced } = this._options;
56803
56779
  if (!compiler.options.output.enabledLibraryTypes.includes(library.type)) compiler.options.output.enabledLibraryTypes.push(library.type);
@@ -56814,7 +56790,7 @@ class ContainerPlugin extends RspackBuiltinPlugin {
56814
56790
  })),
56815
56791
  enhanced
56816
56792
  };
56817
- return createBuiltinPlugin(this.name, rawOptions);
56793
+ return (0, builtin_plugin_base.no)(this.name, rawOptions);
56818
56794
  }
56819
56795
  constructor(options){
56820
56796
  super(), ContainerPlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.ContainerPlugin), ContainerPlugin_define_property(this, "_options", void 0);
@@ -56852,7 +56828,7 @@ function ContainerReferencePlugin_define_property(obj, key, value) {
56852
56828
  else obj[key] = value;
56853
56829
  return obj;
56854
56830
  }
56855
- class ContainerReferencePlugin extends RspackBuiltinPlugin {
56831
+ class ContainerReferencePlugin extends builtin_plugin_base.Xj {
56856
56832
  raw(compiler) {
56857
56833
  const { remoteType, remotes } = this._options;
56858
56834
  const remoteExternals = {};
@@ -56873,7 +56849,7 @@ class ContainerReferencePlugin extends RspackBuiltinPlugin {
56873
56849
  })),
56874
56850
  enhanced: this._options.enhanced
56875
56851
  };
56876
- return createBuiltinPlugin(this.name, rawOptions);
56852
+ return (0, builtin_plugin_base.no)(this.name, rawOptions);
56877
56853
  }
56878
56854
  constructor(options){
56879
56855
  super(), ContainerReferencePlugin_define_property(this, "name", external_rspack_wasi_browser_js_.BuiltinPluginName.ContainerReferencePlugin), ContainerReferencePlugin_define_property(this, "_options", void 0);
@@ -56959,7 +56935,7 @@ function transformSync(source, options) {
56959
56935
  const _options = JSON.stringify(options || {});
56960
56936
  return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
56961
56937
  }
56962
- const exports_rspackVersion = "1.5.0-canary-e5e47098-20250820070851";
56938
+ const exports_rspackVersion = "1.5.1-canary-7c68c987-20250828115508";
56963
56939
  const exports_version = "5.75.0";
56964
56940
  const exports_WebpackError = Error;
56965
56941
  const sources = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.3_patch_hash=b2a26650f08a2359d0a3cd81fa6fa272aa7441a28dd7e601792da5ed5d2b4aee/node_modules/webpack-sources/lib/index.js");
@@ -57045,7 +57021,7 @@ const exports_experiments = {
57045
57021
  sync: external_rspack_wasi_browser_js_.sync
57046
57022
  },
57047
57023
  CssChunkingPlugin: CssChunkingPlugin,
57048
- createNativePlugin: createNativePlugin,
57024
+ createNativePlugin: builtin_plugin_base.dE,
57049
57025
  VirtualModulesPlugin: VirtualModulesPlugin
57050
57026
  };
57051
57027
  var rspack_process = __webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");
@@ -57130,6 +57106,151 @@ const src_fn = Object.assign(rspack_rspack, exports_namespaceObject);
57130
57106
  src_fn.rspack = src_fn;
57131
57107
  src_fn.webpack = src_fn;
57132
57108
  const src_rspack = src_fn;
57109
+ function BrowserHttpImportEsmPlugin_define_property(obj, key, value) {
57110
+ if (key in obj) Object.defineProperty(obj, key, {
57111
+ value: value,
57112
+ enumerable: true,
57113
+ configurable: true,
57114
+ writable: true
57115
+ });
57116
+ else obj[key] = value;
57117
+ return obj;
57118
+ }
57119
+ class BrowserHttpImportEsmPlugin {
57120
+ apply(compiler) {
57121
+ compiler.hooks.normalModuleFactory.tap("BrowserHttpImportPlugin", (nmf)=>{
57122
+ nmf.hooks.resolve.tap("BrowserHttpImportPlugin", (resolveData)=>{
57123
+ const request = resolveData.request;
57124
+ const packageName = getPackageName(request);
57125
+ if (request.includes("!")) return;
57126
+ if (this.options.dependencyUrl) {
57127
+ if ("function" == typeof this.options.dependencyUrl) {
57128
+ const url = this.options.dependencyUrl(packageName);
57129
+ if (url) {
57130
+ resolveData.request = url;
57131
+ return;
57132
+ }
57133
+ } else if ("object" == typeof this.options.dependencyUrl) {
57134
+ const url = this.options.dependencyUrl[packageName];
57135
+ if (url) {
57136
+ resolveData.request = url;
57137
+ return;
57138
+ }
57139
+ }
57140
+ }
57141
+ const issuerUrl = toHttpUrl(resolveData.contextInfo.issuer);
57142
+ if (issuerUrl) {
57143
+ resolveData.request = this.resolveWithUrlIssuer(request, issuerUrl);
57144
+ return;
57145
+ }
57146
+ if (this.isNodeModule(request)) {
57147
+ resolveData.request = this.resolveNodeModule(request, packageName);
57148
+ return;
57149
+ }
57150
+ });
57151
+ });
57152
+ }
57153
+ resolveWithUrlIssuer(request, issuer) {
57154
+ return new URL(request, issuer).href;
57155
+ }
57156
+ resolveNodeModule(request, packageName) {
57157
+ var _this_options_dependencyVersions;
57158
+ let domain = "";
57159
+ if ("function" == typeof this.options.domain) domain = this.options.domain(request, packageName);
57160
+ else if ("string" == typeof this.options.domain) domain = this.options.domain;
57161
+ const version = (null == (_this_options_dependencyVersions = this.options.dependencyVersions) ? void 0 : _this_options_dependencyVersions[packageName]) || "latest";
57162
+ const versionedRequest = getRequestWithVersion(request, version);
57163
+ return `${domain}/${versionedRequest}`;
57164
+ }
57165
+ isNodeModule(request) {
57166
+ if (toHttpUrl(request)) return false;
57167
+ return !request.startsWith(".") && !request.startsWith("/") && !request.startsWith("!");
57168
+ }
57169
+ constructor(options){
57170
+ BrowserHttpImportEsmPlugin_define_property(this, "options", void 0);
57171
+ this.options = options;
57172
+ }
57173
+ }
57174
+ function getPackageName(request) {
57175
+ if (request.startsWith("@")) {
57176
+ const parts = request.split("/");
57177
+ return `${parts[0]}/${parts[1]}`;
57178
+ }
57179
+ return request.split("/")[0];
57180
+ }
57181
+ function getRequestWithVersion(request, version) {
57182
+ if (request.startsWith("@")) {
57183
+ const secondSlashIndex = request.indexOf("/", request.indexOf("/") + 1);
57184
+ if (-1 === secondSlashIndex) return `${request}@${version}`;
57185
+ {
57186
+ const scopedPackage = request.substring(0, secondSlashIndex);
57187
+ const restPath = request.substring(secondSlashIndex);
57188
+ return `${scopedPackage}@${version}${restPath}`;
57189
+ }
57190
+ }
57191
+ {
57192
+ const firstSlashIndex = request.indexOf("/");
57193
+ if (-1 === firstSlashIndex) return `${request}@${version}`;
57194
+ {
57195
+ const packageName = request.substring(0, firstSlashIndex);
57196
+ const restPath = request.substring(firstSlashIndex);
57197
+ return `${packageName}@${version}${restPath}`;
57198
+ }
57199
+ }
57200
+ }
57201
+ function toHttpUrl(request) {
57202
+ try {
57203
+ const url = new URL(request);
57204
+ if ("http:" === url.protocol || "https:" === url.protocol) return url;
57205
+ } catch {
57206
+ return;
57207
+ }
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);
57133
57254
  const builtinMemFs = {
57134
57255
  fs: browser_fs.fs,
57135
57256
  volume: browser_fs.volume
@@ -57142,4 +57263,4 @@ var __webpack_exports__EntryDependency = external_rspack_wasi_browser_js_.EntryD
57142
57263
  var __webpack_exports__ExternalModule = external_rspack_wasi_browser_js_.ExternalModule;
57143
57264
  var __webpack_exports__Module = external_rspack_wasi_browser_js_.Module;
57144
57265
  var __webpack_exports__NormalModule = external_rspack_wasi_browser_js_.NormalModule;
57145
- export { BannerPlugin, 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 };
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 };