@rspack/core 1.0.0-beta.0 → 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/Compilation.d.ts +1 -1
  2. package/dist/Compiler.d.ts +11 -10
  3. package/dist/Compiler.js +14 -14
  4. package/dist/Module.d.ts +1 -0
  5. package/dist/Module.js +1 -0
  6. package/dist/NormalModule.d.ts +1 -0
  7. package/dist/NormalModule.js +1 -0
  8. package/dist/builtin-plugin/APIPlugin.d.ts +1 -1
  9. package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -1
  10. package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -1
  11. package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -1
  12. package/dist/builtin-plugin/BannerPlugin.d.ts +31 -31
  13. package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -1
  14. package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -1
  15. package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -1
  16. package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
  17. package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -1
  18. package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -1
  19. package/dist/builtin-plugin/DefinePlugin.d.ts +1 -1
  20. package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -1
  21. package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -1
  22. package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +1 -1
  23. package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
  24. package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
  25. package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -1
  26. package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
  27. package/dist/builtin-plugin/EntryPlugin.d.ts +3 -2
  28. package/dist/builtin-plugin/EntryPlugin.js +1 -0
  29. package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
  30. package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
  31. package/dist/builtin-plugin/ExternalsPlugin.d.ts +5 -5
  32. package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +1 -1
  33. package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
  34. package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
  35. package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +1 -1
  36. package/dist/builtin-plugin/HtmlRspackPlugin.d.ts +9 -9
  37. package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
  38. package/dist/builtin-plugin/IgnorePlugin.d.ts +1 -1
  39. package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
  40. package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
  41. package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
  42. package/dist/builtin-plugin/LightningCssMiminizerRspackPlugin.d.ts +4 -11
  43. package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -1
  44. package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -1
  45. package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -1
  46. package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
  47. package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -1
  48. package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -1
  49. package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -1
  50. package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +1 -1
  51. package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +1 -1
  52. package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
  53. package/dist/builtin-plugin/ProgressPlugin.d.ts +1 -1
  54. package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -1
  55. package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -1
  56. package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
  57. package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +1 -1
  58. package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
  59. package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
  60. package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +1 -1
  61. package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
  62. package/dist/builtin-plugin/SwcCssMinimizerPlugin.d.ts +1 -1
  63. package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -1
  64. package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
  65. package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +1 -1
  66. package/dist/builtin-plugin/base.d.ts +1 -1
  67. package/dist/builtin-plugin/css-extract/loader.d.ts +8 -3
  68. package/dist/builtin-plugin/css-extract/loader.js +24 -13
  69. package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +1 -1
  70. package/dist/config/adapter.js +15 -2
  71. package/dist/config/adapterRuleUse.js +3 -3
  72. package/dist/config/defaults.js +7 -10
  73. package/dist/config/normalization.d.ts +6 -3
  74. package/dist/config/normalization.js +2 -0
  75. package/dist/config/zod.d.ts +1224 -1055
  76. package/dist/config/zod.js +10 -1
  77. package/dist/container/ContainerReferencePlugin.d.ts +1 -1
  78. package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
  79. package/dist/exports.d.ts +1 -1
  80. package/dist/lib/AbstractMethodError.d.ts +12 -3
  81. package/dist/lib/AbstractMethodError.js +29 -21
  82. package/dist/lib/Cache.d.ts +40 -46
  83. package/dist/lib/Cache.js +43 -78
  84. package/dist/lib/CacheFacade.d.ts +119 -143
  85. package/dist/lib/CacheFacade.js +123 -124
  86. package/dist/lib/EntryOptionPlugin.d.ts +19 -2
  87. package/dist/lib/EntryOptionPlugin.js +22 -6
  88. package/dist/lib/EnvironmentPlugin.d.ts +17 -10
  89. package/dist/lib/EnvironmentPlugin.js +16 -15
  90. package/dist/lib/HookWebpackError.d.ts +27 -33
  91. package/dist/lib/HookWebpackError.js +33 -34
  92. package/dist/lib/IgnoreWarningsPlugin.d.ts +25 -0
  93. package/dist/lib/{ignoreWarningsPlugin.js → IgnoreWarningsPlugin.js} +17 -0
  94. package/dist/lib/LoaderOptionsPlugin.d.ts +18 -9
  95. package/dist/lib/LoaderOptionsPlugin.js +38 -14
  96. package/dist/lib/LoaderTargetPlugin.d.ts +17 -8
  97. package/dist/lib/LoaderTargetPlugin.js +17 -15
  98. package/dist/lib/ModuleFilenameHelpers.d.ts +10 -1
  99. package/dist/lib/ModuleFilenameHelpers.js +9 -0
  100. package/dist/lib/NormalModuleReplacementPlugin.d.ts +15 -5
  101. package/dist/lib/NormalModuleReplacementPlugin.js +15 -5
  102. package/dist/lib/WebpackError.d.ts +29 -22
  103. package/dist/lib/WebpackError.js +17 -29
  104. package/dist/lib/cache/getLazyHashedEtag.d.ts +24 -24
  105. package/dist/lib/cache/getLazyHashedEtag.js +20 -23
  106. package/dist/lib/cache/mergeEtags.d.ts +15 -9
  107. package/dist/lib/cache/mergeEtags.js +18 -11
  108. package/dist/lib/formatLocation.d.ts +13 -8
  109. package/dist/lib/formatLocation.js +17 -15
  110. package/dist/rspackOptionsApply.js +2 -2
  111. package/dist/stats/DefaultStatsFactoryPlugin.js +1 -1
  112. package/dist/util/comparators.d.ts +1 -1
  113. package/package.json +3 -3
  114. package/compiled/enhanced-resolve/index.js +0 -5566
  115. package/dist/lib/ignoreWarningsPlugin.d.ts +0 -7
