@rspack/core 1.0.6 → 1.0.7

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.
@@ -635,19 +635,35 @@ function getRawSnapshotOptions(_snapshot) {
635
635
  return {};
636
636
  }
637
637
  function getRawExperiments(experiments) {
638
- const { topLevelAwait, layers, rspackFuture } = experiments;
639
- (0, node_assert_1.default)(!(0, util_1.isNil)(topLevelAwait) && !(0, util_1.isNil)(rspackFuture) && !(0, util_1.isNil)(layers));
638
+ const { topLevelAwait, layers, incremental, rspackFuture } = experiments;
639
+ (0, node_assert_1.default)(!(0, util_1.isNil)(topLevelAwait) &&
640
+ !(0, util_1.isNil)(rspackFuture) &&
641
+ !(0, util_1.isNil)(layers) &&
642
+ !(0, util_1.isNil)(incremental));
640
643
  return {
641
644
  layers,
642
645
  topLevelAwait,
646
+ incremental: getRawIncremental(incremental),
643
647
  rspackFuture: getRawRspackFutureOptions(rspackFuture)
644
648
  };
645
649
  }
646
- function getRawRspackFutureOptions(future) {
650
+ function getRawIncremental(incremental) {
651
+ if (incremental === false) {
652
+ return undefined;
653
+ }
647
654
  return {
648
- newIncremental: future.newIncremental
655
+ make: incremental.make,
656
+ emitAssets: incremental.emitAssets,
657
+ inferAsyncModules: incremental.inferAsyncModules,
658
+ providedExports: incremental.providedExports,
659
+ moduleHashes: incremental.moduleHashes,
660
+ moduleCodegen: incremental.moduleCodegen,
661
+ moduleRuntimeRequirements: incremental.moduleRuntimeRequirements
649
662
  };
650
663
  }
664
+ function getRawRspackFutureOptions(future) {
665
+ return {};
666
+ }
651
667
  function getRawNode(node) {
652
668
  if (node === false) {
653
669
  return undefined;
@@ -14,7 +14,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.resolve = exports.load = void 0;
16
16
  const node_path_1 = __importDefault(require("node:path"));
17
- const browserslist_1 = __importDefault(require("../../compiled/browserslist"));
18
17
  // [[C:]/path/to/config][:env]
19
18
  const inputRx = /^(?:((?:[A-Z]:)?[/\\].*?))?(?::(.+?))?$/i;
20
19
  /**
@@ -30,7 +29,8 @@ const parse = (input, context) => {
30
29
  const [, configPath, env] = inputRx.exec(input) || [];
31
30
  return { configPath, env };
32
31
  }
33
- const config = browserslist_1.default.findConfig(context);
32
+ const browserslist = require("../../compiled/browserslist");
33
+ const config = browserslist.findConfig(context);
34
34
  if (config && Object.keys(config).includes(input)) {
35
35
  return { env: input };
36
36
  }
@@ -42,6 +42,7 @@ const parse = (input, context) => {
42
42
  * @returns selected browsers
43
43
  */
44
44
  const load = (input, context) => {
45
+ const browserslist = require("../../compiled/browserslist");
45
46
  const { configPath, env, query } = parse(input, context);
46
47
  // if a query is specified, then use it, else
47
48
  // if a path to a config is specified then load it, else
@@ -49,14 +50,14 @@ const load = (input, context) => {
49
50
  const config = query
50
51
  ? query
51
52
  : configPath
52
- ? browserslist_1.default.loadConfig({
53
+ ? browserslist.loadConfig({
53
54
  config: configPath,
54
55
  env
55
56
  })
56
- : browserslist_1.default.loadConfig({ path: context, env });
57
+ : browserslist.loadConfig({ path: context, env });
57
58
  if (!config)
58
59
  return;
59
- return (0, browserslist_1.default)(config);
60
+ return browserslist(config);
60
61
  };
61
62
  exports.load = load;
62
63
  /**
@@ -133,12 +133,20 @@ const applyExperimentsDefaults = (experiments) => {
133
133
  D(experiments, "css", experiments.futureDefaults ? true : undefined);
134
134
  D(experiments, "layers", false);
135
135
  D(experiments, "topLevelAwait", true);
136
+ // IGNORE(experiments.incremental): Rspack specific configuration for incremental
137
+ D(experiments, "incremental", {});
138
+ if (typeof experiments.incremental === "object") {
139
+ D(experiments.incremental, "make", true);
140
+ D(experiments.incremental, "emitAssets", true);
141
+ D(experiments.incremental, "inferAsyncModules", false);
142
+ D(experiments.incremental, "providedExports", false);
143
+ D(experiments.incremental, "moduleHashes", false);
144
+ D(experiments.incremental, "moduleCodegen", false);
145
+ D(experiments.incremental, "moduleRuntimeRequirements", false);
146
+ }
136
147
  // IGNORE(experiments.rspackFuture): Rspack specific configuration
137
148
  D(experiments, "rspackFuture", {});
138
149
  // rspackFuture.bundlerInfo default value is applied after applyDefaults
139
- if (typeof experiments.rspackFuture === "object") {
140
- D(experiments.rspackFuture, "newIncremental", false);
141
- }
142
150
  };
143
151
  const applybundlerInfoDefaults = (rspackFuture, library) => {
144
152
  if (typeof rspackFuture === "object") {
@@ -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, 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";
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, Incremental, 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;
@@ -90,6 +90,7 @@ export interface ExperimentsNormalized {
90
90
  topLevelAwait?: boolean;
91
91
  css?: boolean;
92
92
  layers?: boolean;
93
+ incremental?: false | Incremental;
93
94
  futureDefaults?: boolean;
94
95
  rspackFuture?: RspackFutureOptions;
95
96
  }
@@ -194,7 +194,8 @@ const getNormalizedRspackOptions = (config) => {
194
194
  plugins: nestedArray(config.plugins, p => [...p]),
195
195
  experiments: nestedConfig(config.experiments, experiments => ({
196
196
  ...experiments,
197
- lazyCompilation: optionalNestedConfig(experiments.lazyCompilation, options => (options === true ? {} : options))
197
+ lazyCompilation: optionalNestedConfig(experiments.lazyCompilation, options => (options === true ? {} : options)),
198
+ incremental: optionalNestedConfig(experiments.incremental, options => options === true ? {} : options)
198
199
  })),
199
200
  watch: config.watch,
200
201
  watchOptions: cloneObject(config.watchOptions),
@@ -5967,21 +5967,18 @@ declare const rspackFutureOptions: z.ZodObject<{
5967
5967
  version?: string | undefined;
5968
5968
  bundler?: string | undefined;
5969
5969
  }>>;
5970
- newIncremental: z.ZodOptional<z.ZodBoolean>;
5971
5970
  }, "strict", z.ZodTypeAny, {
5972
5971
  bundlerInfo?: {
5973
5972
  force?: boolean | ("version" | "uniqueId")[] | undefined;
5974
5973
  version?: string | undefined;
5975
5974
  bundler?: string | undefined;
5976
5975
  } | undefined;
5977
- newIncremental?: boolean | undefined;
5978
5976
  }, {
5979
5977
  bundlerInfo?: {
5980
5978
  force?: boolean | ("version" | "uniqueId")[] | undefined;
5981
5979
  version?: string | undefined;
5982
5980
  bundler?: string | undefined;
5983
5981
  } | undefined;
5984
- newIncremental?: boolean | undefined;
5985
5982
  }>;
5986
5983
  export type RspackFutureOptions = z.infer<typeof rspackFutureOptions>;
5987
5984
  declare const lazyCompilationOptions: z.ZodObject<{
@@ -6084,6 +6081,32 @@ declare const lazyCompilationOptions: z.ZodObject<{
6084
6081
  imports?: boolean | undefined;
6085
6082
  }>;
6086
6083
  export type LazyCompilationOptions = z.infer<typeof lazyCompilationOptions>;
6084
+ declare const incremental: z.ZodObject<{
6085
+ make: z.ZodOptional<z.ZodBoolean>;
6086
+ emitAssets: z.ZodOptional<z.ZodBoolean>;
6087
+ inferAsyncModules: z.ZodOptional<z.ZodBoolean>;
6088
+ providedExports: z.ZodOptional<z.ZodBoolean>;
6089
+ moduleHashes: z.ZodOptional<z.ZodBoolean>;
6090
+ moduleCodegen: z.ZodOptional<z.ZodBoolean>;
6091
+ moduleRuntimeRequirements: z.ZodOptional<z.ZodBoolean>;
6092
+ }, "strict", z.ZodTypeAny, {
6093
+ make?: boolean | undefined;
6094
+ providedExports?: boolean | undefined;
6095
+ emitAssets?: boolean | undefined;
6096
+ inferAsyncModules?: boolean | undefined;
6097
+ moduleHashes?: boolean | undefined;
6098
+ moduleCodegen?: boolean | undefined;
6099
+ moduleRuntimeRequirements?: boolean | undefined;
6100
+ }, {
6101
+ make?: boolean | undefined;
6102
+ providedExports?: boolean | undefined;
6103
+ emitAssets?: boolean | undefined;
6104
+ inferAsyncModules?: boolean | undefined;
6105
+ moduleHashes?: boolean | undefined;
6106
+ moduleCodegen?: boolean | undefined;
6107
+ moduleRuntimeRequirements?: boolean | undefined;
6108
+ }>;
6109
+ export type Incremental = z.infer<typeof incremental>;
6087
6110
  declare const experiments: z.ZodObject<{
6088
6111
  lazyCompilation: z.ZodUnion<[z.ZodOptional<z.ZodBoolean>, z.ZodObject<{
6089
6112
  backend: z.ZodOptional<z.ZodObject<{
@@ -6189,6 +6212,31 @@ declare const experiments: z.ZodObject<{
6189
6212
  topLevelAwait: z.ZodOptional<z.ZodBoolean>;
6190
6213
  css: z.ZodOptional<z.ZodBoolean>;
6191
6214
  layers: z.ZodOptional<z.ZodBoolean>;
6215
+ incremental: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
6216
+ make: z.ZodOptional<z.ZodBoolean>;
6217
+ emitAssets: z.ZodOptional<z.ZodBoolean>;
6218
+ inferAsyncModules: z.ZodOptional<z.ZodBoolean>;
6219
+ providedExports: z.ZodOptional<z.ZodBoolean>;
6220
+ moduleHashes: z.ZodOptional<z.ZodBoolean>;
6221
+ moduleCodegen: z.ZodOptional<z.ZodBoolean>;
6222
+ moduleRuntimeRequirements: z.ZodOptional<z.ZodBoolean>;
6223
+ }, "strict", z.ZodTypeAny, {
6224
+ make?: boolean | undefined;
6225
+ providedExports?: boolean | undefined;
6226
+ emitAssets?: boolean | undefined;
6227
+ inferAsyncModules?: boolean | undefined;
6228
+ moduleHashes?: boolean | undefined;
6229
+ moduleCodegen?: boolean | undefined;
6230
+ moduleRuntimeRequirements?: boolean | undefined;
6231
+ }, {
6232
+ make?: boolean | undefined;
6233
+ providedExports?: boolean | undefined;
6234
+ emitAssets?: boolean | undefined;
6235
+ inferAsyncModules?: boolean | undefined;
6236
+ moduleHashes?: boolean | undefined;
6237
+ moduleCodegen?: boolean | undefined;
6238
+ moduleRuntimeRequirements?: boolean | undefined;
6239
+ }>]>>;
6192
6240
  futureDefaults: z.ZodOptional<z.ZodBoolean>;
6193
6241
  rspackFuture: z.ZodOptional<z.ZodObject<{
6194
6242
  bundlerInfo: z.ZodOptional<z.ZodObject<{
@@ -6204,21 +6252,18 @@ declare const experiments: z.ZodObject<{
6204
6252
  version?: string | undefined;
6205
6253
  bundler?: string | undefined;
6206
6254
  }>>;
6207
- newIncremental: z.ZodOptional<z.ZodBoolean>;
6208
6255
  }, "strict", z.ZodTypeAny, {
6209
6256
  bundlerInfo?: {
6210
6257
  force?: boolean | ("version" | "uniqueId")[] | undefined;
6211
6258
  version?: string | undefined;
6212
6259
  bundler?: string | undefined;
6213
6260
  } | undefined;
6214
- newIncremental?: boolean | undefined;
6215
6261
  }, {
6216
6262
  bundlerInfo?: {
6217
6263
  force?: boolean | ("version" | "uniqueId")[] | undefined;
6218
6264
  version?: string | undefined;
6219
6265
  bundler?: string | undefined;
6220
6266
  } | undefined;
6221
- newIncremental?: boolean | undefined;
6222
6267
  }>>;
6223
6268
  }, "strict", z.ZodTypeAny, {
6224
6269
  css?: boolean | undefined;
@@ -6245,6 +6290,15 @@ declare const experiments: z.ZodObject<{
6245
6290
  outputModule?: boolean | undefined;
6246
6291
  topLevelAwait?: boolean | undefined;
6247
6292
  layers?: boolean | undefined;
6293
+ incremental?: boolean | {
6294
+ make?: boolean | undefined;
6295
+ providedExports?: boolean | undefined;
6296
+ emitAssets?: boolean | undefined;
6297
+ inferAsyncModules?: boolean | undefined;
6298
+ moduleHashes?: boolean | undefined;
6299
+ moduleCodegen?: boolean | undefined;
6300
+ moduleRuntimeRequirements?: boolean | undefined;
6301
+ } | undefined;
6248
6302
  futureDefaults?: boolean | undefined;
6249
6303
  rspackFuture?: {
6250
6304
  bundlerInfo?: {
@@ -6252,7 +6306,6 @@ declare const experiments: z.ZodObject<{
6252
6306
  version?: string | undefined;
6253
6307
  bundler?: string | undefined;
6254
6308
  } | undefined;
6255
- newIncremental?: boolean | undefined;
6256
6309
  } | undefined;
6257
6310
  }, {
6258
6311
  css?: boolean | undefined;
@@ -6279,6 +6332,15 @@ declare const experiments: z.ZodObject<{
6279
6332
  outputModule?: boolean | undefined;
6280
6333
  topLevelAwait?: boolean | undefined;
6281
6334
  layers?: boolean | undefined;
6335
+ incremental?: boolean | {
6336
+ make?: boolean | undefined;
6337
+ providedExports?: boolean | undefined;
6338
+ emitAssets?: boolean | undefined;
6339
+ inferAsyncModules?: boolean | undefined;
6340
+ moduleHashes?: boolean | undefined;
6341
+ moduleCodegen?: boolean | undefined;
6342
+ moduleRuntimeRequirements?: boolean | undefined;
6343
+ } | undefined;
6282
6344
  futureDefaults?: boolean | undefined;
6283
6345
  rspackFuture?: {
6284
6346
  bundlerInfo?: {
@@ -6286,7 +6348,6 @@ declare const experiments: z.ZodObject<{
6286
6348
  version?: string | undefined;
6287
6349
  bundler?: string | undefined;
6288
6350
  } | undefined;
6289
- newIncremental?: boolean | undefined;
6290
6351
  } | undefined;
6291
6352
  }>;
6292
6353
  export type Experiments = z.infer<typeof experiments>;
@@ -7238,6 +7299,31 @@ export declare const rspackOptions: z.ZodObject<{
7238
7299
  topLevelAwait: z.ZodOptional<z.ZodBoolean>;
7239
7300
  css: z.ZodOptional<z.ZodBoolean>;
7240
7301
  layers: z.ZodOptional<z.ZodBoolean>;
7302
+ incremental: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
7303
+ make: z.ZodOptional<z.ZodBoolean>;
7304
+ emitAssets: z.ZodOptional<z.ZodBoolean>;
7305
+ inferAsyncModules: z.ZodOptional<z.ZodBoolean>;
7306
+ providedExports: z.ZodOptional<z.ZodBoolean>;
7307
+ moduleHashes: z.ZodOptional<z.ZodBoolean>;
7308
+ moduleCodegen: z.ZodOptional<z.ZodBoolean>;
7309
+ moduleRuntimeRequirements: z.ZodOptional<z.ZodBoolean>;
7310
+ }, "strict", z.ZodTypeAny, {
7311
+ make?: boolean | undefined;
7312
+ providedExports?: boolean | undefined;
7313
+ emitAssets?: boolean | undefined;
7314
+ inferAsyncModules?: boolean | undefined;
7315
+ moduleHashes?: boolean | undefined;
7316
+ moduleCodegen?: boolean | undefined;
7317
+ moduleRuntimeRequirements?: boolean | undefined;
7318
+ }, {
7319
+ make?: boolean | undefined;
7320
+ providedExports?: boolean | undefined;
7321
+ emitAssets?: boolean | undefined;
7322
+ inferAsyncModules?: boolean | undefined;
7323
+ moduleHashes?: boolean | undefined;
7324
+ moduleCodegen?: boolean | undefined;
7325
+ moduleRuntimeRequirements?: boolean | undefined;
7326
+ }>]>>;
7241
7327
  futureDefaults: z.ZodOptional<z.ZodBoolean>;
7242
7328
  rspackFuture: z.ZodOptional<z.ZodObject<{
7243
7329
  bundlerInfo: z.ZodOptional<z.ZodObject<{
@@ -7253,21 +7339,18 @@ export declare const rspackOptions: z.ZodObject<{
7253
7339
  version?: string | undefined;
7254
7340
  bundler?: string | undefined;
7255
7341
  }>>;
7256
- newIncremental: z.ZodOptional<z.ZodBoolean>;
7257
7342
  }, "strict", z.ZodTypeAny, {
7258
7343
  bundlerInfo?: {
7259
7344
  force?: boolean | ("version" | "uniqueId")[] | undefined;
7260
7345
  version?: string | undefined;
7261
7346
  bundler?: string | undefined;
7262
7347
  } | undefined;
7263
- newIncremental?: boolean | undefined;
7264
7348
  }, {
7265
7349
  bundlerInfo?: {
7266
7350
  force?: boolean | ("version" | "uniqueId")[] | undefined;
7267
7351
  version?: string | undefined;
7268
7352
  bundler?: string | undefined;
7269
7353
  } | undefined;
7270
- newIncremental?: boolean | undefined;
7271
7354
  }>>;
7272
7355
  }, "strict", z.ZodTypeAny, {
7273
7356
  css?: boolean | undefined;
@@ -7294,6 +7377,15 @@ export declare const rspackOptions: z.ZodObject<{
7294
7377
  outputModule?: boolean | undefined;
7295
7378
  topLevelAwait?: boolean | undefined;
7296
7379
  layers?: boolean | undefined;
7380
+ incremental?: boolean | {
7381
+ make?: boolean | undefined;
7382
+ providedExports?: boolean | undefined;
7383
+ emitAssets?: boolean | undefined;
7384
+ inferAsyncModules?: boolean | undefined;
7385
+ moduleHashes?: boolean | undefined;
7386
+ moduleCodegen?: boolean | undefined;
7387
+ moduleRuntimeRequirements?: boolean | undefined;
7388
+ } | undefined;
7297
7389
  futureDefaults?: boolean | undefined;
7298
7390
  rspackFuture?: {
7299
7391
  bundlerInfo?: {
@@ -7301,7 +7393,6 @@ export declare const rspackOptions: z.ZodObject<{
7301
7393
  version?: string | undefined;
7302
7394
  bundler?: string | undefined;
7303
7395
  } | undefined;
7304
- newIncremental?: boolean | undefined;
7305
7396
  } | undefined;
7306
7397
  }, {
7307
7398
  css?: boolean | undefined;
@@ -7328,6 +7419,15 @@ export declare const rspackOptions: z.ZodObject<{
7328
7419
  outputModule?: boolean | undefined;
7329
7420
  topLevelAwait?: boolean | undefined;
7330
7421
  layers?: boolean | undefined;
7422
+ incremental?: boolean | {
7423
+ make?: boolean | undefined;
7424
+ providedExports?: boolean | undefined;
7425
+ emitAssets?: boolean | undefined;
7426
+ inferAsyncModules?: boolean | undefined;
7427
+ moduleHashes?: boolean | undefined;
7428
+ moduleCodegen?: boolean | undefined;
7429
+ moduleRuntimeRequirements?: boolean | undefined;
7430
+ } | undefined;
7331
7431
  futureDefaults?: boolean | undefined;
7332
7432
  rspackFuture?: {
7333
7433
  bundlerInfo?: {
@@ -7335,7 +7435,6 @@ export declare const rspackOptions: z.ZodObject<{
7335
7435
  version?: string | undefined;
7336
7436
  bundler?: string | undefined;
7337
7437
  } | undefined;
7338
- newIncremental?: boolean | undefined;
7339
7438
  } | undefined;
7340
7439
  }>>;
7341
7440
  externals: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodBoolean]>, z.ZodArray<z.ZodString, "many">]>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>]>>]>, z.ZodFunction<z.ZodTuple<[z.ZodObject<{
@@ -9360,6 +9459,15 @@ export declare const rspackOptions: z.ZodObject<{
9360
9459
  outputModule?: boolean | undefined;
9361
9460
  topLevelAwait?: boolean | undefined;
9362
9461
  layers?: boolean | undefined;
9462
+ incremental?: boolean | {
9463
+ make?: boolean | undefined;
9464
+ providedExports?: boolean | undefined;
9465
+ emitAssets?: boolean | undefined;
9466
+ inferAsyncModules?: boolean | undefined;
9467
+ moduleHashes?: boolean | undefined;
9468
+ moduleCodegen?: boolean | undefined;
9469
+ moduleRuntimeRequirements?: boolean | undefined;
9470
+ } | undefined;
9363
9471
  futureDefaults?: boolean | undefined;
9364
9472
  rspackFuture?: {
9365
9473
  bundlerInfo?: {
@@ -9367,7 +9475,6 @@ export declare const rspackOptions: z.ZodObject<{
9367
9475
  version?: string | undefined;
9368
9476
  bundler?: string | undefined;
9369
9477
  } | undefined;
9370
- newIncremental?: boolean | undefined;
9371
9478
  } | undefined;
9372
9479
  } | undefined;
9373
9480
  externals?: string | RegExp | Record<string, string | boolean | string[] | Record<string, string | string[]>> | ((args_0: {
@@ -9934,6 +10041,15 @@ export declare const rspackOptions: z.ZodObject<{
9934
10041
  outputModule?: boolean | undefined;
9935
10042
  topLevelAwait?: boolean | undefined;
9936
10043
  layers?: boolean | undefined;
10044
+ incremental?: boolean | {
10045
+ make?: boolean | undefined;
10046
+ providedExports?: boolean | undefined;
10047
+ emitAssets?: boolean | undefined;
10048
+ inferAsyncModules?: boolean | undefined;
10049
+ moduleHashes?: boolean | undefined;
10050
+ moduleCodegen?: boolean | undefined;
10051
+ moduleRuntimeRequirements?: boolean | undefined;
10052
+ } | undefined;
9937
10053
  futureDefaults?: boolean | undefined;
9938
10054
  rspackFuture?: {
9939
10055
  bundlerInfo?: {
@@ -9941,7 +10057,6 @@ export declare const rspackOptions: z.ZodObject<{
9941
10057
  version?: string | undefined;
9942
10058
  bundler?: string | undefined;
9943
10059
  } | undefined;
9944
- newIncremental?: boolean | undefined;
9945
10060
  } | undefined;
9946
10061
  } | undefined;
9947
10062
  externals?: string | RegExp | Record<string, string | boolean | string[] | Record<string, string | string[]>> | ((args_0: {
@@ -867,8 +867,7 @@ const rspackFutureOptions = zod_1.z.strictObject({
867
867
  .or(zod_1.z.array(zod_1.z.enum(["version", "uniqueId"])))
868
868
  .optional()
869
869
  })
870
- .optional(),
871
- newIncremental: zod_1.z.boolean().optional()
870
+ .optional()
872
871
  });
873
872
  const listenOptions = zod_1.z.object({
874
873
  port: zod_1.z.number().optional(),
@@ -895,6 +894,15 @@ const lazyCompilationOptions = zod_1.z.object({
895
894
  .or(zod_1.z.function().args(zod_1.z.custom()).returns(zod_1.z.boolean()))
896
895
  .optional()
897
896
  });
897
+ const incremental = zod_1.z.strictObject({
898
+ make: zod_1.z.boolean().optional(),
899
+ emitAssets: zod_1.z.boolean().optional(),
900
+ inferAsyncModules: zod_1.z.boolean().optional(),
901
+ providedExports: zod_1.z.boolean().optional(),
902
+ moduleHashes: zod_1.z.boolean().optional(),
903
+ moduleCodegen: zod_1.z.boolean().optional(),
904
+ moduleRuntimeRequirements: zod_1.z.boolean().optional()
905
+ });
898
906
  const experiments = zod_1.z.strictObject({
899
907
  lazyCompilation: zod_1.z.boolean().optional().or(lazyCompilationOptions),
900
908
  asyncWebAssembly: zod_1.z.boolean().optional(),
@@ -902,6 +910,7 @@ const experiments = zod_1.z.strictObject({
902
910
  topLevelAwait: zod_1.z.boolean().optional(),
903
911
  css: zod_1.z.boolean().optional(),
904
912
  layers: zod_1.z.boolean().optional(),
913
+ incremental: zod_1.z.boolean().or(incremental).optional(),
905
914
  futureDefaults: zod_1.z.boolean().optional(),
906
915
  rspackFuture: rspackFutureOptions.optional()
907
916
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/core",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "webpackVersion": "5.75.0",
5
5
  "license": "MIT",
6
6
  "description": "The fast Rust-based web bundler with webpack-compatible API",
@@ -60,7 +60,7 @@
60
60
  "@module-federation/runtime-tools": "0.5.1",
61
61
  "@rspack/lite-tapable": "1.0.0",
62
62
  "caniuse-lite": "^1.0.30001616",
63
- "@rspack/binding": "1.0.6"
63
+ "@rspack/binding": "1.0.7"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "@swc/helpers": ">=0.5.1"