@rspack-canary/browser 1.4.12-canary-40c41ca5-20250806090917 → 1.4.12-canary-1a94ade3-20250814141828

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.
Files changed (139) hide show
  1. package/dist/BuildInfo.d.ts +3 -3
  2. package/dist/Chunk.d.ts +3 -3
  3. package/dist/ChunkGraph.d.ts +2 -2
  4. package/dist/Chunks.d.ts +2 -2
  5. package/dist/Compilation.d.ts +5 -5
  6. package/dist/Compiler.d.ts +6 -1
  7. package/dist/ConcatenatedModule.d.ts +1 -1
  8. package/dist/ContextModule.d.ts +1 -1
  9. package/dist/Diagnostics.d.ts +1 -1
  10. package/dist/Entrypoint.d.ts +1 -1
  11. package/dist/ExportsInfo.d.ts +1 -1
  12. package/dist/ExternalModule.d.ts +1 -1
  13. package/dist/FileSystem.d.ts +1 -1
  14. package/dist/Module.d.ts +6 -17
  15. package/dist/ModuleGraph.d.ts +1 -1
  16. package/dist/NativeWatchFileSystem.d.ts +2 -1
  17. package/dist/NormalModule.d.ts +2 -2
  18. package/dist/NormalModuleFactory.d.ts +1 -1
  19. package/dist/Resolver.d.ts +1 -1
  20. package/dist/ResolverFactory.d.ts +1 -1
  21. package/dist/RspackError.d.ts +2 -2
  22. package/dist/RuntimeGlobals.d.ts +1 -1
  23. package/dist/RuntimeModule.d.ts +1 -1
  24. package/dist/VirtualModulesPlugin.d.ts +12 -0
  25. package/dist/binding.d.ts +8 -0
  26. package/dist/browser/fs.d.ts +6 -6
  27. package/dist/builtin-plugin/APIPlugin.d.ts +1 -1
  28. package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -1
  29. package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -1
  30. package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -1
  31. package/dist/builtin-plugin/BannerPlugin.d.ts +2 -2
  32. package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -1
  33. package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -1
  34. package/dist/builtin-plugin/CircularDependencyRspackPlugin.d.ts +1 -1
  35. package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -1
  36. package/dist/builtin-plugin/ContextReplacementPlugin.d.ts +1 -1
  37. package/dist/builtin-plugin/CopyRspackPlugin.d.ts +2 -2
  38. package/dist/builtin-plugin/CssChunkingPlugin.d.ts +1 -1
  39. package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -1
  40. package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -1
  41. package/dist/builtin-plugin/DefinePlugin.d.ts +1 -1
  42. package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -1
  43. package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -1
  44. package/dist/builtin-plugin/DllEntryPlugin.d.ts +1 -1
  45. package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +2 -2
  46. package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +1 -1
  47. package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
  48. package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
  49. package/dist/builtin-plugin/EnableLibraryPlugin.d.ts +1 -1
  50. package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -1
  51. package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
  52. package/dist/builtin-plugin/EntryPlugin.d.ts +2 -2
  53. package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +2 -2
  54. package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +2 -2
  55. package/dist/builtin-plugin/ExternalsPlugin.d.ts +1 -1
  56. package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +1 -1
  57. package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
  58. package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +1 -1
  59. package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
  60. package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +1 -1
  61. package/dist/builtin-plugin/HotModuleReplacementPlugin.d.ts +1 -1
  62. package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
  63. package/dist/builtin-plugin/HttpUriPlugin.d.ts +1 -1
  64. package/dist/builtin-plugin/IgnorePlugin.d.ts +2 -2
  65. package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
  66. package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +1 -1
  67. package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
  68. package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
  69. package/dist/builtin-plugin/LibManifestPlugin.d.ts +1 -1
  70. package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +1 -1
  71. package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -1
  72. package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -1
  73. package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -1
  74. package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
  75. package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -1
  76. package/dist/builtin-plugin/ModuleInfoHeaderPlugin.d.ts +1 -1
  77. package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -1
  78. package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -1
  79. package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +1 -1
  80. package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +1 -1
  81. package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +1 -1
  82. package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
  83. package/dist/builtin-plugin/NormalModuleReplacementPlugin.d.ts +10 -0
  84. package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +2 -2
  85. package/dist/builtin-plugin/ProgressPlugin.d.ts +2 -2
  86. package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -1
  87. package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -1
  88. package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +1 -1
  89. package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
  90. package/dist/builtin-plugin/RsdoctorPlugin.d.ts +2 -2
  91. package/dist/builtin-plugin/RslibPlugin.d.ts +2 -2
  92. package/dist/builtin-plugin/RstestPlugin.d.ts +2 -2
  93. package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +2 -2
  94. package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
  95. package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
  96. package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +1 -1
  97. package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +2 -2
  98. package/dist/builtin-plugin/SplitChunksPlugin.d.ts +1 -1
  99. package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +2 -2
  100. package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -1
  101. package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
  102. package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +1 -1
  103. package/dist/builtin-plugin/WorkerPlugin.d.ts +1 -1
  104. package/dist/builtin-plugin/base.d.ts +1 -1
  105. package/dist/builtin-plugin/css-extract/index.d.ts +1 -1
  106. package/dist/builtin-plugin/html-plugin/hooks.d.ts +1 -1
  107. package/dist/builtin-plugin/html-plugin/plugin.d.ts +2 -2
  108. package/dist/builtin-plugin/index.d.ts +1 -0
  109. package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +1 -1
  110. package/dist/config/adapter.d.ts +1 -1
  111. package/dist/config/adapterRuleUse.d.ts +1 -1
  112. package/dist/config/normalization.d.ts +6 -0
  113. package/dist/config/types.d.ts +12 -1
  114. package/dist/container/ContainerPlugin.d.ts +1 -1
  115. package/dist/container/ContainerReferencePlugin.d.ts +1 -1
  116. package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
  117. package/dist/exports.d.ts +7 -6
  118. package/dist/index.mjs +371 -297
  119. package/dist/lib/DllReferencePlugin.d.ts +1 -1
  120. package/dist/lib/WebpackError.d.ts +1 -1
  121. package/dist/loader-runner/index.d.ts +1 -1
  122. package/dist/loader-runner/worker.d.ts +1 -1
  123. package/dist/napi-binding.d.ts +3068 -0
  124. package/dist/rspack.wasi-browser.js +2 -0
  125. package/dist/rspack.wasm32-wasi.wasm +0 -0
  126. package/dist/schema/config.d.ts +12 -0
  127. package/dist/schema/plugins.d.ts +1 -1
  128. package/dist/sharing/ConsumeSharedPlugin.d.ts +1 -1
  129. package/dist/sharing/ProvideSharedPlugin.d.ts +1 -1
  130. package/dist/sharing/ShareRuntimePlugin.d.ts +1 -1
  131. package/dist/stats/StatsFactory.d.ts +1 -1
  132. package/dist/stats/statsFactoryUtils.d.ts +2 -2
  133. package/dist/swc.d.ts +1 -1
  134. package/dist/taps/compilation.d.ts +1 -1
  135. package/dist/taps/types.d.ts +1 -1
  136. package/dist/util/SplitChunkSize.d.ts +1 -1
  137. package/dist/util/source.d.ts +1 -1
  138. package/package.json +7 -5
  139. package/dist/lib/NormalModuleReplacementPlugin.d.ts +0 -29