@@ -14,7 +14,7 @@ export declare function create<T extends any[], R>(name: binding.BuiltinPluginNa
14
14
  new (...args: T): {
15
15
  name: binding.BuiltinPluginName;
16
16
  _args: T;
17
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
17
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
18
18
  raw(compiler: Compiler): binding.BuiltinPlugin;
19
19
  apply(compiler: Compiler): void;
20
20
  };
@@ -1,8 +1,8 @@
1
- import type { LoaderDefinition } from "../..";
1
+ import type { LoaderContext, LoaderDefinition } from "../..";
2
+ export declare const BASE_URI = "webpack://";
2
3
  export declare const MODULE_TYPE = "css/mini-extract";
3
4
  export declare const AUTO_PUBLIC_PATH = "__mini_css_extract_plugin_public_path_auto__";
4
- export declare const ABSOLUTE_PUBLIC_PATH = "webpack:///mini-css-extract-plugin/";
5
- export declare const BASE_URI = "webpack://";
5
+ export declare const ABSOLUTE_PUBLIC_PATH: string;
6
6
  export declare const SINGLE_DOT_PATH_SEGMENT = "__mini_css_extract_plugin_single_dot_path_segment__";
7
7
  export interface CssExtractRspackLoaderOptions {
8
8
  publicPath?: string | ((resourcePath: string, context: string) => string);
@@ -11,6 +11,11 @@ export interface CssExtractRspackLoaderOptions {
11
11
  layer?: boolean;
12
12
  defaultExport?: boolean;
13
13
  }
14
+ export declare function hotLoader(content: string, context: {
15
+ loaderContext: LoaderContext;
16
+ options?: CssExtractRspackLoaderOptions;
17
+ locals?: Record<string, string>;
18
+ }): string;
14
19
  declare const loader: LoaderDefinition;
15
20
  export declare const pitch: LoaderDefinition["pitch"];
16
21
  export default loader;
@@ -3,33 +3,44 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.pitch = exports.SINGLE_DOT_PATH_SEGMENT = exports.BASE_URI = exports.ABSOLUTE_PUBLIC_PATH = exports.AUTO_PUBLIC_PATH = exports.MODULE_TYPE = void 0;
6
+ exports.pitch = exports.hotLoader = exports.SINGLE_DOT_PATH_SEGMENT = exports.ABSOLUTE_PUBLIC_PATH = exports.AUTO_PUBLIC_PATH = exports.MODULE_TYPE = exports.BASE_URI = void 0;
7
7
  const node_path_1 = __importDefault(require("node:path"));
8
8
  const index_1 = require("./index");
9
9
  const loader_options_json_1 = __importDefault(require("./loader-options.json"));
10
10
  const utils_1 = require("./utils");
11
+ exports.BASE_URI = "webpack://";
11
12
  exports.MODULE_TYPE = "css/mini-extract";
12
13
  exports.AUTO_PUBLIC_PATH = "__mini_css_extract_plugin_public_path_auto__";
13
- exports.ABSOLUTE_PUBLIC_PATH = "webpack:///mini-css-extract-plugin/";
14
- exports.BASE_URI = "webpack://";
14
+ exports.ABSOLUTE_PUBLIC_PATH = exports.BASE_URI + "/mini-css-extract-plugin/";
15
15
  exports.SINGLE_DOT_PATH_SEGMENT = "__mini_css_extract_plugin_single_dot_path_segment__";
16
16
  const SERIALIZE_SEP = "__RSPACK_CSS_EXTRACT_SEP__";
17
17
  function hotLoader(content, context) {
18
- const accept = context.locals
19
- ? ""
20
- : "module.hot.accept(undefined, cssReload);";
18
+ const localsJsonString = JSON.stringify(JSON.stringify(context.locals));
21
19
  return `${content}
22
20
  if(module.hot) {
23
- // ${Date.now()}
24
- var cssReload = require(${(0, utils_1.stringifyRequest)(context.loaderContext, node_path_1.default.join(__dirname, "./hmr/hotModuleReplacement.js"))}).cssReload(module.id, ${JSON.stringify({
25
- ...context.options,
26
- locals: !!context.locals
27
- })});
28
- module.hot.dispose(cssReload);
29
- ${accept}
21
+ (function() {
22
+ var localsJsonString = ${localsJsonString};
23
+ // ${Date.now()}
24
+ var cssReload = require(${(0, utils_1.stringifyRequest)(context.loaderContext, node_path_1.default.join(__dirname, "hmr/hotModuleReplacement.js"))}).cssReload(module.id, ${JSON.stringify(context.options ?? {})});
25
+ // only invalidate when locals change
26
+ if (
27
+ module.hot.data &&
28
+ module.hot.data.value &&
29
+ module.hot.data.value !== localsJsonString
30
+ ) {
31
+ module.hot.invalidate();
32
+ } else {
33
+ module.hot.accept();
34
+ }
35
+ module.hot.dispose(function(data) {
36
+ data.value = localsJsonString;
37
+ cssReload();
38
+ });
39
+ })();
30
40
  }
31
41
  `;
32
42
  }
43
+ exports.hotLoader = hotLoader;
33
44
  const loader = function loader(content) {
34
45
  if (this._compiler &&
35
46
  this._compiler.options &&
@@ -17,7 +17,7 @@ export declare const BuiltinLazyCompilationPlugin: {
17
17
  data: string;
18
18
  client: string;
19
19
  }, cacheable: boolean, entries: boolean, imports: boolean, test?: RawRegex | ((m: JsModule) => boolean) | undefined];
20
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
20
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
21
21
  raw(compiler: import("../../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
22
22
  apply(compiler: import("../../Compiler").Compiler): void;
23
23
  };
@@ -139,6 +139,7 @@ function getRawOutput(output) {
139
139
  strictModuleErrorHandling: output.strictModuleErrorHandling,
140
140
  globalObject: output.globalObject,
141
141
  importFunctionName: output.importFunctionName,
142
+ importMetaName: output.importMetaName,
142
143
  iife: output.iife,
143
144
  module: output.module,
144
145
  wasmLoading: wasmLoading === false ? "false" : wasmLoading,
@@ -278,6 +279,9 @@ const getRawModuleRule = (rule, path, options, upperType) => {
278
279
  include: rule.include ? getRawRuleSetCondition(rule.include) : undefined,
279
280
  exclude: rule.exclude ? getRawRuleSetCondition(rule.exclude) : undefined,
280
281
  issuer: rule.issuer ? getRawRuleSetCondition(rule.issuer) : undefined,
282
+ issuerLayer: rule.issuerLayer
283
+ ? getRawRuleSetCondition(rule.issuerLayer)
284
+ : undefined,
281
285
  dependency: rule.dependency
282
286
  ? getRawRuleSetCondition(rule.dependency)
283
287
  : undefined,
@@ -287,6 +291,12 @@ const getRawModuleRule = (rule, path, options, upperType) => {
287
291
  getRawRuleSetCondition(v)
288
292
  ]))
289
293
  : undefined,
294
+ with: rule.with
295
+ ? Object.fromEntries(Object.entries(rule.with).map(([k, v]) => [
296
+ k,
297
+ getRawRuleSetCondition(v)
298
+ ]))
299
+ : undefined,
290
300
  resource: rule.resource ? getRawRuleSetCondition(rule.resource) : undefined,
291
301
  resourceQuery: rule.resourceQuery
292
302
  ? getRawRuleSetCondition(rule.resourceQuery)
@@ -301,6 +311,7 @@ const getRawModuleRule = (rule, path, options, upperType) => {
301
311
  ? funcUse
302
312
  : (0, adapterRuleUse_1.createRawModuleRuleUses)(rule.use ?? [], `${path}.use`, options),
303
313
  type: rule.type,
314
+ layer: rule.layer,
304
315
  parser: rule.parser
305
316
  ? getRawParserOptions(rule.parser, rule.type ?? upperType)
306
317
  : undefined,
@@ -458,6 +469,7 @@ function getRawJavascriptParserOptions(parser) {
458
469
  dynamicImportPreload: parser.dynamicImportPreload?.toString() ?? "false",
459
470
  dynamicImportPrefetch: parser.dynamicImportPrefetch?.toString() ?? "false",
460
471
  dynamicImportFetchPriority: parser.dynamicImportFetchPriority?.toString(),
472
+ importMeta: parser.importMeta ?? true,
461
473
  url: parser.url === false
462
474
  ? "false"
463
475
  : parser.url === "relative"
@@ -629,9 +641,10 @@ function getRawSnapshotOptions(_snapshot) {
629
641
  return {};
630
642
  }
631
643
  function getRawExperiments(experiments) {
632
- const { topLevelAwait, rspackFuture } = experiments;
633
- (0, node_assert_1.default)(!(0, util_1.isNil)(topLevelAwait) && !(0, util_1.isNil)(rspackFuture));
644
+ const { topLevelAwait, layers, rspackFuture } = experiments;
645
+ (0, node_assert_1.default)(!(0, util_1.isNil)(topLevelAwait) && !(0, util_1.isNil)(rspackFuture) && !(0, util_1.isNil)(layers));
634
646
  return {
647
+ layers,
635
648
  topLevelAwait,
636
649
  rspackFuture: getRawRspackFutureOptions(rspackFuture)
637
650
  };
@@ -30,12 +30,12 @@ const getLightningcssLoaderOptions = (o, _) => {
30
30
  o.targets = (0, lightningcss_1.browserslistToTargets)(browserslist(o.targets));
31
31
  }
32
32
  if (o.targets && Array.isArray(o.targets)) {
33
- o.targets = (0, lightningcss_1.browserslistToTargets)(o.targets);
33
+ o.targets = (0, lightningcss_1.browserslistToTargets)(browserslist(o.targets));
34
34
  }
35
- if (o.include) {
35
+ if (o.include && typeof o.include === "object") {
36
36
  o.include = (0, lightningcss_1.toFeatures)(o.include);
37
37
  }
38
- if (o.exclude) {
38
+ if (o.exclude && typeof o.exclude === "object") {
39
39
  o.exclude = (0, lightningcss_1.toFeatures)(o.exclude);
40
40
  }
41
41
  }
@@ -126,6 +126,7 @@ const applyExperimentsDefaults = (experiments) => {
126
126
  D(experiments, "lazyCompilation", false);
127
127
  D(experiments, "asyncWebAssembly", experiments.futureDefaults);
128
128
  D(experiments, "css", experiments.futureDefaults ? true : undefined);
129
+ D(experiments, "layers", false);
129
130
  D(experiments, "topLevelAwait", true);
130
131
  // IGNORE(experiments.rspackFuture): Rspack specific configuration
131
132
  D(experiments, "rspackFuture", {});
@@ -152,6 +153,7 @@ const applyJavascriptParserOptionsDefaults = (parserOptions, fallback) => {
152
153
  D(parserOptions, "strictExportPresence", fallback?.strictExportPresence ?? false);
153
154
  D(parserOptions, "worker", fallback?.worker ?? ["..."]);
154
155
  D(parserOptions, "overrideStrict", fallback?.overrideStrict ?? undefined);
156
+ D(parserOptions, "importMeta", fallback?.importMeta ?? true);
155
157
  };
156
158
  const applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties }) => {
157
159
  (0, assertNotNil_1.assertNotNill)(module.parser);
@@ -316,16 +318,10 @@ const applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties }
316
318
  type: "asset/resource"
317
319
  }
318
320
  ]
319
- }
320
- // {
321
- // assert: { type: "json" },
322
- // type: "json"
323
- // },
324
- // {
325
- // with: { type: "json" },
326
- // type: "json"
327
- // }
328
- );
321
+ }, {
322
+ with: { type: "json" },
323
+ type: "json"
324
+ });
329
325
  return rules;
330
326
  });
