@rspack/core 0.7.0-beta.1-canary-2fe00c8-20240521070203 → 0.7.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,20 @@
1
+ Copyright JS Foundation and other contributors
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ 'Software'), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1 @@
1
+ {"name":"enhanced-resolve","author":"Tobias Koppers @sokra","version":"5.12.0","license":"MIT","types":"index.d.ts","type":"commonjs"}
@@ -149,10 +149,10 @@ module.exports = function (glob, opts) {
149
149
 
150
150
 
151
151
  const EventEmitter = (__nccwpck_require__(361).EventEmitter);
152
- const fs = __nccwpck_require__(453);
152
+ const fs = __nccwpck_require__(344);
153
153
  const path = __nccwpck_require__(17);
154
154
 
155
- const watchEventSource = __nccwpck_require__(344);
155
+ const watchEventSource = __nccwpck_require__(511);
156
156
 
157
157
  const EXISTANCE_ONLY_TIME_ENTRY = Object.freeze({});
158
158
 
@@ -1254,7 +1254,7 @@ module.exports = (plan, limit) => {
1254
1254
 
1255
1255
  /***/ }),
1256
1256
 
1257
- /***/ 344:
1257
+ /***/ 511:
1258
1258
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
1259
1259
 
1260
1260
  "use strict";
@@ -1609,7 +1609,7 @@ const getWatcherManager = __nccwpck_require__(399);
1609
1609
  const LinkResolver = __nccwpck_require__(669);
1610
1610
  const EventEmitter = (__nccwpck_require__(361).EventEmitter);
1611
1611
  const globToRegExp = __nccwpck_require__(140);
1612
- const watchEventSource = __nccwpck_require__(344);
1612
+ const watchEventSource = __nccwpck_require__(511);
1613
1613
 
1614
1614
  const EMPTY_ARRAY = [];
1615
1615
  const EMPTY_OPTIONS = {};
@@ -1986,11 +1986,11 @@ module.exports = Watchpack;
1986
1986
 
1987
1987
  /***/ }),
1988
1988
 
1989
- /***/ 453:
1989
+ /***/ 344:
1990
1990
  /***/ ((module) => {
1991
1991
 
1992
1992
  "use strict";
1993
- module.exports = require("../graceful-fs");
1993
+ module.exports = require("../graceful-fs/index.js");
1994
1994
 
1995
1995
  /***/ }),
1996
1996
 
package/dist/Compiler.js CHANGED
@@ -391,9 +391,7 @@ class Compiler {
391
391
  output: {
392
392
  ...this.options.output,
393
393
  ...outputOptions
394
- },
395
- // TODO: check why we need to have builtins otherwise this.#instance will fail to initialize Rspack
396
- builtins: this.options.builtins
394
+ }
397
395
  };
398
396
  (0, defaults_1.applyRspackOptionsDefaults)(options);
399
397
  const childCompiler = new Compiler(this.context, options);
@@ -565,8 +563,6 @@ _Compiler_instance = new WeakMap(), _Compiler_initial = new WeakMap(), _Compiler
565
563
  return callback(null, __classPrivateFieldGet(this, _Compiler_instance, "f"));
566
564
  }
567
565
  const options = this.options;
568
- // TODO: remove this when drop support for builtins options
569
- options.builtins = (0, builtin_plugin_1.deprecated_resolveBuiltins)(options.builtins, options);
570
566
  const rawOptions = (0, config_1.getRawOptions)(options, this);
571
567
  const instanceBinding = require("@rspack/binding");
572
568
  __classPrivateFieldSet(this, _Compiler_registers, {
@@ -699,12 +695,11 @@ _Compiler_instance = new WeakMap(), _Compiler_initial = new WeakMap(), _Compiler
699
695
  return queried.promise(bindingData);
700
696
  }),