package/dist/index.mjs CHANGED
@@ -39735,7 +39735,7 @@ async function runLoaders(compiler, context) {
39735
39735
  resource: loaderContext.resource,
39736
39736
  mode: loaderContext.mode,
39737
39737
  sourceMap: loaderContext.sourceMap,
39738
- rootContext: loaderContext.context,
39738
+ rootContext: loaderContext.rootContext,
39739
39739
  loaderIndex: loaderContext.loaderIndex,
39740
39740
  loaders: loaderContext.loaders.map((item)=>{
39741
39741
  let options = item.options;
@@ -40414,6 +40414,7 @@ function getRawJavascriptParserOptions(parser) {
40414
40414
  importMeta: parser.importMeta,
40415
40415
  url: null == (_parser_url = parser.url) ? void 0 : _parser_url.toString(),
40416
40416
  exprContextCritical: parser.exprContextCritical,
40417
+ unknownContextCritical: parser.unknownContextCritical,
40417
40418
  wrappedContextCritical: parser.wrappedContextCritical,
40418
40419
  wrappedContextRegExp: parser.wrappedContextRegExp,
40419
40420
  exportsPresence: false === parser.exportsPresence ? "false" : parser.exportsPresence,
@@ -43969,7 +43970,7 @@ const ZodRecord = /*@__PURE__*/ $constructor("ZodRecord", (inst, def)=>{
43969
43970
  inst.keyType = def.keyType;
43970
43971
  inst.valueType = def.valueType;
43971
43972
  });
43972
- function record(keyType, valueType, params) {
43973
+ function schemas_record(keyType, valueType, params) {
43973
43974
  return new ZodRecord({
43974
43975
  type: "record",
43975
43976
  keyType,
@@ -44292,7 +44293,7 @@ const getDllReferencePluginOptionsSchema = memoize(()=>{
44292
44293
  exports: schemas_array(schemas_string()).or(literal(true)),
44293
44294
  id: schemas_string().or(numberOrInfinity)
44294
44295
  }).partial();
44295
- const dllReferencePluginOptionsContent = record(schemas_string(), dllReferencePluginOptionsContentItem);
44296
+ const dllReferencePluginOptionsContent = schemas_record(schemas_string(), dllReferencePluginOptionsContentItem);
44296
44297
  const dllReferencePluginOptionsSourceType = schemas_enum([
44297
44298
  "var",
44298
44299
  "assign",
@@ -44351,7 +44352,7 @@ const getHtmlPluginOptionsSchema = memoize(()=>{
44351
44352
  error: "HtmlRspackPlugin does not support template path with loader yet"
44352
44353
  }),
44353
44354
  templateContent: schemas_string().or(templateRenderFunction),
44354
- templateParameters: record(schemas_string(), schemas_string()).or(schemas_boolean()).or(templateParamFunction),
44355
+ templateParameters: schemas_record(schemas_string(), schemas_string()).or(schemas_boolean()).or(templateParamFunction),
44355
44356
  inject: schemas_enum([
44356
44357
  "head",
44357
44358
  "body"
@@ -44386,7 +44387,7 @@ const getHtmlPluginOptionsSchema = memoize(()=>{
44386
44387
  minify: schemas_boolean(),
44387
44388
  title: schemas_string(),
44388
44389
  favicon: schemas_string(),
44389
- meta: record(schemas_string(), schemas_string().or(record(schemas_string(), schemas_string()))),
44390
+ meta: schemas_record(schemas_string(), schemas_string().or(schemas_record(schemas_string(), schemas_string()))),
44390
44391
  hash: schemas_boolean()
44391
44392
  }).partial();
44392
44393
  });
@@ -45264,23 +45265,40 @@ const getFullServerUrl = ({ serverUrl, prefix })=>{
45264
45265
  if (!serverUrl) return lazyCompilationPrefix;
45265
45266
  return serverUrl + (serverUrl.endsWith("/") ? lazyCompilationPrefix.slice(1) : lazyCompilationPrefix);
45266
45267
  };
45268
+ const DEPRECATED_LAZY_COMPILATION_OPTIONS_WARN = "The `experiments.lazyCompilation` option is deprecated, please use the configuration top level `lazyCompilation` instead.";
45269
+ const REPEAT_LAZY_COMPILATION_OPTIONS_WARN = "Both top-level `lazyCompilation` and `experiments.lazyCompilation` options are set. The top-level `lazyCompilation` configuration will take precedence.";
45267
45270
  const lazyCompilationMiddleware = (compiler)=>{
45268
45271
  if (compiler instanceof MultiCompiler) {
45269
45272
  const middlewareByCompiler = new Map();
45270
45273
  let i = 0;
45274
+ let isReportDeprecatedWarned = false;
45275
+ let isReportRepeatWarned = false;
45271
45276
  for (const c of compiler.compilers){
45272
- if (!c.options.experiments.lazyCompilation) continue;
45277
+ if (c.options.experiments.lazyCompilation) {
45278
+ if (c.name) console.warn(`The 'experiments.lazyCompilation' option in compiler named '${c.name}' is deprecated, please use the Configuration top level 'lazyCompilation' instead.`);
45279
+ else if (!isReportDeprecatedWarned) {
45280
+ console.warn(DEPRECATED_LAZY_COMPILATION_OPTIONS_WARN);
45281
+ isReportDeprecatedWarned = true;
45282
+ }
45283
+ }
45284
+ if (c.options.lazyCompilation && c.options.experiments.lazyCompilation) {
45285
+ if (c.name) console.warn(`The top-level 'lazyCompilation' option in compiler named '${c.name}' will override the 'experiments.lazyCompilation' option.`);
45286
+ else if (!isReportRepeatWarned) {
45287
+ console.warn(REPEAT_LAZY_COMPILATION_OPTIONS_WARN);
45288
+ isReportRepeatWarned = true;
45289
+ }
45290
+ }
45291
+ if (!c.options.lazyCompilation && !c.options.experiments.lazyCompilation) continue;
45273
45292
  const options = {
45274
- ...c.options.experiments.lazyCompilation
45293
+ ...c.options.experiments.lazyCompilation,
45294
+ ...c.options.lazyCompilation
45275
45295
  };
45276
45296
  const prefix = options.prefix || LAZY_COMPILATION_PREFIX;
45277
45297
  options.prefix = `${prefix}__${i++}`;
45278
- const activeModules = new Map();
45298
+ const activeModules = new Set();
45279
45299
  const filesByKey = new Map();
45280
- const indexToModule = new Map();
45281
- const moduleToIndex = new Map();
45282
- middlewareByCompiler.set(options.prefix, lazyCompilationMiddlewareInternal(compiler, indexToModule, activeModules, filesByKey, options.prefix));
45283
- applyPlugin(c, moduleToIndex, indexToModule, options, activeModules, filesByKey);
45300
+ middlewareByCompiler.set(options.prefix, lazyCompilationMiddlewareInternal(compiler, activeModules, filesByKey, options.prefix));
45301
+ applyPlugin(c, options, activeModules, filesByKey);
45284
45302
  }
45285
45303
  const keys = [
45286
45304
  ...middlewareByCompiler.keys()
@@ -45295,53 +45313,49 @@ const lazyCompilationMiddleware = (compiler)=>{
45295
45313
  return null == middleware ? void 0 : middleware(req, res, next);
45296
45314
  };
45297
45315
  }
45298
- if (!compiler.options.experiments.lazyCompilation) return noop;
45299
- const activeModules = new Map();
45316
+ if (compiler.options.experiments.lazyCompilation) {
45317
+ console.warn(DEPRECATED_LAZY_COMPILATION_OPTIONS_WARN);
45318
+ if (compiler.options.lazyCompilation) console.warn(REPEAT_LAZY_COMPILATION_OPTIONS_WARN);
45319
+ }
45320
+ if (!compiler.options.lazyCompilation && !compiler.options.experiments.lazyCompilation) return noop;
45321
+ const activeModules = new Set();
45300
45322
  const filesByKey = new Map();
45301
- const indexToMap = new Map();
45302
- const moduleToIndex = new Map();
45303
45323
  const options = {
45304
- ...compiler.options.experiments.lazyCompilation
45324
+ ...compiler.options.experiments.lazyCompilation,
45325
+ ...compiler.options.lazyCompilation
45305
45326
  };
45306
- applyPlugin(compiler, moduleToIndex, indexToMap, options, activeModules, filesByKey);
45327
+ applyPlugin(compiler, options, activeModules, filesByKey);
45307
45328
  const lazyCompilationPrefix = options.prefix || LAZY_COMPILATION_PREFIX;
45308
- return lazyCompilationMiddlewareInternal(compiler, indexToMap, activeModules, filesByKey, lazyCompilationPrefix);
45329
+ return lazyCompilationMiddlewareInternal(compiler, activeModules, filesByKey, lazyCompilationPrefix);
45309
45330
  };
45310
- function applyPlugin(compiler, moduleToIndex, indexToModule, options, activeModules, filesByKey) {
45331
+ function applyPlugin(compiler, options, activeModules, filesByKey) {
45311
45332
  const plugin = new BuiltinLazyCompilationPlugin(({ module, path })=>{
45312
- let index = moduleToIndex.get(module);
45313
- if (void 0 === index) {
45314
- index = moduleToIndex.size.toString();
45315
- moduleToIndex.set(module, index);
45316
- indexToModule.set(index, module);
45317
- }
45318
- const key = indexToModule.get(index);
45319
- filesByKey.set(key, path);
45320
- const active = true === activeModules.get(key);
45333
+ const data = `${encodeURIComponent(module.replace(/\\/g, "/").replace(/@/g, "_"))}`;
45334
+ filesByKey.set(data, path);
45335
+ const active = activeModules.has(data);
45321
45336
  return {
45322
45337
  client: `${options.client || getDefaultClient(compiler)}?${encodeURIComponent(getFullServerUrl(options))}`,
45323
- data: index,
45338
+ data,
45324
45339
  active
45325
45340
  };
45326
45341
  }, options.cacheable ?? true, options.entries ?? true, options.imports ?? true, options.test);
45327
45342
  plugin.apply(compiler);
45328
45343
  }
45329
- const lazyCompilationMiddlewareInternal = (compiler, indexToModule, activeModules, filesByKey, lazyCompilationPrefix)=>{
45344
+ const lazyCompilationMiddlewareInternal = (compiler, activeModules, filesByKey, lazyCompilationPrefix)=>{
45330
45345
  const logger = compiler.getInfrastructureLogger("LazyCompilation");
45331
45346
  return (req, res, next)=>{
45332
45347
  var _req_url;
45333
45348
  if (!(null == (_req_url = req.url) ? void 0 : _req_url.startsWith(lazyCompilationPrefix))) return null == next ? void 0 : next();
45334
- const indices = req.url.slice(lazyCompilationPrefix.length).split("@");
45349
+ const modules = req.url.slice(lazyCompilationPrefix.length).split("@");
45335
45350
  req.socket.setNoDelay(true);
45336
45351
  res.setHeader("content-type", "text/event-stream");
45337
45352
  res.writeHead(200);
45338
45353
  res.write("\n");
45339
45354
  const moduleActivated = [];
45340
- for (const index of indices){
45341
- const key = indexToModule.get(index);
45342
- const oldValue = activeModules.get(key) ?? false;
45343
- activeModules.set(key, true);
45344
- if (!oldValue) {
45355
+ for (const key of modules){
45356
+ const activated = activeModules.has(key);
45357
+ activeModules.add(key);
45358
+ if (!activated) {
45345
45359
  logger.log(`${key} is now in use and will be compiled.`);
45346
45360
  moduleActivated.push(key);
45347
45361
  }
@@ -45352,7 +45366,7 @@ const lazyCompilationMiddlewareInternal = (compiler, indexToModule, activeModule
45352
45366
  if (!filePath) logger.warn(`Cannot find correct file path for module ${key}`);
45353
45367
  return filePath;
45354
45368
  }).filter(Boolean));
45355
- if (rebuiltModules.size) compiler.watching.invalidateWithChangesAndRemovals(new Set(rebuiltModules));
45369
+ if (rebuiltModules.size) compiler.watching.invalidateWithChangesAndRemovals(rebuiltModules);
45356
45370
  }
45357
45371
  };
45358
45372
  };
@@ -45435,6 +45449,13 @@ class NaturalModuleIdsPlugin extends RspackBuiltinPlugin {
45435
45449
  }
45436
45450
  const NodeTargetPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.NodeTargetPlugin, ()=>void 0);
45437
45451
  const NoEmitOnErrorsPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.NoEmitOnErrorsPlugin, ()=>void 0);
45452
+ const NormalModuleReplacementPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.NormalModuleReplacementPlugin, (resourceRegExp, newResource)=>({
45453
+ resourceRegExp,
45454
+ newResource: "function" == typeof newResource ? (data)=>{
45455
+ newResource(data);
45456
+ return data;
45457
+ } : newResource
45458
+ }));
45438
45459
  const OccurrenceChunkIdsPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.OccurrenceChunkIdsPlugin, (options)=>({
45439
45460
  ...options
45440
45461
  }), "compilation");
@@ -45762,29 +45783,33 @@ class SubresourceIntegrityPlugin extends NativeSubresourceIntegrityPlugin {
45762
45783
  });
45763
45784
  });
45764
45785
  });
45765
- if ("string" == typeof this.options.htmlPlugin && this.options.htmlPlugin !== NATIVE_HTML_PLUGIN) (0, util_require._)()(this.options.htmlPlugin).then((htmlPlugin)=>{
45766
- const getHooks = htmlPlugin.getCompilationHooks || htmlPlugin.getHooks;
45767
- if ("function" == typeof getHooks) compiler.hooks.thisCompilation.tap(SubresourceIntegrityPlugin_PLUGIN_NAME, (compilation)=>{
45768
- if ("string" == typeof compiler.options.output.chunkLoading && [
45769
- "require",
45770
- "async-node"
45771
- ].includes(compiler.options.output.chunkLoading)) return;
45772
- const hwpHooks = getHooks(compilation);
45773
- hwpHooks.beforeAssetTagGeneration.tapPromise(SubresourceIntegrityPlugin_PLUGIN_NAME, async (data)=>{
45774
- this.handleHwpPluginArgs(data);
45775
- return data;
45776
- });
45777
- hwpHooks.alterAssetTagGroups.tapPromise({
45778
- name: SubresourceIntegrityPlugin_PLUGIN_NAME,
45779
- stage: 10000
45780
- }, async (data)=>{
45781
- this.handleHwpBodyTags(data, compiler.outputPath, compiler.options.output.crossOriginLoading);
45782
- return data;
45786
+ if ("string" == typeof this.options.htmlPlugin && this.options.htmlPlugin !== NATIVE_HTML_PLUGIN) {
45787
+ const self1 = this;
45788
+ function bindingHtmlHooks(htmlPlugin) {
45789
+ const getHooks = htmlPlugin.getCompilationHooks || htmlPlugin.getHooks;
45790
+ if ("function" == typeof getHooks) compiler.hooks.thisCompilation.tap(SubresourceIntegrityPlugin_PLUGIN_NAME, (compilation)=>{
45791
+ if ("string" == typeof compiler.options.output.chunkLoading && [
45792
+ "require",
45793
+ "async-node"
45794
+ ].includes(compiler.options.output.chunkLoading)) return;
45795
+ const hwpHooks = getHooks(compilation);
45796
+ hwpHooks.beforeAssetTagGeneration.tapPromise(SubresourceIntegrityPlugin_PLUGIN_NAME, async (data)=>{
45797
+ self1.handleHwpPluginArgs(data);
45798
+ return data;
45799
+ });
45800
+ hwpHooks.alterAssetTagGroups.tapPromise({
45801
+ name: SubresourceIntegrityPlugin_PLUGIN_NAME,
45802
+ stage: 10000
45803
+ }, async (data)=>{
45804
+ self1.handleHwpBodyTags(data, compiler.outputPath, compiler.options.output.crossOriginLoading);
45805
+ return data;
45806
+ });
45783
45807
  });
45808
+ }
45809
+ (0, util_require._)()(this.options.htmlPlugin).then(bindingHtmlHooks).catch((e)=>{
45810
+ if (!isErrorWithCode(e) || "MODULE_NOT_FOUND" !== e.code) throw e;
45784
45811
  });
45785
- }).catch((e)=>{
45786
- if (!isErrorWithCode(e) || "MODULE_NOT_FOUND" !== e.code) throw e;
45787
- });
45812
+ }
45788
45813
  }
45789
45814
  constructor(options = {}){
45790
45815
  let validateError = null;
@@ -46970,6 +46995,7 @@ const applyRspackOptionsDefaults = (options)=>{
46970
46995
  defaults_F(options, "devtool", ()=>development ? "eval" : false);
46971
46996
  D(options, "watch", false);
46972
46997
  D(options, "profile", false);
46998
+ D(options, "lazyCompilation", false);
46973
46999
  D(options, "bail", false);
46974
47000
  defaults_F(options, "cache", ()=>development);
46975
47001
  applyExperimentsDefaults(options.experiments, {
@@ -46985,7 +47011,8 @@ const applyRspackOptionsDefaults = (options)=>{
46985
47011
  css: options.experiments.css,
46986
47012
  targetProperties,
46987
47013
  mode: options.mode,
46988
- uniqueName: options.output.uniqueName
47014
+ uniqueName: options.output.uniqueName,
47015
+ inlineConst: options.experiments.inlineConst
46989
47016
  });
46990
47017
  applyOutputDefaults(options.output, {
46991
47018
  context: options.context,
@@ -47047,6 +47074,7 @@ const applyExperimentsDefaults = (experiments, { production, development })=>{
47047
47074
  D(experiments, "asyncWebAssembly", experiments.futureDefaults);
47048
47075
  D(experiments, "css", experiments.futureDefaults ? true : void 0);
47049
47076
  D(experiments, "layers", false);
47077
+ if (false === experiments.topLevelAwait) console.warn("`experiments.topLevelAwait` config has been deprecated and will be removed in Rspack v2.0. Top-level await will be always enabled. Please remove this option from your Rspack configuration.");
47050
47078
  D(experiments, "topLevelAwait", true);
47051
47079
  D(experiments, "buildHttp", void 0);
47052
47080
  if (experiments.buildHttp && "object" == typeof experiments.buildHttp) D(experiments.buildHttp, "upgrade", false);
@@ -47082,19 +47110,20 @@ const applybundlerInfoDefaults = (rspackFuture, library)=>{
47082
47110
  if ("object" == typeof rspackFuture) {
47083
47111
  D(rspackFuture, "bundlerInfo", {});
47084
47112
  if ("object" == typeof rspackFuture.bundlerInfo) {
47085
- D(rspackFuture.bundlerInfo, "version", "1.4.12-canary-40c41ca5-20250806090917");
47113
+ D(rspackFuture.bundlerInfo, "version", "1.4.12-canary-1a94ade3-20250814141828");
47086
47114
  D(rspackFuture.bundlerInfo, "bundler", "rspack");
47087
47115
  D(rspackFuture.bundlerInfo, "force", !library);
47088
47116
  }
47089
47117
  }
47090
47118
  };
47091
47119
  const applySnapshotDefaults = (_snapshot, _env)=>{};
47092
- const applyJavascriptParserOptionsDefaults = (parserOptions)=>{
47120
+ const applyJavascriptParserOptionsDefaults = (parserOptions, { inlineConst })=>{
47093
47121
  D(parserOptions, "dynamicImportMode", "lazy");
47094
47122
  D(parserOptions, "dynamicImportPrefetch", false);
47095
47123
  D(parserOptions, "dynamicImportPreload", false);
47096
47124
  D(parserOptions, "url", true);
47097
47125
  D(parserOptions, "exprContextCritical", true);
47126
+ D(parserOptions, "unknownContextCritical", true);
47098
47127
  D(parserOptions, "wrappedContextCritical", false);
47099
47128
  D(parserOptions, "wrappedContextRegExp", /.*/);
47100
47129
  D(parserOptions, "strictExportPresence", false);
@@ -47106,13 +47135,13 @@ const applyJavascriptParserOptionsDefaults = (parserOptions)=>{
47106
47135
  "..."
47107
47136
  ]);
47108
47137
  D(parserOptions, "importMeta", true);
47109
- D(parserOptions, "inlineConst", false);
47138
+ D(parserOptions, "inlineConst", inlineConst);
47110
47139
  D(parserOptions, "typeReexportsPresence", "no-tolerant");
47111
47140
  };
47112
47141
  const applyJsonGeneratorOptionsDefaults = (generatorOptions)=>{
47113
47142
  D(generatorOptions, "JSONParse", true);
47114
47143
  };
47115
- const applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties, mode, uniqueName })=>{
47144
+ const applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties, mode, uniqueName, inlineConst })=>{
47116
47145
  assertNotNill(module.parser);
47117
47146
  assertNotNill(module.generator);
47118
47147
  defaults_F(module.parser, ASSET_MODULE_TYPE, ()=>({}));
@@ -47121,7 +47150,9 @@ const applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties,
47121
47150
  if ("object" == typeof module.parser.asset.dataUrlCondition) D(module.parser.asset.dataUrlCondition, "maxSize", 8096);
47122
47151
  defaults_F(module.parser, "javascript", ()=>({}));
47123
47152
  assertNotNill(module.parser.javascript);
47124
- applyJavascriptParserOptionsDefaults(module.parser.javascript);
47153
+ applyJavascriptParserOptionsDefaults(module.parser.javascript, {
47154
+ inlineConst
47155
+ });
47125
47156
  defaults_F(module.parser, JSON_MODULE_TYPE, ()=>({}));
47126
47157
  assertNotNill(module.parser[JSON_MODULE_TYPE]);
47127
47158
  D(module.parser[JSON_MODULE_TYPE], "exportsDepth", "development" === mode ? 1 : Number.MAX_SAFE_INTEGER);
@@ -47353,7 +47384,7 @@ const applyOutputDefaults = (output, { context, outputModule, targetProperties:
47353
47384
  return "[id].css";
47354
47385
  });
47355
47386
  D(output, "hotUpdateChunkFilename", `[id].[fullhash].hot-update.${output.module ? "mjs" : "js"}`);
47356
- D(output, "hotUpdateMainFilename", "[runtime].[fullhash].hot-update.json");
47387
+ defaults_F(output, "hotUpdateMainFilename", ()=>`[runtime].[fullhash].hot-update.${output.module ? "json.mjs" : "json"}`);
47357
47388
  const uniqueNameId = Template.toIdentifier(output.uniqueName);
47358
47389
  defaults_F(output, "hotUpdateGlobal", ()=>`webpackHotUpdate${uniqueNameId}`);
47359
47390
  defaults_F(output, "chunkLoadingGlobal", ()=>`webpackChunk${uniqueNameId}`);
@@ -47971,7 +48002,8 @@ const getNormalizedRspackOptions = (config)=>({
47971
48002
  devServer: config.devServer,
47972
48003
  profile: config.profile,
47973
48004
  amd: config.amd,
47974
- bail: config.bail
48005
+ bail: config.bail,
48006
+ lazyCompilation: optionalNestedConfig(config.lazyCompilation, (options)=>true === options ? {} : options)
47975
48007
  });
47976
48008
  const getNormalizedEntryStatic = (entry)=>{
47977
48009
  if ("string" == typeof entry) return {
@@ -49693,20 +49725,7 @@ const createNormalModuleFactoryHooksRegisters = (getCompiler, createTap, createM
49693
49725
  return getCompiler().__internal__get_compilation_params().normalModuleFactory.hooks.beforeResolve;
49694
49726
  }, function(queried) {
49695
49727
  return async function(resolveData) {
49696
- const normalizedResolveData = {
49697
- contextInfo: {
49698
- issuer: resolveData.issuer,
49699
- issuerLayer: resolveData.issuerLayer ?? null
49700
- },
49701
- request: resolveData.request,
49702
- context: resolveData.context,
49703
- fileDependencies: [],
49704
- missingDependencies: [],
49705
- contextDependencies: []
49706
- };
49707
- const ret = await queried.promise(normalizedResolveData);
49708
- resolveData.request = normalizedResolveData.request;
49709
- resolveData.context = normalizedResolveData.context;
49728
+ const ret = await queried.promise(resolveData);
49710
49729
  return [
49711
49730
  ret,
49712
49731
  resolveData
@@ -49717,20 +49736,7 @@ const createNormalModuleFactoryHooksRegisters = (getCompiler, createTap, createM
49717
49736
  return getCompiler().__internal__get_compilation_params().normalModuleFactory.hooks.factorize;
49718
49737
  }, function(queried) {
49719
49738
  return async function(resolveData) {
49720
- const normalizedResolveData = {
49721
- contextInfo: {
49722
- issuer: resolveData.issuer,
49723
- issuerLayer: resolveData.issuerLayer ?? null
49724
- },
49725
- request: resolveData.request,
49726
- context: resolveData.context,
49727
- fileDependencies: [],
49728
- missingDependencies: [],
49729
- contextDependencies: []
49730
- };
49731
- await queried.promise(normalizedResolveData);
49732
- resolveData.request = normalizedResolveData.request;
49733
- resolveData.context = normalizedResolveData.context;
49739
+ await queried.promise(resolveData);
49734
49740
  return resolveData;
49735
49741
  };
49736
49742
  }),
@@ -49738,20 +49744,7 @@ const createNormalModuleFactoryHooksRegisters = (getCompiler, createTap, createM
49738
49744
  return getCompiler().__internal__get_compilation_params().normalModuleFactory.hooks.resolve;
49739
49745
  }, function(queried) {
49740
49746
  return async function(resolveData) {
49741
- const normalizedResolveData = {
49742
- contextInfo: {
49743
- issuer: resolveData.issuer,
49744
- issuerLayer: resolveData.issuerLayer ?? null
49745
- },
49746
- request: resolveData.request,
49747
- context: resolveData.context,
49748
- fileDependencies: [],
49749
- missingDependencies: [],
49750
- contextDependencies: []
49751
- };
49752
- await queried.promise(normalizedResolveData);
49753
- resolveData.request = normalizedResolveData.request;
49754
- resolveData.context = normalizedResolveData.context;
49747
+ await queried.promise(resolveData);
49755
49748
  return resolveData;
49756
49749
  };
49757
49750
  }),
@@ -49769,12 +49762,11 @@ const createNormalModuleFactoryHooksRegisters = (getCompiler, createTap, createM
49769
49762
  registerNormalModuleFactoryAfterResolveTaps: createTap(external_rspack_wasi_browser_js_["default"].RegisterJsTapKind.NormalModuleFactoryAfterResolve, function() {
49770
49763
  return getCompiler().__internal__get_compilation_params().normalModuleFactory.hooks.afterResolve;
49771
49764
  }, function(queried) {
49772
- return async function(arg) {
49773
- const data = JSON.parse(arg);
49774
- const ret = await queried.promise(data);
49765
+ return async function(resolveData) {
49766
+ const ret = await queried.promise(resolveData);
49775
49767
  return [
49776
49768
  ret,
49777
- data.createData
49769
+ resolveData
49778
49770
  ];
49779
49771
  };
49780
49772
  }),
@@ -49952,6 +49944,231 @@ class TraceHookPlugin {
49952
49944
  }
49953
49945
  __webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");
49954
49946
  const checkVersion = ()=>{};
49947
+ function NativeWatchFileSystem_check_private_redeclaration(obj, privateCollection) {
49948
+ if (privateCollection.has(obj)) throw new TypeError("Cannot initialize the same private elements twice on an object");
49949
+ }
49950
+ function NativeWatchFileSystem_class_apply_descriptor_get(receiver, descriptor) {
49951
+ if (descriptor.get) return descriptor.get.call(receiver);
49952
+ return descriptor.value;
49953
+ }
49954
+ function NativeWatchFileSystem_class_apply_descriptor_set(receiver, descriptor, value) {
49955
+ if (descriptor.set) descriptor.set.call(receiver, value);
49956
+ else {
49957
+ if (!descriptor.writable) throw new TypeError("attempted to set read only private field");
49958
+ descriptor.value = value;
49959
+ }
49960
+ }
49961
+ function NativeWatchFileSystem_class_extract_field_descriptor(receiver, privateMap, action) {
49962
+ if (!privateMap.has(receiver)) throw new TypeError("attempted to " + action + " private field on non-instance");
49963
+ return privateMap.get(receiver);
49964
+ }
49965
+ function NativeWatchFileSystem_class_private_field_get(receiver, privateMap) {
49966
+ var descriptor = NativeWatchFileSystem_class_extract_field_descriptor(receiver, privateMap, "get");
49967
+ return NativeWatchFileSystem_class_apply_descriptor_get(receiver, descriptor);
49968
+ }
49969
+ function NativeWatchFileSystem_class_private_field_init(obj, privateMap, value) {
49970
+ NativeWatchFileSystem_check_private_redeclaration(obj, privateMap);
49971
+ privateMap.set(obj, value);
49972
+ }
49973
+ function NativeWatchFileSystem_class_private_field_set(receiver, privateMap, value) {
49974
+ var descriptor = NativeWatchFileSystem_class_extract_field_descriptor(receiver, privateMap, "set");
49975
+ NativeWatchFileSystem_class_apply_descriptor_set(receiver, descriptor, value);
49976
+ return value;
49977
+ }
49978
+ const toJsWatcherIgnored = (ignored)=>{
49979
+ if (Array.isArray(ignored) || "string" == typeof ignored || ignored instanceof RegExp) return ignored;
49980
+ if ("function" == typeof ignored) throw new Error("NativeWatcher does not support using a function for the 'ignored' option");
49981
+ };
49982
+ var NativeWatchFileSystem_inner = /*#__PURE__*/ new WeakMap(), _inputFileSystem = /*#__PURE__*/ new WeakMap();
49983
+ class NativeWatchFileSystem {
49984
+ watch(files, directories, missing, _startTime, options, callback, callbackUndelayed) {
49985
+ if ((!files.added || "function" != typeof files.added[Symbol.iterator]) && (!files.removed || "function" != typeof files.removed[Symbol.iterator])) throw new Error("Invalid arguments: 'files'");
49986
+ if ((!directories.added || "function" != typeof directories.added[Symbol.iterator]) && (!directories.removed || "function" != typeof directories.removed[Symbol.iterator])) throw new Error("Invalid arguments: 'directories'");
49987
+ if ("function" != typeof callback) throw new Error("Invalid arguments: 'callback'");
49988
+ if ("object" != typeof options) throw new Error("Invalid arguments: 'options'");
49989
+ if ("function" != typeof callbackUndelayed && callbackUndelayed) throw new Error("Invalid arguments: 'callbackUndelayed'");
49990
+ const nativeWatcher = this.getNativeWatcher(options);
49991
+ nativeWatcher.watch([
49992
+ Array.from(files.added),
49993
+ Array.from(files.removed)
49994
+ ], [
49995
+ Array.from(directories.added),
49996
+ Array.from(directories.removed)
49997
+ ], [
49998
+ Array.from(missing.added),
49999
+ Array.from(missing.removed)
50000
+ ], (err, result)=>{
50001
+ var _class_private_field_get1;
50002
+ if (err) return void callback(err, new Map(), new Map(), new Set(), new Set());
50003
+ nativeWatcher.pause();
50004
+ const changedFiles = result.changedFiles;
50005
+ const removedFiles = result.removedFiles;
50006
+ if (null == (_class_private_field_get1 = NativeWatchFileSystem_class_private_field_get(this, _inputFileSystem)) ? void 0 : _class_private_field_get1.purge) {
50007
+ const fs = NativeWatchFileSystem_class_private_field_get(this, _inputFileSystem);
50008
+ for (const item of changedFiles){
50009
+ var _fs_purge;
50010
+ null == (_fs_purge = fs.purge) || _fs_purge.call(fs, item);
50011
+ }
50012
+ for (const item of removedFiles){
50013
+ var _fs_purge1;
50014
+ null == (_fs_purge1 = fs.purge) || _fs_purge1.call(fs, item);
50015
+ }
50016
+ }
50017
+ callback(err, new Map(), new Map(), new Set(changedFiles), new Set(removedFiles));
50018
+ }, (fileName)=>{
50019
+ callbackUndelayed(fileName, Date.now());
50020
+ });
50021
+ return {
50022
+ close: ()=>{
50023
+ nativeWatcher.close().then(()=>{
50024
+ NativeWatchFileSystem_class_private_field_set(this, NativeWatchFileSystem_inner, void 0);
50025
+ }, (err)=>{
50026
+ console.error("Error closing native watcher:", err);
50027
+ });
50028
+ },
50029
+ pause: ()=>{
50030
+ nativeWatcher.pause();
50031
+ },
50032
+ getInfo () {
50033
+ return {
50034
+ changes: new Set(),
50035
+ removals: new Set(),
50036
+ fileTimeInfoEntries: new Map(),
50037
+ contextTimeInfoEntries: new Map()
50038
+ };
50039
+ }
50040
+ };
50041
+ }
50042
+ getNativeWatcher(options) {
50043
+ if (NativeWatchFileSystem_class_private_field_get(this, NativeWatchFileSystem_inner)) return NativeWatchFileSystem_class_private_field_get(this, NativeWatchFileSystem_inner);
50044
+ const nativeWatcherOptions = {
50045
+ followSymlinks: options.followSymlinks,
50046
+ aggregateTimeout: options.aggregateTimeout,
50047
+ pollInterval: "boolean" == typeof options.poll ? 0 : options.poll,
50048
+ ignored: toJsWatcherIgnored(options.ignored)
50049
+ };
50050
+ const nativeWatcher = new external_rspack_wasi_browser_js_["default"].NativeWatcher(nativeWatcherOptions);
50051
+ NativeWatchFileSystem_class_private_field_set(this, NativeWatchFileSystem_inner, nativeWatcher);
50052
+ return nativeWatcher;
50053
+ }
50054
+ triggerEvent(kind, path) {
50055
+ var _class_private_field_get1;
50056
+ null == (_class_private_field_get1 = NativeWatchFileSystem_class_private_field_get(this, NativeWatchFileSystem_inner)) || _class_private_field_get1.triggerEvent(kind, path);
50057
+ }
50058
+ constructor(inputFileSystem){
50059
+ NativeWatchFileSystem_class_private_field_init(this, NativeWatchFileSystem_inner, {
50060
+ writable: true,
50061
+ value: void 0
50062
+ });
50063
+ NativeWatchFileSystem_class_private_field_init(this, _inputFileSystem, {
50064
+ writable: true,
50065
+ value: void 0
50066
+ });
50067
+ NativeWatchFileSystem_class_private_field_set(this, _inputFileSystem, inputFileSystem);
50068
+ }
50069
+ }
50070
+ function VirtualModulesPlugin_check_private_redeclaration(obj, privateCollection) {
50071
+ if (privateCollection.has(obj)) throw new TypeError("Cannot initialize the same private elements twice on an object");
50072
+ }
50073
+ function VirtualModulesPlugin_class_apply_descriptor_get(receiver, descriptor) {
50074
+ if (descriptor.get) return descriptor.get.call(receiver);
50075
+ return descriptor.value;
50076
+ }
50077
+ function VirtualModulesPlugin_class_apply_descriptor_set(receiver, descriptor, value) {
50078
+ if (descriptor.set) descriptor.set.call(receiver, value);
50079
+ else {
50080
+ if (!descriptor.writable) throw new TypeError("attempted to set read only private field");
50081
+ descriptor.value = value;
50082
+ }
50083
+ }
50084
+ function VirtualModulesPlugin_class_extract_field_descriptor(receiver, privateMap, action) {
50085
+ if (!privateMap.has(receiver)) throw new TypeError("attempted to " + action + " private field on non-instance");
50086
+ return privateMap.get(receiver);
50087
+ }
50088
+ function VirtualModulesPlugin_class_private_field_get(receiver, privateMap) {
50089
+ var descriptor = VirtualModulesPlugin_class_extract_field_descriptor(receiver, privateMap, "get");
50090
+ return VirtualModulesPlugin_class_apply_descriptor_get(receiver, descriptor);
50091
+ }
50092
+ function VirtualModulesPlugin_class_private_field_init(obj, privateMap, value) {
50093
+ VirtualModulesPlugin_check_private_redeclaration(obj, privateMap);
50094
+ privateMap.set(obj, value);
50095
+ }
50096
+ function VirtualModulesPlugin_class_private_field_set(receiver, privateMap, value) {
50097
+ var descriptor = VirtualModulesPlugin_class_extract_field_descriptor(receiver, privateMap, "set");
50098
+ VirtualModulesPlugin_class_apply_descriptor_set(receiver, descriptor, value);
50099
+ return value;
50100
+ }
50101
+ const VirtualModulesPlugin_PLUGIN_NAME = "VirtualModulesPlugin";
50102
+ const VFILES_BY_COMPILER = new WeakMap();
50103
+ var _staticModules = /*#__PURE__*/ new WeakMap(), _compiler = /*#__PURE__*/ new WeakMap(), _store = /*#__PURE__*/ new WeakMap();
50104
+ class VirtualModulesPlugin {
50105
+ apply(compiler) {
50106
+ VirtualModulesPlugin_class_private_field_set(this, _compiler, compiler);
50107
+ compiler.hooks.afterEnvironment.tap(VirtualModulesPlugin_PLUGIN_NAME, ()=>{
50108
+ const record = VFILES_BY_COMPILER.get(compiler) || {};
50109
+ if (VirtualModulesPlugin_class_private_field_get(this, _staticModules)) for (const [filePath, content] of Object.entries(VirtualModulesPlugin_class_private_field_get(this, _staticModules))){
50110
+ const fullPath = path_browserify_default().resolve(compiler.context, filePath);
50111
+ record[fullPath] = content;
50112
+ }
50113
+ VFILES_BY_COMPILER.set(compiler, record);
50114
+ });
50115
+ }
50116
+ writeModule(filePath, contents) {
50117
+ if (!VirtualModulesPlugin_class_private_field_get(this, _compiler)) throw new Error("Plugin has not been initialized");
50118
+ const store = this.getVirtualFileStore();
50119
+ const fullPath = path_browserify_default().resolve(VirtualModulesPlugin_class_private_field_get(this, _compiler).context, filePath);
50120
+ store.writeVirtualFileSync(fullPath, contents);
50121
+ notifyWatchers(VirtualModulesPlugin_class_private_field_get(this, _compiler), fullPath, Date.now());
50122
+ }
50123
+ getVirtualFileStore() {
50124
+ var _class_private_field_get1;
50125
+ if (VirtualModulesPlugin_class_private_field_get(this, _store)) return VirtualModulesPlugin_class_private_field_get(this, _store);
50126
+ const store = null == (_class_private_field_get1 = VirtualModulesPlugin_class_private_field_get(this, _compiler)) ? void 0 : _class_private_field_get1.__internal__get_virtual_file_store();
50127
+ if (!store) throw new Error("Virtual file store has not been initialized");
50128
+ VirtualModulesPlugin_class_private_field_set(this, _store, store);
50129
+ return store;
50130
+ }
50131
+ static __internal__take_virtual_files(compiler) {
50132
+ const record = VFILES_BY_COMPILER.get(compiler);
50133
+ if (record) {
50134
+ VFILES_BY_COMPILER.delete(compiler);
50135
+ return Object.entries(record).map(([path, content])=>({
50136
+ path,
50137
+ content
50138
+ }));
50139
+ }
50140
+ }
50141
+ constructor(modules){
50142
+ VirtualModulesPlugin_class_private_field_init(this, _staticModules, {
50143
+ writable: true,
50144
+ value: void 0
50145
+ });
50146
+ VirtualModulesPlugin_class_private_field_init(this, _compiler, {
50147
+ writable: true,
50148
+ value: void 0
50149
+ });
50150
+ VirtualModulesPlugin_class_private_field_init(this, _store, {
50151
+ writable: true,
50152
+ value: void 0
50153
+ });
50154
+ VirtualModulesPlugin_class_private_field_set(this, _staticModules, modules || null);
50155
+ }
50156
+ }
50157
+ function notifyWatchers(compiler, fullPath, time) {
50158
+ if (compiler.watchFileSystem instanceof NativeWatchFileSystem) compiler.watchFileSystem.triggerEvent("change", fullPath);
50159
+ else notifyJsWatchers(compiler, fullPath, time);
50160
+ }
50161
+ function notifyJsWatchers(compiler, fullPath, time) {
50162
+ if (compiler.watchFileSystem && isNodeWatchFileSystem(compiler.watchFileSystem)) {
50163
+ const watcher = compiler.watchFileSystem.watcher;
50164
+ if (!watcher) return;
50165
+ const fileWatcher = watcher.fileWatchers.get(fullPath);
50166
+ if (fileWatcher) fileWatcher.watcher.emit("change", time, null);
50167
+ }
50168
+ }
50169
+ function isNodeWatchFileSystem(fs) {
50170
+ return "watch" in fs;
50171
+ }
49955
50172
  var Watching_process = __webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");
49956
50173
  function Watching_check_private_redeclaration(obj, privateCollection) {
49957
50174
  if (privateCollection.has(obj)) throw new TypeError("Cannot initialize the same private elements twice on an object");
@@ -50578,6 +50795,10 @@ class Compiler {
50578
50795
  Compiler_class_private_field_set(this, Compiler_compilation, compilation);
50579
50796
  return compilation;
50580
50797
  }
50798
+ __internal__get_virtual_file_store() {
50799
+ var _class_private_field_get1;
50800
+ return null == (_class_private_field_get1 = Compiler_class_private_field_get(this, _instance)) ? void 0 : _class_private_field_get1.getVirtualFileStore();
50801
+ }
50581
50802
  __internal__registerBuiltinPlugin(plugin) {
50582
50803
  Compiler_class_private_field_get(this, _builtinPlugins).push(plugin);
50583
50804
  }
@@ -50815,6 +51036,7 @@ function getInstance(callback) {
50815
51036
  const options = this.options;
50816
51037
  const rawOptions = getRawOptions(options, this);
50817
51038
  rawOptions.__references = Object.fromEntries(Compiler_class_private_field_get(this, _ruleSet).builtinReferences.entries());
51039
+ rawOptions.__virtual_files = VirtualModulesPlugin.__internal__take_virtual_files(this);
50818
51040
  const instanceBinding = __webpack_require__("@rspack/binding");
50819
51041
  Compiler_class_private_field_set(this, _registers, Compiler_class_private_method_get(this, _createHooksRegisters, createHooksRegisters).call(this));
50820
51042
  const inputFileSystem = this.inputFileSystem && ThreadsafeInputNodeFS.needsBinding(options.experiments.useInputFileSystem) ? ThreadsafeInputNodeFS.__to_binding(this.inputFileSystem) : void 0;
@@ -50973,7 +51195,7 @@ class MultiStats {
50973
51195
  return obj;
50974
51196
  });
50975
51197
  if (childOptions.version) {
50976
- obj.rspackVersion = "1.4.12-canary-40c41ca5-20250806090917";
51198
+ obj.rspackVersion = "1.4.12-canary-1a94ade3-20250814141828";
50977
51199
  obj.version = "5.75.0";
50978
51200
  }
50979
51201
  if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join("");
@@ -51093,7 +51315,7 @@ function MultiWatching_define_property(obj, key, value) {
51093
51315
  else obj[key] = value;
51094
51316
  return obj;
51095
51317
  }
51096
- class MultiWatching {
51318
+ class MultiWatching_MultiWatching {
51097
51319
  invalidate(callback) {
51098
51320
  if (callback) asyncLib.each(this.watchings, (watching, callback)=>watching.invalidate(callback), callback);
51099
51321
  else for (const watching of this.watchings)watching.invalidate();
@@ -51126,7 +51348,7 @@ class MultiWatching {
51126
51348
  this.compiler = compiler;
51127
51349
  }
51128
51350
  }
51129
- const src_MultiWatching = MultiWatching;
51351
+ const MultiWatching = MultiWatching_MultiWatching;
51130
51352
  function ArrayQueue_define_property(obj, key, value) {
51131
51353
  if (key in obj) Object.defineProperty(obj, key, {
51132
51354
  value: value,
@@ -51303,10 +51525,10 @@ class MultiCompiler {
51303
51525
  if (compiler.watching !== watching) return;
51304
51526
  if (!watching.running) watching.invalidate();
51305
51527
  }, handler);
51306
- this.watching = new src_MultiWatching(watchings, this);
51528
+ this.watching = new MultiWatching(watchings, this);
51307
51529
  return this.watching;
51308
51530
  }
51309
- this.watching = new src_MultiWatching([], this);
51531
+ this.watching = new MultiWatching([], this);
51310
51532
  return this.watching;
51311
51533
  }
51312
51534
  run(callback, options) {
@@ -52283,7 +52505,7 @@ const SIMPLE_EXTRACTORS = {
52283
52505
  },
52284
52506
  version: (object)=>{
52285
52507
  object.version = "5.75.0";
52286
- object.rspackVersion = "1.4.12-canary-40c41ca5-20250806090917";
52508
+ object.rspackVersion = "1.4.12-canary-1a94ade3-20250814141828";
52287
52509
  },
52288
52510
  env: (object, _compilation, _context, { _env })=>{
52289
52511
  object.env = _env;
@@ -54323,39 +54545,6 @@ class LoaderTargetPlugin {
54323
54545
  this.target = target;
54324
54546
  }
54325
54547
  }
54326
- function NormalModuleReplacementPlugin_define_property(obj, key, value) {
54327
- if (key in obj) Object.defineProperty(obj, key, {
54328
- value: value,
54329
- enumerable: true,
54330
- configurable: true,
54331
- writable: true
54332
- });
54333
- else obj[key] = value;
54334
- return obj;
54335
- }
54336
- class NormalModuleReplacementPlugin {
54337
- apply(compiler) {
54338
- const { resourceRegExp, newResource } = this;
54339
- compiler.hooks.normalModuleFactory.tap("NormalModuleReplacementPlugin", (nmf)=>{
54340
- nmf.hooks.beforeResolve.tap("NormalModuleReplacementPlugin", (result)=>{
54341
- if (resourceRegExp.test(result.request)) if ("function" == typeof newResource) newResource(result);
54342
- else result.request = newResource;
54343
- });
54344
- nmf.hooks.afterResolve.tap("NormalModuleReplacementPlugin", (result)=>{
54345
- const createData = result.createData || {};
54346
- if (resourceRegExp.test(createData.resource || "")) if ("function" == typeof newResource) newResource(result);
54347
- else if (path_browserify.posix.isAbsolute(newResource) || path_browserify.win32.isAbsolute(newResource)) createData.resource = newResource;
54348
- else createData.resource = path_browserify.join(path_browserify.dirname(createData.resource || ""), newResource);
54349
- });
54350
- });
54351
- }
54352
- constructor(resourceRegExp, newResource){
54353
- NormalModuleReplacementPlugin_define_property(this, "resourceRegExp", void 0);
54354
- NormalModuleReplacementPlugin_define_property(this, "newResource", void 0);
54355
- this.resourceRegExp = resourceRegExp;
54356
- this.newResource = newResource;
54357
- }
54358
- }
54359
54548
  var CachedInputFileSystem = __webpack_require__("../../node_modules/.pnpm/enhanced-resolve@5.18.2/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js");
54360
54549
  var CachedInputFileSystem_default = /*#__PURE__*/ __webpack_require__.n(CachedInputFileSystem);
54361
54550
  const filterToFunction = (item)=>{
@@ -54470,125 +54659,6 @@ const createConsoleLogger = ({ level = "info", debug = false, console: console1
54470
54659
  };
54471
54660
  return logger;
54472
54661
  };
54473
- function NativeWatchFileSystem_check_private_redeclaration(obj, privateCollection) {
54474
- if (privateCollection.has(obj)) throw new TypeError("Cannot initialize the same private elements twice on an object");
54475
- }
54476
- function NativeWatchFileSystem_class_apply_descriptor_get(receiver, descriptor) {
54477
- if (descriptor.get) return descriptor.get.call(receiver);
54478
- return descriptor.value;
54479
- }
54480
- function NativeWatchFileSystem_class_apply_descriptor_set(receiver, descriptor, value) {
54481
- if (descriptor.set) descriptor.set.call(receiver, value);
54482
- else {
54483
- if (!descriptor.writable) throw new TypeError("attempted to set read only private field");
54484
- descriptor.value = value;
54485
- }
54486
- }
54487
- function NativeWatchFileSystem_class_extract_field_descriptor(receiver, privateMap, action) {
54488
- if (!privateMap.has(receiver)) throw new TypeError("attempted to " + action + " private field on non-instance");
54489
- return privateMap.get(receiver);
54490
- }
54491
- function NativeWatchFileSystem_class_private_field_get(receiver, privateMap) {
54492
- var descriptor = NativeWatchFileSystem_class_extract_field_descriptor(receiver, privateMap, "get");
54493
- return NativeWatchFileSystem_class_apply_descriptor_get(receiver, descriptor);
54494
- }
54495
- function NativeWatchFileSystem_class_private_field_init(obj, privateMap, value) {
54496
- NativeWatchFileSystem_check_private_redeclaration(obj, privateMap);
54497
- privateMap.set(obj, value);
54498
- }
54499
- function NativeWatchFileSystem_class_private_field_set(receiver, privateMap, value) {
54500
- var descriptor = NativeWatchFileSystem_class_extract_field_descriptor(receiver, privateMap, "set");
54501
- NativeWatchFileSystem_class_apply_descriptor_set(receiver, descriptor, value);
54502
- return value;
54503
- }
54504
- const toJsWatcherIgnored = (ignored)=>{
54505
- if (Array.isArray(ignored) || "string" == typeof ignored || ignored instanceof RegExp) return ignored;
54506
- if ("function" == typeof ignored) throw new Error("NativeWatcher does not support using a function for the 'ignored' option");
54507
- };
54508
- var NativeWatchFileSystem_inner = /*#__PURE__*/ new WeakMap(), _inputFileSystem = /*#__PURE__*/ new WeakMap();
54509
- class NativeWatchFileSystem {
54510
- watch(files, directories, missing, _startTime, options, callback, callbackUndelayed) {
54511
- if ((!files.added || "function" != typeof files.added[Symbol.iterator]) && (!files.removed || "function" != typeof files.removed[Symbol.iterator])) throw new Error("Invalid arguments: 'files'");
54512
- if ((!directories.added || "function" != typeof directories.added[Symbol.iterator]) && (!directories.removed || "function" != typeof directories.removed[Symbol.iterator])) throw new Error("Invalid arguments: 'directories'");
54513
- if ("function" != typeof callback) throw new Error("Invalid arguments: 'callback'");
54514
- if ("object" != typeof options) throw new Error("Invalid arguments: 'options'");
54515
- if ("function" != typeof callbackUndelayed && callbackUndelayed) throw new Error("Invalid arguments: 'callbackUndelayed'");
54516
- const nativeWatcher = this.getNativeWatcher(options);
54517
- nativeWatcher.watch([
54518
- Array.from(files.added),
54519
- Array.from(files.removed)
54520
- ], [
54521
- Array.from(directories.added),
54522
- Array.from(directories.removed)
54523
- ], [
54524
- Array.from(missing.added),
54525
- Array.from(missing.removed)
54526
- ], (err, result)=>{
54527
- var _class_private_field_get1;
54528
- if (err) return void callback(err, new Map(), new Map(), new Set(), new Set());
54529
- nativeWatcher.pause();
54530
- const changedFiles = result.changedFiles;
54531
- const removedFiles = result.removedFiles;
54532
- if (null == (_class_private_field_get1 = NativeWatchFileSystem_class_private_field_get(this, _inputFileSystem)) ? void 0 : _class_private_field_get1.purge) {
54533
- const fs = NativeWatchFileSystem_class_private_field_get(this, _inputFileSystem);
54534
- for (const item of changedFiles){
54535
- var _fs_purge;
54536
- null == (_fs_purge = fs.purge) || _fs_purge.call(fs, item);
54537
- }
54538
- for (const item of removedFiles){
54539
- var _fs_purge1;
54540
- null == (_fs_purge1 = fs.purge) || _fs_purge1.call(fs, item);
54541
- }
54542
- }
54543
- callback(err, new Map(), new Map(), new Set(changedFiles), new Set(removedFiles));
54544
- }, (fileName)=>{
54545
- callbackUndelayed(fileName, Date.now());
54546
- });
54547
- return {
54548
- close: ()=>{
54549
- nativeWatcher.close().then(()=>{
54550
- NativeWatchFileSystem_class_private_field_set(this, NativeWatchFileSystem_inner, void 0);
54551
- }, (err)=>{
54552
- console.error("Error closing native watcher:", err);
54553
- });
54554
- },
54555
- pause: ()=>{
54556
- nativeWatcher.pause();
54557
- },
54558
- getInfo () {
54559
- return {
54560
- changes: new Set(),
54561
- removals: new Set(),
54562
- fileTimeInfoEntries: new Map(),
54563
- contextTimeInfoEntries: new Map()
54564
- };
54565
- }
54566
- };
54567
- }
54568
- getNativeWatcher(options) {
54569
- if (NativeWatchFileSystem_class_private_field_get(this, NativeWatchFileSystem_inner)) return NativeWatchFileSystem_class_private_field_get(this, NativeWatchFileSystem_inner);
54570
- const nativeWatcherOptions = {
54571
- followSymlinks: options.followSymlinks,
54572
- aggregateTimeout: options.aggregateTimeout,
54573
- pollInterval: "boolean" == typeof options.poll ? 0 : options.poll,
54574
- ignored: toJsWatcherIgnored(options.ignored)
54575
- };
54576
- const nativeWatcher = new external_rspack_wasi_browser_js_["default"].NativeWatcher(nativeWatcherOptions);
54577
- NativeWatchFileSystem_class_private_field_set(this, NativeWatchFileSystem_inner, nativeWatcher);
54578
- return nativeWatcher;
54579
- }
54580
- constructor(inputFileSystem){
54581
- NativeWatchFileSystem_class_private_field_init(this, NativeWatchFileSystem_inner, {
54582
- writable: true,
54583
- value: void 0
54584
- });
54585
- NativeWatchFileSystem_class_private_field_init(this, _inputFileSystem, {
54586
- writable: true,
54587
- value: void 0
54588
- });
54589
- NativeWatchFileSystem_class_private_field_set(this, _inputFileSystem, inputFileSystem);
54590
- }
54591
- }
54592
54662
  function NodeWatchFileSystem_define_property(obj, key, value) {
54593
54663
  if (key in obj) Object.defineProperty(obj, key, {
54594
54664
  value: value,
@@ -55096,7 +55166,7 @@ const getZodSwcLoaderOptionsSchema = memoize(()=>{
55096
55166
  module: schemas_boolean()
55097
55167
  }).partial();
55098
55168
  const ZodSwcTerserMangleOptions = strictObject({
55099
- props: record(schemas_string(), any()),
55169
+ props: schemas_record(schemas_string(), any()),
55100
55170
  topLevel: schemas_boolean(),
55101
55171
  toplevel: schemas_boolean(),
55102
55172
  keepClassNames: schemas_boolean(),
@@ -55127,15 +55197,15 @@ const getZodSwcLoaderOptionsSchema = memoize(()=>{
55127
55197
  importSource: schemas_string()
55128
55198
  }).partial();
55129
55199
  const ZodSwcConstModulesConfig = strictObject({
55130
- globals: record(schemas_string(), record(schemas_string(), schemas_string())).optional()
55200
+ globals: schemas_record(schemas_string(), schemas_record(schemas_string(), schemas_string())).optional()
55131
55201
  });
55132
55202
  const ZodSwcGlobalPassOption = strictObject({
55133
- vars: record(schemas_string(), schemas_string()),
55203
+ vars: schemas_record(schemas_string(), schemas_string()),
55134
55204
  envs: union([
55135
55205
  schemas_string().array(),
55136
- record(schemas_string(), schemas_string())
55206
+ schemas_record(schemas_string(), schemas_string())
55137
55207
  ]),
55138
- typeofs: record(schemas_string(), schemas_string())
55208
+ typeofs: schemas_record(schemas_string(), schemas_string())
55139
55209
  }).partial();
55140
55210
  const ZodSwcOptimizerConfig = strictObject({
55141
55211
  simplify: schemas_boolean(),
@@ -55196,7 +55266,7 @@ const getZodSwcLoaderOptionsSchema = memoize(()=>{
55196
55266
  cacheRoot: schemas_string(),
55197
55267
  plugins: schemas_array(tuple([
55198
55268
  schemas_string(),
55199
- record(schemas_string(), any())
55269
+ schemas_record(schemas_string(), any())
55200
55270
  ])),
55201
55271
  runPluginFirst: schemas_boolean(),
55202
55272
  disableBuiltinTransformsForInternalTesting: schemas_boolean(),
@@ -55205,7 +55275,7 @@ const getZodSwcLoaderOptionsSchema = memoize(()=>{
55205
55275
  keepImportAssertions: schemas_boolean()
55206
55276
  }).partial(),
55207
55277
  baseUrl: schemas_string(),
55208
- paths: record(schemas_string(), schemas_string().array()),
55278
+ paths: schemas_record(schemas_string(), schemas_string().array()),
55209
55279
  minify: ZodSwcJsMinifyOptions,
55210
55280
  preserveAllComments: schemas_boolean(),
55211
55281
  output: strictObject({
@@ -55250,7 +55320,7 @@ const getZodSwcLoaderOptionsSchema = memoize(()=>{
55250
55320
  });
55251
55321
  const ZodSwcUmdConfig = ZodSwcBaseModuleConfig.extend({
55252
55322
  type: literal("umd"),
55253
- globals: record(schemas_string(), schemas_string()).optional()
55323
+ globals: schemas_record(schemas_string(), schemas_string()).optional()
55254
55324
  });
55255
55325
  const ZodSwcAmdConfig = ZodSwcBaseModuleConfig.extend({
55256
55326
  type: literal("amd"),
@@ -55436,7 +55506,7 @@ const getRspackOptionsSchema = memoize(()=>{
55436
55506
  layer: layer.optional()
55437
55507
  });
55438
55508
  const entryUnnamed = entryItem;
55439
- const entryObject = record(schemas_string(), entryItem.or(entryDescription));
55509
+ const entryObject = schemas_record(schemas_string(), entryItem.or(entryDescription));
55440
55510
  const entryStatic = entryObject.or(entryUnnamed);
55441
55511
  const entryDynamic = anyFunction;
55442
55512
  const entry = entryStatic.or(entryDynamic);
@@ -55567,7 +55637,7 @@ const getRspackOptionsSchema = memoize(()=>{
55567
55637
  environment: environment,
55568
55638
  compareBeforeEmit: schemas_boolean()
55569
55639
  }).partial();
55570
- const resolveAlias = record(schemas_string(), literal(false).or(schemas_string()).or(schemas_array(schemas_string().or(literal(false))))).or(literal(false));
55640
+ const resolveAlias = schemas_record(schemas_string(), literal(false).or(schemas_string()).or(schemas_array(schemas_string().or(literal(false))))).or(literal(false));
55571
55641
  const resolveTsConfigFile = schemas_string();
55572
55642
  const resolveTsConfig = resolveTsConfigFile.or(strictObject({
55573
55643
  configFile: resolveTsConfigFile,
@@ -55590,14 +55660,14 @@ const getRspackOptionsSchema = memoize(()=>{
55590
55660
  tsConfig: resolveTsConfig,
55591
55661
  fullySpecified: schemas_boolean(),
55592
55662
  exportsFields: schemas_array(schemas_string()),
55593
- extensionAlias: record(schemas_string(), schemas_string().or(schemas_array(schemas_string()))),
55663
+ extensionAlias: schemas_record(schemas_string(), schemas_string().or(schemas_array(schemas_string()))),
55594
55664
  aliasFields: schemas_array(schemas_string()),
55595
55665
  restrictions: schemas_array(schemas_string()),
55596
55666
  roots: schemas_array(schemas_string()),
55597
55667
  pnp: schemas_boolean()
55598
55668
  }).partial();
55599
55669
  const resolveOptions = baseResolveOptions.extend({
55600
- byDependency: lazy(()=>record(schemas_string(), resolveOptions)).optional()
55670
+ byDependency: lazy(()=>schemas_record(schemas_string(), resolveOptions)).optional()
55601
55671
  });
55602
55672
  const baseRuleSetCondition = _instanceof(RegExp).or(schemas_string()).or(anyFunction);
55603
55673
  const ruleSetCondition = baseRuleSetCondition.or(lazy(()=>ruleSetConditions)).or(lazy(()=>ruleSetLogicalConditions));
@@ -55608,7 +55678,7 @@ const getRspackOptionsSchema = memoize(()=>{
55608
55678
  not: ruleSetCondition
55609
55679
  }).partial();
55610
55680
  const ruleSetLoader = schemas_string();
55611
- const ruleSetLoaderOptions = schemas_string().or(record(schemas_string(), any()));
55681
+ const ruleSetLoaderOptions = schemas_string().or(schemas_record(schemas_string(), any()));
55612
55682
  const ruleSetLoaderWithOptions = strictObject({
55613
55683
  ident: schemas_string().optional(),
55614
55684
  loader: ruleSetLoader,
@@ -55647,15 +55717,15 @@ const getRspackOptionsSchema = memoize(()=>{
55647
55717
  resourceQuery: ruleSetCondition,
55648
55718
  scheme: ruleSetCondition,
55649
55719
  mimetype: ruleSetCondition,
55650
- descriptionData: record(schemas_string(), ruleSetCondition),
55651
- with: record(schemas_string(), ruleSetCondition),
55720
+ descriptionData: schemas_record(schemas_string(), ruleSetCondition),
55721
+ with: schemas_record(schemas_string(), ruleSetCondition),
55652
55722
  type: schemas_string(),
55653
55723
  layer: schemas_string(),
55654
55724
  loader: ruleSetLoader,
55655
55725
  options: ruleSetLoaderOptions,
55656
55726
  use: ruleSetUse,
55657
- parser: record(schemas_string(), any()),
55658
- generator: record(schemas_string(), any()),
55727
+ parser: schemas_record(schemas_string(), any()),
55728
+ generator: schemas_record(schemas_string(), any()),
55659
55729
  resolve: resolveOptions,
55660
55730
  sideEffects: schemas_boolean(),
55661
55731
  enforce: literal("pre").or(literal("post"))
@@ -55712,6 +55782,7 @@ const getRspackOptionsSchema = memoize(()=>{
55712
55782
  ]);
55713
55783
  const exprContextCritical = schemas_boolean();
55714
55784
  const wrappedContextCritical = schemas_boolean();
55785
+ const unknownContextCritical = schemas_boolean();
55715
55786
  const wrappedContextRegExp = _instanceof(RegExp);
55716
55787
  const exportsPresence = schemas_enum([
55717
55788
  "error",
@@ -55753,6 +55824,7 @@ const getRspackOptionsSchema = memoize(()=>{
55753
55824
  url: javascriptParserUrl,
55754
55825
  exprContextCritical: exprContextCritical,
55755
55826
  wrappedContextCritical: wrappedContextCritical,
55827
+ unknownContextCritical: unknownContextCritical,
55756
55828
  wrappedContextRegExp: wrappedContextRegExp,
55757
55829
  exportsPresence: exportsPresence,
55758
55830
  importExportsPresence: importExportsPresence,
@@ -55889,7 +55961,7 @@ const getRspackOptionsSchema = memoize(()=>{
55889
55961
  allowTarget,
55890
55962
  allowTarget.array()
55891
55963
  ]);
55892
- const externalItemObjectValue = record(schemas_string(), schemas_string().or(schemas_string().array()));
55964
+ const externalItemObjectValue = schemas_record(schemas_string(), schemas_string().or(schemas_string().array()));
55893
55965
  const externalItemUmdValue = strictObject({
55894
55966
  root: schemas_string().or(schemas_string().array()),
55895
55967
  commonjs: schemas_string().or(schemas_string().array()),
@@ -55935,7 +56007,7 @@ const getRspackOptionsSchema = memoize(()=>{
55935
56007
  }
55936
56008
  };
55937
56009
  const externalItemValue = schemas_string().or(schemas_boolean()).or(schemas_string().array().min(1)).or(externalItemObjectValue);
55938
- const externalItemObjectUnknown = record(schemas_string(), externalItemValue);
56010
+ const externalItemObjectUnknown = schemas_record(schemas_string(), externalItemValue);
55939
56011
  const externalItem = schemas_string().or(_instanceof(RegExp)).or(externalItemObjectUnknown).or(anyFunction);
55940
56012
  const externals = externalItem.array().or(externalItem);
55941
56013
  const externalsPresets = strictObject({
@@ -55987,7 +56059,7 @@ const getRspackOptionsSchema = memoize(()=>{
55987
56059
  global: schemas_boolean().or(literal("warn"))
55988
56060
  }).partial();
55989
56061
  const node = literal(false).or(nodeOptions);
55990
- const loader = record(schemas_string(), any());
56062
+ const loader = schemas_record(schemas_string(), any());
55991
56063
  const snapshotOptions = strictObject({});
55992
56064
  const cacheOptions = schemas_boolean();
55993
56065
  const statsPresets = schemas_enum([
@@ -56104,7 +56176,7 @@ const getRspackOptionsSchema = memoize(()=>{
56104
56176
  "async",
56105
56177
  "all"
56106
56178
  ]).or(_instanceof(RegExp)).or(anyFunction);
56107
- const optimizationSplitChunksSizes = numberOrInfinity.or(record(schemas_string(), numberOrInfinity));
56179
+ const optimizationSplitChunksSizes = numberOrInfinity.or(schemas_record(schemas_string(), numberOrInfinity));
56108
56180
  const optimizationSplitChunksDefaultSizeTypes = schemas_array(schemas_string());
56109
56181
  const sharedOptimizationSplitChunksCacheGroup = {
56110
56182
  chunks: optimizationSplitChunksChunks,
@@ -56133,7 +56205,7 @@ const getRspackOptionsSchema = memoize(()=>{
56133
56205
  ...sharedOptimizationSplitChunksCacheGroup
56134
56206
  }).partial();
56135
56207
  const optimizationSplitChunksOptions = strictObject({
56136
- cacheGroups: record(schemas_string(), literal(false).or(optimizationSplitChunksCacheGroup)),
56208
+ cacheGroups: schemas_record(schemas_string(), literal(false).or(optimizationSplitChunksCacheGroup)),
56137
56209
  fallbackCacheGroup: strictObject({
56138
56210
  chunks: optimizationSplitChunksChunks,
56139
56211
  minSize: numberOrInfinity,
@@ -56296,7 +56368,7 @@ const getRspackOptionsSchema = memoize(()=>{
56296
56368
  module: _instanceof(RegExp).optional()
56297
56369
  })).array();
56298
56370
  const profile = schemas_boolean();
56299
- const amd = literal(false).or(record(schemas_string(), any()));
56371
+ const amd = literal(false).or(schemas_record(schemas_string(), any()));
56300
56372
  const bail = schemas_boolean();
56301
56373
  const performance = strictObject({
56302
56374
  assetFilter: anyFunction,
@@ -56342,7 +56414,8 @@ const getRspackOptionsSchema = memoize(()=>{
56342
56414
  profile: profile,
56343
56415
  amd: amd,
56344
56416
  bail: bail,
56345
- performance: performance
56417
+ performance: performance,
56418
+ lazyCompilation: schemas_boolean().or(lazyCompilationOptions).optional()
56346
56419
  }).partial().check(externalUmdChecker);
56347
56420
  return rspackOptions;
56348
56421
  });
@@ -56894,7 +56967,7 @@ function transformSync(source, options) {
56894
56967
  const _options = JSON.stringify(options || {});
56895
56968
  return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
56896
56969
  }
56897
- const exports_rspackVersion = "1.4.12-canary-40c41ca5-20250806090917";
56970
+ const exports_rspackVersion = "1.4.12-canary-1a94ade3-20250814141828";
56898
56971
  const exports_version = "5.75.0";
56899
56972
  const exports_WebpackError = Error;
56900
56973
  const sources = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.3_patch_hash=b2a26650f08a2359d0a3cd81fa6fa272aa7441a28dd7e601792da5ed5d2b4aee/node_modules/webpack-sources/lib/index.js");
@@ -56980,7 +57053,8 @@ const exports_experiments = {
56980
57053
  sync: external_rspack_wasi_browser_js_.sync
56981
57054
  },
56982
57055
  CssChunkingPlugin: CssChunkingPlugin,
56983
- createNativePlugin: createNativePlugin
57056
+ createNativePlugin: createNativePlugin,
57057
+ VirtualModulesPlugin: VirtualModulesPlugin
56984
57058
  };
56985
57059
  var rspack_process = __webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");
56986
57060
  function createMultiCompiler(options) {