331
327
  };
@@ -530,6 +526,7 @@ const applyOutputDefaults = (output, { context, outputModule, targetProperties:
530
526
  return "self";
531
527
  });
532
528
  D(output, "importFunctionName", "import");
529
+ D(output, "importMetaName", "import.meta");
533
530
  // IGNORE(output.clean): The default value of `output.clean` in webpack is undefined, but it has the same effect as false.
534
531
  F(output, "clean", () => !!output.clean);
535
532
  D(output, "crossOriginLoading", false);
@@ -8,7 +8,7 @@
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
10
  import type { Compilation } from "../Compilation";
11
- import type { AssetModuleFilename, Bail, CacheOptions, ChunkFilename, ChunkLoading, ChunkLoadingGlobal, Clean, Context, CrossOriginLoading, CssChunkFilename, CssFilename, Dependencies, DevServer, DevTool, DevtoolFallbackModuleFilenameTemplate, DevtoolModuleFilenameTemplate, DevtoolNamespace, EnabledLibraryTypes, EnabledWasmLoadingTypes, EntryFilename, EntryRuntime, Environment, Externals, ExternalsPresets, ExternalsType, Filename, GeneratorOptionsByModuleType, GlobalObject, HashDigest, HashDigestLength, HashFunction, HashSalt, HotUpdateChunkFilename, HotUpdateGlobal, HotUpdateMainFilename, Iife, ImportFunctionName, InfrastructureLogging, LazyCompilationOptions, LibraryOptions, Loader, Mode, Name, NoParseOption, Node, Optimization, OutputModule, ParserOptionsByModuleType, Path, Performance, Plugins, Profile, PublicPath, Resolve, RspackFutureOptions, RspackOptions, RuleSetRules, ScriptType, SnapshotOptions, SourceMapFilename, StatsValue, StrictModuleErrorHandling, Target, TrustedTypes, UniqueName, WasmLoading, Watch, WatchOptions, WebassemblyModuleFilename, WorkerPublicPath } from "./zod";
11
+ import type { AssetModuleFilename, AsyncChunks, Bail, BaseUri, CacheOptions, ChunkFilename, ChunkLoading, ChunkLoadingGlobal, Clean, Context, CrossOriginLoading, CssChunkFilename, CssFilename, Dependencies, DevServer, DevTool, DevtoolFallbackModuleFilenameTemplate, DevtoolModuleFilenameTemplate, DevtoolNamespace, EnabledLibraryTypes, EnabledWasmLoadingTypes, EntryFilename, EntryRuntime, Environment, Externals, ExternalsPresets, ExternalsType, Filename, GeneratorOptionsByModuleType, GlobalObject, HashDigest, HashDigestLength, HashFunction, HashSalt, HotUpdateChunkFilename, HotUpdateGlobal, HotUpdateMainFilename, Iife, ImportFunctionName, ImportMetaName, InfrastructureLogging, Layer, LazyCompilationOptions, LibraryOptions, Loader, Mode, Name, NoParseOption, Node, Optimization, OutputModule, ParserOptionsByModuleType, Path, Performance, Plugins, Profile, PublicPath, Resolve, RspackFutureOptions, RspackOptions, RuleSetRules, ScriptType, SnapshotOptions, SourceMapFilename, StatsValue, StrictModuleErrorHandling, Target, TrustedTypes, UniqueName, WasmLoading, Watch, WatchOptions, WebassemblyModuleFilename, WorkerPublicPath } from "./zod";
12
12
  export declare const getNormalizedRspackOptions: (config: RspackOptions) => RspackOptionsNormalized;