701
697
  registerContextModuleFactoryAfterResolveTaps: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_createHookRegisterTaps).call(this, binding.RegisterJsTapKind.ContextModuleFactoryAfterResolve, () => __classPrivateFieldGet(this, _Compiler_compilationParams, "f").contextModuleFactory.hooks.afterResolve, queried => async (bindingData) => {
702
- var _a;
703
698
  const data = bindingData
704
699
  ? ({
705
700
  resource: bindingData.resource,
706
701
  regExp: bindingData.regExp
707
- ? new RegExp(bindingData.regExp)
702
+ ? new RegExp(bindingData.regExp.source, bindingData.regExp.flags)
708
703
  : undefined,
709
704
  request: bindingData.request,
710
705
  context: bindingData.context,
@@ -718,7 +713,12 @@ _Compiler_instance = new WeakMap(), _Compiler_initial = new WeakMap(), _Compiler
718
713
  resource: ret.resource,
719
714
  context: ret.context,
720
715
  request: ret.request,
721
- regExp: (_a = ret.regExp) === null || _a === void 0 ? void 0 : _a.toString()
716
+ regExp: ret.regExp
717
+ ? {
718
+ source: ret.regExp.source,
719
+ flags: ret.regExp.flags
720
+ }
721
+ : undefined
722
722
  })
723
723
  : false;
724
724
  return result;
@@ -31,8 +31,8 @@ type ResolveOptionsWithDependencyType = WebpackResolveOptions & {
31
31
  resolveToContext?: boolean;
32
32
  };
33
33
  import { SyncHook } from "tapable";
34
- type Resolver = import("enhanced-resolve").Resolver;
35
- type ResolveOptions = import("enhanced-resolve").ResolveOptions;
34
+ type Resolver = import("../compiled/enhanced-resolve").Resolver;
35
+ type ResolveOptions = import("../compiled/enhanced-resolve").ResolveOptions;
36
36
  type ResolverCache = {
37
37
  direct: WeakMap<Object, ResolverWithOptions>;
38
38
  stringified: Map<string, ResolverWithOptions>;
@@ -8,11 +8,11 @@
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
10
  "use strict";
11
- const Factory = require("enhanced-resolve").ResolverFactory;
11
+ const Factory = require("../compiled/enhanced-resolve").ResolverFactory;
12
12
  const { HookMap, SyncHook, SyncWaterfallHook } = require("tapable");
13
13
  const { cachedCleverMerge, removeOperations, resolveByProperty } = require("./util/cleverMerge");
14
- /** @typedef {import("enhanced-resolve").ResolveOptions} ResolveOptions */
15
- /** @typedef {import("enhanced-resolve").Resolver} Resolver */
14
+ /** @typedef {import("../compiled/enhanced-resolve").ResolveOptions} ResolveOptions */
15
+ /** @typedef {import("../compiled/enhanced-resolve").Resolver} Resolver */
16
16
  // /** @typedef {import("../declarations/WebpackOptions").ResolveOptions} WebpackResolveOptions */
17
17
  // /** @typedef {import("../declarations/WebpackOptions").ResolvePluginInstance} ResolvePluginInstance */
18
18
  /** @typedef {any} WebpackResolveOptions */
@@ -48,14 +48,6 @@ const pitch = function (request, _, data) {
48
48
  this.emitWarning(e);
49
49
  return;
50
50
  }
51
- if (this._compiler &&
52
- this._compiler.options &&
53
- this._compiler.options.experiments &&
54
- this._compiler.options.experiments.rspackFuture &&
55
- this._compiler.options.experiments.rspackFuture.newTreeshaking === false) {
56
- this.emitError(new Error("Cannot use CssExtractRspackPlugin without newTreeshaking"));
57
- return;
58
- }
59
51
  const options = this.getOptions(loader_options_json_1.default);
60
52
  const emit = typeof options.emit !== "undefined" ? options.emit : true;
61
53
  const callback = this.async();
@@ -1,4 +1,4 @@
1
- import { BuiltinPluginName, JsModule, RawRegexMatcher } from "@rspack/binding";
1
+ import { BuiltinPluginName, JsModule, RawRegex } from "@rspack/binding";
2
2
  export declare const BuiltinLazyCompilationPlugin: {
3
3
  new (module: (args: {
4
4
  module: string;
@@ -7,7 +7,7 @@ export declare const BuiltinLazyCompilationPlugin: {
7
7
  active: boolean;
8
8
  data: string;
9
9
  client: string;
10
- }, cacheable: boolean, entries: boolean, imports: boolean, test?: RawRegexMatcher | ((m: JsModule) => boolean) | undefined): {
10
+ }, cacheable: boolean, entries: boolean, imports: boolean, test?: RawRegex | ((m: JsModule) => boolean) | undefined): {
11
11
  name: BuiltinPluginName;
12
12
  _options: {
13
13
  module: (args: {
@@ -21,7 +21,7 @@ export declare const BuiltinLazyCompilationPlugin: {
21
21
  cacheable: boolean;
22
22
  imports: boolean;
23
23
  entries: boolean;
24
- test: RawRegexMatcher | ((m: JsModule) => boolean) | undefined;
24
+ test: RawRegex | ((m: JsModule) => boolean) | undefined;
25
25
  };
26
26
  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;
27
27
  raw(): import("@rspack/binding").BuiltinPlugin;
@@ -1,13 +1,13 @@
1
- import { JsModule, RawRegexMatcher } from "@rspack/binding";
1
+ import { JsModule, RawRegex } from "@rspack/binding";
2
2
  import type { Compiler } from "../..";
3
3
  import { LazyCompilationDefaultBackendOptions } from "./backend";
4
4
  export default class LazyCompilationPlugin {
5
5
  cacheable: boolean;
6
6
  entries: boolean;
7
7
  imports: boolean;
8
- test?: RawRegexMatcher | ((m: JsModule) => boolean);
8
+ test?: RawRegex | ((m: JsModule) => boolean);
9
9
  backend?: LazyCompilationDefaultBackendOptions;
10
- constructor(cacheable: boolean, entries: boolean, imports: boolean, test?: RawRegexMatcher | ((m: JsModule) => boolean), backend?: LazyCompilationDefaultBackendOptions);
10
+ constructor(cacheable: boolean, entries: boolean, imports: boolean, test?: RawRegex | ((m: JsModule) => boolean), backend?: LazyCompilationDefaultBackendOptions);
11
11
  apply(compiler: Compiler): void;
12
12
  }
13
13
  export { LazyCompilationPlugin };
@@ -49,9 +49,7 @@ const getRawOptions = (options, compiler) => {
49
49
  // SAFETY: applied default value in `applyRspackOptionsDefaults`.
50
50
  profile: options.profile,
51
51
  // SAFETY: applied default value in `applyRspackOptionsDefaults`.
52
- bail: options.bail,
53
- // TODO: remove this
54
- builtins: options.builtins
52
+ bail: options.bail
55
53
  };
56
54
  };
57
55
  exports.getRawOptions = getRawOptions;
@@ -596,25 +594,8 @@ function getRawOptimization(optimization) {
596
594
  mangleExports: String(optimization.mangleExports)
597
595
  };
598
596
  }
599
- function getRawSnapshotOptions(snapshot) {
600
- const { resolve, module } = snapshot;
601
- (0, assert_1.default)(!(0, util_1.isNil)(resolve) && !(0, util_1.isNil)(module));
602
- const { timestamp: resolveTimestamp, hash: resolveHash } = resolve;
603
- const { timestamp: moduleTimestamp, hash: moduleHash } = module;
604
- (0, assert_1.default)(!(0, util_1.isNil)(resolveTimestamp) &&
605
- !(0, util_1.isNil)(resolveHash) &&
606
- !(0, util_1.isNil)(moduleTimestamp) &&
607
- !(0, util_1.isNil)(moduleHash));
608
- return {
609
- resolve: {
610
- timestamp: resolveTimestamp,
611
- hash: resolveHash
612
- },
613
- module: {
614
- timestamp: moduleTimestamp,
615
- hash: moduleHash
616
- }
617
- };
597
+ function getRawSnapshotOptions(_snapshot) {
598
+ return {};
618
599
  }
619
600
  function getRawExperiments(experiments) {
620
601
  const { topLevelAwait, rspackFuture } = experiments;
@@ -624,11 +605,8 @@ function getRawExperiments(experiments) {
624
605
  rspackFuture: getRawRspackFutureOptions(rspackFuture)
625
606
  };
626
607
  }
627
- function getRawRspackFutureOptions(future) {
628
- (0, assert_1.default)(!(0, util_1.isNil)(future.newTreeshaking));
629
- return {
630
- newTreeshaking: future.newTreeshaking
631
- };
608
+ function getRawRspackFutureOptions(_future) {
609
+ return {};
632
610
  }
633
611
  function getRawNode(node) {
634
612
  if (node === false) {
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import type { JsAssetInfo, JsLoaderContext, RawModuleRuleUse, RawOptions } from "@rspack/binding";
3
- import { ResolveRequest } from "enhanced-resolve";
3
+ import { ResolveRequest } from "../../compiled/enhanced-resolve";
4
4
  import { Compiler } from "../Compiler";
5
5
  import { Logger } from "../logging/Logger";
6
6
  import Hash = require("../util/hash");
@@ -125,7 +125,6 @@ const applyExperimentsDefaults = (experiments, { cache }) => {
125
125
  D(experiments, "topLevelAwait", true);
126
126
  D(experiments, "rspackFuture", {});
127
127
  if (typeof experiments.rspackFuture === "object") {
128
- D(experiments.rspackFuture, "newTreeshaking", true);
129
128
  D(experiments.rspackFuture, "bundlerInfo", {});
130
129
  if (typeof experiments.rspackFuture.bundlerInfo === "object") {
131
130
  D(experiments.rspackFuture.bundlerInfo, "version", require("../../package.json").version);
@@ -133,26 +132,7 @@ const applyExperimentsDefaults = (experiments, { cache }) => {
133
132
  }
134
133
  }
135
134
  };
136
- const applySnapshotDefaults = (snapshot, { production }) => {
137
- if (typeof snapshot.module === "object") {
138
- D(snapshot.module, "timestamp", false);
139
- D(snapshot.module, "hash", false);
140
- }
141
- else {
142
- F(snapshot, "module", () => production
143
- ? { timestamp: true, hash: true }
144
- : { timestamp: true, hash: false });
145
- }
146
- if (typeof snapshot.resolve === "object") {
147
- D(snapshot.resolve, "timestamp", false);
148
- D(snapshot.resolve, "hash", false);
149
- }
150
- else {
151
- F(snapshot, "resolve", () => production
152
- ? { timestamp: true, hash: true }
153
- : { timestamp: true, hash: false });
154
- }
155
- };
135
+ const applySnapshotDefaults = (_snapshot, _env) => { };
156
136
  const applyJavascriptParserOptionsDefaults = (parserOptions, fallback) => {
157
137
  var _a, _b, _c, _d, _e, _f;
158
138
  D(parserOptions, "dynamicImportMode", (_a = fallback === null || fallback === void 0 ? void 0 : fallback.dynamicImportMode) !== null && _a !== void 0 ? _a : "lazy");
@@ -769,6 +749,7 @@ const getResolveDefaults = ({ context, targetProperties, mode, css }) => {
769
749
  exportsFields: ["exports"],
770
750
  roots: [context],
771
751
  mainFields: ["main"],
752
+ importsFields: ["imports"],
772
753
  byDependency: {
773
754
  wasm: esmDeps(),
774
755
  esm: esmDeps(),
@@ -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, Builtins, 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, Mode, Name, Node, NoParseOption, 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, 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, Mode, Name, Node, NoParseOption, 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;
@@ -123,5 +123,4 @@ export interface RspackOptionsNormalized {
123
123
  performance?: Performance;
124
124
  profile?: Profile;
125
125
  bail?: Bail;
126
- builtins: Builtins;
127
126
  }
@@ -144,16 +144,7 @@ const getNormalizedRspackOptions = (config) => {
144
144
  node: nestedConfig(config.node, node => node && {
145
145
  ...node
146
146
  }),
147
- snapshot: nestedConfig(config.snapshot, snapshot => ({
148
- resolve: optionalNestedConfig(snapshot.resolve, resolve => ({
149
- timestamp: resolve.timestamp,
150
- hash: resolve.hash
151
- })),
152
- module: optionalNestedConfig(snapshot.module, module => ({
153
- timestamp: module.timestamp,
154
- hash: module.hash
155
- }))
156
- })),
147
+ snapshot: nestedConfig(config.snapshot, _snapshot => ({})),
157
148
  cache: optionalNestedConfig(config.cache, cache => cache),
158
149
  stats: nestedConfig(config.stats, stats => {
159
150
  if (stats === false) {
@@ -198,10 +189,7 @@ const getNormalizedRspackOptions = (config) => {
198
189
  watchOptions: cloneObject(config.watchOptions),
199
190
  devServer: config.devServer,
200
191
  profile: config.profile,
201
- bail: config.bail,
202
- builtins: nestedConfig(config.builtins, builtins => ({
203
- ...builtins
204
- }))
192
+ bail: config.bail
205
193
  };
206
194
  };
207
195
  exports.getNormalizedRspackOptions = getNormalizedRspackOptions;
@@ -3,7 +3,6 @@ import { JsAssetInfo, RawFuncUseCtx } from "@rspack/binding";
3
3
  import type * as webpackDevServer from "webpack-dev-server";
4
4
  import { z } from "../../compiled/zod";
5
5
  import { Compilation, Compiler } from "..";
6
- import type { Builtins as BuiltinsType } from "../builtin-plugin";
7
6
  import { Chunk } from "../Chunk";
8
7
  import { Module } from "../Module";
9
8
  declare const name: z.ZodString;
@@ -3748,46 +3747,7 @@ declare const node: z.ZodUnion<[z.ZodLiteral<false>, z.ZodObject<{
3748
3747
  global?: boolean | "warn" | undefined;
3749
3748
  }>]>;
3750
3749
  export type Node = z.infer<typeof node>;
3751
- declare const snapshotOptions: z.ZodObject<{
3752
- module: z.ZodOptional<z.ZodObject<{
3753
- hash: z.ZodOptional<z.ZodBoolean>;
3754
- timestamp: z.ZodOptional<z.ZodBoolean>;
3755
- }, "strict", z.ZodTypeAny, {
3756
- hash?: boolean | undefined;
3757
- timestamp?: boolean | undefined;
3758
- }, {
3759
- hash?: boolean | undefined;
3760
- timestamp?: boolean | undefined;
3761
- }>>;
3762
- resolve: z.ZodOptional<z.ZodObject<{
3763
- hash: z.ZodOptional<z.ZodBoolean>;
3764
- timestamp: z.ZodOptional<z.ZodBoolean>;
3765
- }, "strict", z.ZodTypeAny, {
3766
- hash?: boolean | undefined;
3767
- timestamp?: boolean | undefined;
3768
- }, {
3769
- hash?: boolean | undefined;
3770
- timestamp?: boolean | undefined;
3771
- }>>;
3772
- }, "strict", z.ZodTypeAny, {
3773
- module?: {
3774
- hash?: boolean | undefined;
3775
- timestamp?: boolean | undefined;
3776
- } | undefined;
3777
- resolve?: {
3778
- hash?: boolean | undefined;
3779
- timestamp?: boolean | undefined;
3780
- } | undefined;
3781
- }, {
3782
- module?: {
3783
- hash?: boolean | undefined;
3784
- timestamp?: boolean | undefined;
3785
- } | undefined;
3786
- resolve?: {
3787
- hash?: boolean | undefined;
3788
- timestamp?: boolean | undefined;
3789
- } | undefined;
3790
- }>;
3750
+ declare const snapshotOptions: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
3791
3751
  export type SnapshotOptions = z.infer<typeof snapshotOptions>;
3792
3752
  declare const cacheOptions: z.ZodBoolean;
3793
3753
  export type CacheOptions = z.infer<typeof cacheOptions>;
@@ -4582,7 +4542,6 @@ declare const optimization: z.ZodObject<{
4582
4542
  }>;
4583
4543
  export type Optimization = z.infer<typeof optimization>;
4584
4544
  declare const rspackFutureOptions: z.ZodObject<{
4585
- newTreeshaking: z.ZodOptional<z.ZodBoolean>;
4586
4545
  bundlerInfo: z.ZodOptional<z.ZodObject<{
4587
4546
  version: z.ZodOptional<z.ZodString>;
4588
4547
  force: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEnum<["version"]>, "many">]>>;
@@ -4594,13 +4553,11 @@ declare const rspackFutureOptions: z.ZodObject<{
4594
4553
  force?: boolean | "version"[] | undefined;
4595
4554
  }>>;
4596
4555
  }, "strict", z.ZodTypeAny, {
4597
- newTreeshaking?: boolean | undefined;
4598
4556
  bundlerInfo?: {
4599
4557
  version?: string | undefined;
4600
4558
  force?: boolean | "version"[] | undefined;
4601
4559
  } | undefined;
4602
4560
  }, {
4603
- newTreeshaking?: boolean | undefined;
4604
4561
  bundlerInfo?: {
4605
4562
  version?: string | undefined;
4606
4563
  force?: boolean | "version"[] | undefined;
@@ -4641,7 +4598,6 @@ declare const experiments: z.ZodObject<{
4641
4598
  css: z.ZodOptional<z.ZodBoolean>;
4642
4599
  futureDefaults: z.ZodOptional<z.ZodBoolean>;
4643
4600
  rspackFuture: z.ZodOptional<z.ZodObject<{
4644
- newTreeshaking: z.ZodOptional<z.ZodBoolean>;
4645
4601
  bundlerInfo: z.ZodOptional<z.ZodObject<{
4646
4602
  version: z.ZodOptional<z.ZodString>;
4647
4603
  force: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEnum<["version"]>, "many">]>>;
@@ -4653,13 +4609,11 @@ declare const experiments: z.ZodObject<{
4653
4609
  force?: boolean | "version"[] | undefined;
4654
4610
  }>>;
4655
4611
  }, "strict", z.ZodTypeAny, {
4656
- newTreeshaking?: boolean | undefined;
4657
4612
  bundlerInfo?: {
4658
4613
  version?: string | undefined;
4659
4614
  force?: boolean | "version"[] | undefined;
4660
4615
  } | undefined;
4661
4616
  }, {
4662
- newTreeshaking?: boolean | undefined;
4663
4617
  bundlerInfo?: {
4664
4618
  version?: string | undefined;
4665
4619
  force?: boolean | "version"[] | undefined;
@@ -4677,7 +4631,6 @@ declare const experiments: z.ZodObject<{
4677
4631
  css?: boolean | undefined;
4678
4632
  futureDefaults?: boolean | undefined;
4679
4633
  rspackFuture?: {
4680
- newTreeshaking?: boolean | undefined;
4681
4634
  bundlerInfo?: {
4682
4635
  version?: string | undefined;
4683
4636
  force?: boolean | "version"[] | undefined;
@@ -4695,7 +4648,6 @@ declare const experiments: z.ZodObject<{
4695
4648
  css?: boolean | undefined;
4696
4649
  futureDefaults?: boolean | undefined;
4697
4650
  rspackFuture?: {
4698
- newTreeshaking?: boolean | undefined;
4699
4651
  bundlerInfo?: {
4700
4652
  version?: string | undefined;
4701
4653
  force?: boolean | "version"[] | undefined;
@@ -4750,8 +4702,6 @@ declare const performance: z.ZodUnion<[z.ZodObject<{
4750
4702
  maxEntrypointSize?: number | undefined;
4751
4703
  }>, z.ZodLiteral<false>]>;
4752
4704
  export type Performance = z.infer<typeof performance>;
4753
- declare const builtins: z.ZodType<BuiltinsType, z.ZodTypeDef, BuiltinsType>;
4754
- export type Builtins = z.infer<typeof builtins>;
4755
4705
  export declare const rspackOptions: z.ZodObject<{
4756
4706
  name: z.ZodOptional<z.ZodString>;
4757
4707
  dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
@@ -5419,7 +5369,6 @@ export declare const rspackOptions: z.ZodObject<{
5419
5369
  css: z.ZodOptional<z.ZodBoolean>;
5420
5370
  futureDefaults: z.ZodOptional<z.ZodBoolean>;
5421
5371
  rspackFuture: z.ZodOptional<z.ZodObject<{
5422
- newTreeshaking: z.ZodOptional<z.ZodBoolean>;
5423
5372
  bundlerInfo: z.ZodOptional<z.ZodObject<{
5424
5373
  version: z.ZodOptional<z.ZodString>;
5425
5374
  force: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEnum<["version"]>, "many">]>>;
@@ -5431,13 +5380,11 @@ export declare const rspackOptions: z.ZodObject<{
5431
5380
  force?: boolean | "version"[] | undefined;
5432
5381
  }>>;
5433
5382
  }, "strict", z.ZodTypeAny, {
5434
- newTreeshaking?: boolean | undefined;
5435
5383
  bundlerInfo?: {
5436
5384
  version?: string | undefined;
5437
5385
  force?: boolean | "version"[] | undefined;
5438
5386
  } | undefined;
5439
5387
  }, {
5440
- newTreeshaking?: boolean | undefined;
5441
5388
  bundlerInfo?: {
5442
5389
  version?: string | undefined;
5443
5390
  force?: boolean | "version"[] | undefined;
@@ -5455,7 +5402,6 @@ export declare const rspackOptions: z.ZodObject<{
5455
5402
  css?: boolean | undefined;
5456
5403
  futureDefaults?: boolean | undefined;
5457
5404
  rspackFuture?: {
5458
- newTreeshaking?: boolean | undefined;
5459
5405
  bundlerInfo?: {
5460
5406
  version?: string | undefined;
5461
5407
  force?: boolean | "version"[] | undefined;
@@ -5473,7 +5419,6 @@ export declare const rspackOptions: z.ZodObject<{
5473
5419
  css?: boolean | undefined;
5474
5420
  futureDefaults?: boolean | undefined;
5475
5421
  rspackFuture?: {
5476
- newTreeshaking?: boolean | undefined;
5477
5422
  bundlerInfo?: {
5478
5423
  version?: string | undefined;
5479
5424
  force?: boolean | "version"[] | undefined;
@@ -5723,46 +5668,7 @@ export declare const rspackOptions: z.ZodObject<{
5723
5668
  optimizationBailout?: boolean | undefined;
5724
5669
  orphanModules?: boolean | undefined;
5725
5670
  }>]>>;
5726
- snapshot: z.ZodOptional<z.ZodObject<{
5727
- module: z.ZodOptional<z.ZodObject<{
5728
- hash: z.ZodOptional<z.ZodBoolean>;
5729
- timestamp: z.ZodOptional<z.ZodBoolean>;
5730
- }, "strict", z.ZodTypeAny, {
5731
- hash?: boolean | undefined;
5732
- timestamp?: boolean | undefined;
5733
- }, {
5734
- hash?: boolean | undefined;
5735
- timestamp?: boolean | undefined;
5736
- }>>;
5737
- resolve: z.ZodOptional<z.ZodObject<{
5738
- hash: z.ZodOptional<z.ZodBoolean>;
5739
- timestamp: z.ZodOptional<z.ZodBoolean>;
5740
- }, "strict", z.ZodTypeAny, {
5741
- hash?: boolean | undefined;
5742
- timestamp?: boolean | undefined;
5743
- }, {
5744
- hash?: boolean | undefined;
5745
- timestamp?: boolean | undefined;
5746
- }>>;
5747
- }, "strict", z.ZodTypeAny, {
5748
- module?: {
5749
- hash?: boolean | undefined;
5750
- timestamp?: boolean | undefined;
5751
- } | undefined;
5752
- resolve?: {
5753
- hash?: boolean | undefined;
5754
- timestamp?: boolean | undefined;
5755
- } | undefined;
5756
- }, {
5757
- module?: {
5758
- hash?: boolean | undefined;
5759
- timestamp?: boolean | undefined;
5760
- } | undefined;
5761
- resolve?: {
5762
- hash?: boolean | undefined;
5763
- timestamp?: boolean | undefined;
5764
- } | undefined;
5765
- }>>;
5671
+ snapshot: z.ZodOptional<z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>>;
5766
5672
  optimization: z.ZodOptional<z.ZodObject<{
5767
5673
  moduleIds: z.ZodOptional<z.ZodEnum<["named", "deterministic"]>>;
5768
5674
  chunkIds: z.ZodOptional<z.ZodEnum<["named", "deterministic"]>>;
@@ -6089,7 +5995,6 @@ export declare const rspackOptions: z.ZodObject<{
6089
5995
  resolveLoader: z.ZodOptional<z.ZodType<ResolveOptions, z.ZodTypeDef, ResolveOptions>>;
6090
5996
  plugins: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodType<RspackPluginInstance, z.ZodTypeDef, RspackPluginInstance>, z.ZodType<RspackPluginFunction, z.ZodTypeDef, RspackPluginFunction>, z.ZodUnion<[z.ZodLiteral<false>, z.ZodLiteral<0>, z.ZodLiteral<"">, z.ZodNull, z.ZodUndefined]>]>, "many">>;
6091
5997
  devServer: z.ZodOptional<z.ZodType<DevServer, z.ZodTypeDef, DevServer>>;
6092
- builtins: z.ZodOptional<z.ZodType<BuiltinsType, z.ZodTypeDef, BuiltinsType>>;
6093
5998
  module: z.ZodOptional<z.ZodObject<{
6094
5999
  defaultRules: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"...">, z.ZodType<RuleSetRule, z.ZodTypeDef, RuleSetRule>]>, z.ZodUnion<[z.ZodLiteral<false>, z.ZodLiteral<0>, z.ZodLiteral<"">, z.ZodNull, z.ZodUndefined]>]>, "many">>;
6095
6000
  rules: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"...">, z.ZodType<RuleSetRule, z.ZodTypeDef, RuleSetRule>]>, z.ZodUnion<[z.ZodLiteral<false>, z.ZodLiteral<0>, z.ZodLiteral<"">, z.ZodNull, z.ZodUndefined]>]>, "many">>;
@@ -6918,7 +6823,6 @@ export declare const rspackOptions: z.ZodObject<{
6918
6823
  css?: boolean | undefined;
6919
6824
  futureDefaults?: boolean | undefined;
6920
6825
  rspackFuture?: {
6921
- newTreeshaking?: boolean | undefined;
6922
6826
  bundlerInfo?: {
6923
6827
  version?: string | undefined;
6924
6828
  force?: boolean | "version"[] | undefined;
@@ -7014,16 +6918,7 @@ export declare const rspackOptions: z.ZodObject<{
7014
6918
  optimizationBailout?: boolean | undefined;
7015
6919
  orphanModules?: boolean | undefined;
7016
6920
  } | undefined;
7017
- snapshot?: {
7018
- module?: {
7019
- hash?: boolean | undefined;
7020
- timestamp?: boolean | undefined;
7021
- } | undefined;
7022
- resolve?: {
7023
- hash?: boolean | undefined;
7024
- timestamp?: boolean | undefined;
7025
- } | undefined;
7026
- } | undefined;
6921
+ snapshot?: {} | undefined;
7027
6922
  optimization?: {
7028
6923
  moduleIds?: "named" | "deterministic" | undefined;
7029
6924
  chunkIds?: "named" | "deterministic" | undefined;
@@ -7090,7 +6985,6 @@ export declare const rspackOptions: z.ZodObject<{
7090
6985
  resolveLoader?: ResolveOptions | undefined;
7091
6986
  plugins?: (false | "" | 0 | RspackPluginInstance | RspackPluginFunction | null | undefined)[] | undefined;
7092
6987
  devServer?: DevServer | undefined;
7093
- builtins?: BuiltinsType | undefined;
7094
6988
  module?: {
7095
6989
  defaultRules?: (false | "" | 0 | "..." | RuleSetRule | null | undefined)[] | undefined;
7096
6990
  rules?: (false | "" | 0 | "..." | RuleSetRule | null | undefined)[] | undefined;
@@ -7361,7 +7255,6 @@ export declare const rspackOptions: z.ZodObject<{
7361
7255
  css?: boolean | undefined;
7362
7256
  futureDefaults?: boolean | undefined;
7363
7257
  rspackFuture?: {
7364
- newTreeshaking?: boolean | undefined;
7365
7258
  bundlerInfo?: {
7366
7259
  version?: string | undefined;
7367
7260
  force?: boolean | "version"[] | undefined;
@@ -7457,16 +7350,7 @@ export declare const rspackOptions: z.ZodObject<{
7457
7350
  optimizationBailout?: boolean | undefined;
7458
7351
  orphanModules?: boolean | undefined;
7459
7352
  } | undefined;
7460
- snapshot?: {
7461
- module?: {
7462
- hash?: boolean | undefined;
7463
- timestamp?: boolean | undefined;
7464
- } | undefined;
7465
- resolve?: {
7466
- hash?: boolean | undefined;
7467
- timestamp?: boolean | undefined;
7468
- } | undefined;
7469
- } | undefined;
7353
+ snapshot?: {} | undefined;
7470
7354
  optimization?: {
7471
7355
  moduleIds?: "named" | "deterministic" | undefined;
7472
7356
  chunkIds?: "named" | "deterministic" | undefined;
@@ -7533,7 +7417,6 @@ export declare const rspackOptions: z.ZodObject<{
7533
7417
  resolveLoader?: ResolveOptions | undefined;
7534
7418
  plugins?: (false | "" | 0 | RspackPluginInstance | RspackPluginFunction | null | undefined)[] | undefined;
7535
7419
  devServer?: DevServer | undefined;
7536
- builtins?: BuiltinsType | undefined;
7537
7420
  module?: {
7538
7421
  defaultRules?: (false | "" | 0 | "..." | RuleSetRule | null | undefined)[] | undefined;
7539
7422
  rules?: (false | "" | 0 | "..." | RuleSetRule | null | undefined)[] | undefined;