13
13
  export type EntryDynamicNormalized = () => Promise<EntryStaticNormalized>;
14
14
  export type EntryNormalized = EntryDynamicNormalized | EntryStaticNormalized;
@@ -19,12 +19,13 @@ export interface EntryDescriptionNormalized {
19
19
  import?: string[];
20
20
  runtime?: EntryRuntime;
21
21
  chunkLoading?: ChunkLoading;
22
- asyncChunks?: boolean;
22
+ asyncChunks?: AsyncChunks;
23
23
  publicPath?: PublicPath;
24
- baseUri?: string;
24
+ baseUri?: BaseUri;
25
25
  filename?: EntryFilename;
26
26
  library?: LibraryOptions;
27
27
  dependOn?: string[];
28
+ layer?: Layer;
28
29
  }
29
30
  export interface OutputNormalized {
30
31
  path?: Path;
@@ -48,6 +49,7 @@ export interface OutputNormalized {
48
49
  strictModuleErrorHandling?: StrictModuleErrorHandling;
49
50
  globalObject?: GlobalObject;
50
51
  importFunctionName?: ImportFunctionName;
52
+ importMetaName?: ImportMetaName;
51
53
  iife?: Iife;
52
54
  wasmLoading?: WasmLoading;
53
55
  enabledWasmLoadingTypes?: EnabledWasmLoadingTypes;
@@ -86,6 +88,7 @@ export interface ExperimentsNormalized {
86
88
  outputModule?: boolean;
87
89
  topLevelAwait?: boolean;
88
90
  css?: boolean;
91
+ layers?: boolean;
89
92
  futureDefaults?: boolean;
90
93
  rspackFuture?: RspackFutureOptions;
91
94
  }
@@ -75,6 +75,7 @@ const getNormalizedRspackOptions = (config) => {
75
75
  : ["..."],
76
76
  globalObject: output.globalObject,
77
77
  importFunctionName: output.importFunctionName,
78
+ importMetaName: output.importMetaName,
78
79
  iife: output.iife,
79
80
  module: output.module,
80
81
  sourceMapFilename: output.sourceMapFilename,
@@ -240,6 +241,7 @@ const getNormalizedEntryStatic = (entry) => {
240
241
  asyncChunks: value.asyncChunks,
241
242
  filename: value.filename,
242
243
  library: value.library,
244
+ layer: value.layer,
243
245
  dependOn: Array.isArray(value.dependOn)
244
246
  ? value.dependOn
245
247
  : value.dependOn