@rspack/core 1.4.0-rc.0 → 1.4.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.
@@ -164,7 +164,7 @@ export declare class Compilation {
164
164
  finishModules: liteTapable.AsyncSeriesHook<[Iterable<Module>], void>;
165
165
  chunkHash: liteTapable.SyncHook<[Chunk, Hash], void>;
166
166
  chunkAsset: liteTapable.SyncHook<[Chunk, string], void>;
167
- processWarnings: liteTapable.SyncWaterfallHook<[Error[]]>;
167
+ processWarnings: liteTapable.SyncWaterfallHook<[WebpackError[]]>;
168
168
  succeedModule: liteTapable.SyncHook<[Module], void>;
169
169
  stillValidModule: liteTapable.SyncHook<[Module], void>;
170
170
  statsPreset: liteTapable.HookMap<liteTapable.SyncHook<[
@@ -0,0 +1,8 @@
1
+ export type CollectTypeScriptInfoOptions = {
2
+ typeExports?: boolean;
3
+ exportedEnum?: boolean | "const-only";
4
+ };
5
+ export declare function resolveCollectTypeScriptInfo(options: CollectTypeScriptInfoOptions): {
6
+ typeExports: boolean | undefined;
7
+ exportedEnum: string;
8
+ };
@@ -1,3 +1,5 @@
1
1
  export { resolvePluginImport } from "./pluginImport";
2
2
  export type { PluginImportOptions } from "./pluginImport";
3
+ export { resolveCollectTypeScriptInfo } from "./collectTypeScriptInfo";
4
+ export type { CollectTypeScriptInfoOptions } from "./collectTypeScriptInfo";
3
5
  export type { SwcLoaderEnvConfig, SwcLoaderEsParserConfig, SwcLoaderJscConfig, SwcLoaderModuleConfig, SwcLoaderOptions, SwcLoaderParserConfig, SwcLoaderTransformConfig, SwcLoaderTsParserConfig } from "./types";
@@ -1,4 +1,3 @@
1
- import * as z from "zod/v4";
2
1
  type RawStyleConfig = {
3
2
  styleLibraryDirectory?: string;
4
3
  custom?: string;
@@ -28,19 +27,7 @@ type PluginImportConfig = {
28
27
  ignoreEsComponent?: string[];
29
28
  ignoreStyleComponent?: string[];
30
29
  };
31
- type PluginImportOptions = PluginImportConfig[] | undefined;
32
- export declare const ZodSwcPluginImportConfig: z.ZodOptional<z.ZodArray<z.ZodObject<{
33
- libraryName: z.ZodString;
34
- libraryDirectory: z.ZodOptional<z.ZodString>;
35
- customName: z.ZodOptional<z.ZodString>;
36
- customStyleName: z.ZodOptional<z.ZodString>;
37
- style: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
38
- styleLibraryDirectory: z.ZodOptional<z.ZodString>;
39
- camelToDashComponentName: z.ZodOptional<z.ZodBoolean>;
40
- transformToDefaultImport: z.ZodOptional<z.ZodBoolean>;
41
- ignoreEsComponent: z.ZodOptional<z.ZodArray<z.ZodString>>;
42
- ignoreStyleComponent: z.ZodOptional<z.ZodArray<z.ZodString>>;
43
- }, z.core.$strict>>>;
30
+ type PluginImportOptions = PluginImportConfig[];
44
31
  declare function resolvePluginImport(pluginImport: PluginImportOptions): RawPluginImportConfig[] | undefined;
45
32
  export { resolvePluginImport };
46
33
  export type { PluginImportOptions };
@@ -1,6 +1,7 @@
1
1
  import type { Config, EnvConfig, EsParserConfig, JscConfig, ModuleConfig, ParserConfig, TerserEcmaVersion, TransformConfig, TsParserConfig } from "../../../compiled/@swc/types";
2
2
  import * as z from "zod/v4";
3
- import { type PluginImportOptions } from "./pluginImport";
3
+ import type { CollectTypeScriptInfoOptions } from "./collectTypeScriptInfo";
4
+ import type { PluginImportOptions } from "./pluginImport";
4
5
  export type SwcLoaderEnvConfig = EnvConfig;
5
6
  export type SwcLoaderJscConfig = JscConfig;
6
7
  export type SwcLoaderModuleConfig = ModuleConfig;
@@ -16,6 +17,7 @@ export type SwcLoaderOptions = Config & {
16
17
  */
17
18
  rspackExperiments?: {
18
19
  import?: PluginImportOptions;
20
+ collectTypeScriptInfo?: CollectTypeScriptInfoOptions;
19
21
  };
20
22
  };
21
23
  export interface TerserCompressOptions {
@@ -77,10 +79,10 @@ export interface TerserCompressOptions {
77
79
  module?: boolean;
78
80
  }
79
81
  export declare const getZodSwcLoaderOptionsSchema: () => z.ZodObject<{
80
- $schema: z.ZodOptional<z.ZodString>;
81
- test: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>;
82
- exclude: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>;
83
- env: z.ZodOptional<z.ZodObject<{
82
+ $schema: z.ZodOptional<z.ZodOptional<z.ZodString>>;
83
+ test: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>>;
84
+ exclude: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>>;
85
+ env: z.ZodOptional<z.ZodOptional<z.ZodObject<{
84
86
  mode: z.ZodOptional<z.ZodEnum<{
85
87
  usage: "usage";
86
88
  entry: "entry";
@@ -97,8 +99,8 @@ export declare const getZodSwcLoaderOptionsSchema: () => z.ZodObject<{
97
99
  path: z.ZodOptional<z.ZodString>;
98
100
  shippedProposals: z.ZodOptional<z.ZodBoolean>;
99
101
  forceAllTransforms: z.ZodOptional<z.ZodBoolean>;
100
- }, z.core.$strict>>;
101
- jsc: z.ZodOptional<z.ZodObject<{
102
+ }, z.core.$strict>>>;
103
+ jsc: z.ZodOptional<z.ZodOptional<z.ZodObject<{
102
104
  assumptions: z.ZodOptional<z.ZodObject<{
103
105
  arrayLikeIsIterable: z.ZodOptional<z.ZodBoolean>;
104
106
  constantReexports: z.ZodOptional<z.ZodBoolean>;
@@ -339,8 +341,8 @@ export declare const getZodSwcLoaderOptionsSchema: () => z.ZodObject<{
339
341
  utf8: "utf8";
340
342
  }>>;
341
343
  }, z.core.$strict>>;
342
- }, z.core.$strict>>;
343
- module: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
344
+ }, z.core.$strict>>>;
345
+ module: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
344
346
  strict: z.ZodOptional<z.ZodBoolean>;
345
347
  strictMode: z.ZodOptional<z.ZodBoolean>;
346
348
  lazy: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodArray<z.ZodString>]>>;
@@ -450,13 +452,13 @@ export declare const getZodSwcLoaderOptionsSchema: () => z.ZodObject<{
450
452
  }, z.core.$strict>, z.ZodObject<{
451
453
  type: z.ZodLiteral<"systemjs">;
452
454
  allowTopLevelThis: z.ZodOptional<z.ZodBoolean>;
453
- }, z.core.$strict>]>>;
454
- minify: z.ZodOptional<z.ZodBoolean>;
455
- sourceMaps: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"inline">]>>;
456
- inlineSourcesContent: z.ZodOptional<z.ZodBoolean>;
455
+ }, z.core.$strict>]>>>;
456
+ minify: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
457
+ sourceMaps: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"inline">]>>>;
458
+ inlineSourcesContent: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
457
459
  isModule: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"unknown">]>>;
458
460
  rspackExperiments: z.ZodOptional<z.ZodObject<{
459
- import: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
461
+ import: z.ZodOptional<z.ZodArray<z.ZodObject<{
460
462
  libraryName: z.ZodString;
461
463
  libraryDirectory: z.ZodOptional<z.ZodString>;
462
464
  customName: z.ZodOptional<z.ZodString>;
@@ -467,6 +469,10 @@ export declare const getZodSwcLoaderOptionsSchema: () => z.ZodObject<{
467
469
  transformToDefaultImport: z.ZodOptional<z.ZodBoolean>;
468
470
  ignoreEsComponent: z.ZodOptional<z.ZodArray<z.ZodString>>;
469
471
  ignoreStyleComponent: z.ZodOptional<z.ZodArray<z.ZodString>>;
470
- }, z.core.$strict>>>>;
472
+ }, z.core.$strict>>>;
473
+ collectTypeScriptInfo: z.ZodOptional<z.ZodObject<{
474
+ typeExports: z.ZodOptional<z.ZodBoolean>;
475
+ exportedEnum: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"const-only">]>>;
476
+ }, z.core.$strict>>;
471
477
  }, z.core.$strict>>;
472
478
  }, z.core.$strict>;
@@ -1,6 +1,8 @@
1
1
  import * as binding from "@rspack/binding";
2
2
  export interface CssChunkingPluginOptions {
3
3
  strict?: boolean;
4
+ minSize?: number;
5
+ maxSize?: number;
4
6
  /**
5
7
  * This plugin is intended to be generic, but currently requires some special handling for Next.js.
6
8
  * A `next` option has been added to accommodate this.
@@ -9,9 +11,9 @@ export interface CssChunkingPluginOptions {
9
11
  nextjs?: boolean;
10
12
  }
11
13
  export declare const CssChunkingPlugin: {
12
- new (options: CssChunkingPluginOptions): {
14
+ new (options?: CssChunkingPluginOptions | undefined): {
13
15
  name: binding.BuiltinPluginName;
14
- _args: [options: CssChunkingPluginOptions];
16
+ _args: [options?: CssChunkingPluginOptions | undefined];
15
17
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
16
18
  raw(compiler: import("..").Compiler): binding.BuiltinPlugin;
17
19
  apply(compiler: import("..").Compiler): void;
@@ -0,0 +1,11 @@
1
+ import { BuiltinPluginName, type RawRslibPluginOptions } from "@rspack/binding";
2
+ export type RslibPluginArgument = Partial<Omit<RawRslibPluginOptions, "handler">> | ((percentage: number, msg: string, ...args: string[]) => void) | undefined;
3
+ export declare const RslibPlugin: {
4
+ new (rslib: RawRslibPluginOptions): {
5
+ name: BuiltinPluginName;
6
+ _args: [rslib: RawRslibPluginOptions];
7
+ affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
8
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
9
+ apply(compiler: import("..").Compiler): void;
10
+ };
11
+ };
@@ -51,6 +51,7 @@ export * from "./NodeTargetPlugin";
51
51
  export * from "./OccurrenceChunkIdsPlugin";
52
52
  export * from "./ProgressPlugin";
53
53
  export * from "./RstestPlugin";
54
+ export * from "./RslibPlugin";
54
55
  export * from "./ProvidePlugin";
55
56
  export * from "./RealContentHashPlugin";
56
57
  export * from "./RemoveEmptyChunksPlugin";
@@ -9,7 +9,8 @@
9
9
  */
10
10
  import type { Compilation } from "../Compilation";
11
11
  import type { HttpUriPluginOptions } from "../builtin-plugin";
12
- import type { Amd, AssetModuleFilename, Bail, CacheOptions, ChunkFilename, ChunkLoading, ChunkLoadingGlobal, Clean, Context, CrossOriginLoading, CssChunkFilename, CssFilename, Dependencies, DevServer, DevTool, DevtoolFallbackModuleFilenameTemplate, DevtoolModuleFilenameTemplate, DevtoolNamespace, EnabledLibraryTypes, EnabledWasmLoadingTypes, EntryDescription, Environment, Externals, ExternalsPresets, ExternalsType, Filename, GeneratorOptionsByModuleType, GlobalObject, HashDigest, HashDigestLength, HashFunction, HashSalt, HotUpdateChunkFilename, HotUpdateGlobal, HotUpdateMainFilename, Iife, ImportFunctionName, ImportMetaName, Incremental, InfrastructureLogging, JavascriptParserOptions, 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 "./types";
12
+ import type WebpackError from "../lib/WebpackError";
13
+ import type { Amd, AssetModuleFilename, Bail, CacheOptions, ChunkFilename, ChunkLoading, ChunkLoadingGlobal, Clean, Context, CrossOriginLoading, CssChunkFilename, CssFilename, Dependencies, DevServer, DevTool, DevtoolFallbackModuleFilenameTemplate, DevtoolModuleFilenameTemplate, DevtoolNamespace, EnabledLibraryTypes, EnabledWasmLoadingTypes, EntryDescription, Environment, Externals, ExternalsPresets, ExternalsType, Filename, GeneratorOptionsByModuleType, GlobalObject, HashDigest, HashDigestLength, HashFunction, HashSalt, HotUpdateChunkFilename, HotUpdateGlobal, HotUpdateMainFilename, Iife, ImportFunctionName, ImportMetaName, Incremental, 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 "./types";
13
14
  export declare const getNormalizedRspackOptions: (config: RspackOptions) => RspackOptionsNormalized;
14
15
  export type EntryDynamicNormalized = () => Promise<EntryStaticNormalized>;
15
16
  export type EntryNormalized = EntryDynamicNormalized | EntryStaticNormalized;
@@ -108,9 +109,10 @@ export interface ExperimentsNormalized {
108
109
  parallelLoader?: boolean;
109
110
  useInputFileSystem?: false | RegExp[];
110
111
  inlineConst?: boolean;
111
- typeReexportsPresence?: JavascriptParserOptions["typeReexportsPresence"];
112
+ inlineEnum?: boolean;
113
+ typeReexportsPresence?: boolean;
112
114
  }
113
- export type IgnoreWarningsNormalized = ((warning: Error, compilation: Compilation) => boolean)[];
115
+ export type IgnoreWarningsNormalized = ((warning: WebpackError, compilation: Compilation) => boolean)[];
114
116
  export type OptimizationRuntimeChunkNormalized = false | {
115
117
  name: string | ((entrypoint: {
116
118
  name: string;
@@ -6,6 +6,7 @@ import type { Module } from "../Module";
6
6
  import type ModuleGraph from "../ModuleGraph";
7
7
  import type { HttpUriPluginOptions } from "../builtin-plugin/HttpUriPlugin";
8
8
  import type { Chunk } from "../exports";
9
+ import type WebpackError from "../lib/WebpackError";
9
10
  import type { ResolveCallback } from "./adapterRuleUse";
10
11
  import type { DevServerOptions } from "./devServer";
11
12
  export type FilenameTemplate = string;
@@ -2037,15 +2038,20 @@ export type Experiments = {
2037
2038
  */
2038
2039
  useInputFileSystem?: UseInputFileSystem;
2039
2040
  /**
2040
- * Enable inline constants
2041
+ * Enable inline const feature
2041
2042
  * @default false
2042
2043
  */
2043
2044
  inlineConst?: boolean;
2044
2045
  /**
2045
- * Enable inline constants
2046
+ * Enable inline enum feature
2046
2047
  * @default false
2047
2048
  */
2048
- typeReexportsPresence?: JavascriptParserOptions["typeReexportsPresence"];
2049
+ inlineEnum?: boolean;
2050
+ /**
2051
+ * Enable type reexports presence feature
2052
+ * @default false
2053
+ */
2054
+ typeReexportsPresence?: boolean;
2049
2055
  };
2050
2056
  export type Watch = boolean;
2051
2057
  /** Options for watch mode. */
@@ -2082,9 +2088,22 @@ export interface DevServer extends DevServerOptions {
2082
2088
  }
2083
2089
  export type { Middleware as DevServerMiddleware } from "./devServer";
2084
2090
  /**
2085
- * An array of either regular expressions or functions that determine if a warning should be ignored.
2091
+ * Ignore specific warnings.
2086
2092
  */
2087
- export type IgnoreWarnings = (RegExp | ((error: Error, compilation: Compilation) => boolean))[];
2093
+ export type IgnoreWarnings = (RegExp | {
2094
+ /**
2095
+ * A RegExp to select the origin file for the warning.
2096
+ */
2097
+ file?: RegExp;
2098
+ /**
2099
+ * A RegExp to select the warning message.
2100
+ */
2101
+ message?: RegExp;
2102
+ /**
2103
+ * A RegExp to select the origin module for the warning.
2104
+ */
2105
+ module?: RegExp;
2106
+ } | ((warning: WebpackError, compilation: Compilation) => boolean))[];
2088
2107
  /**
2089
2108
  * Capture a "profile" of the application, including statistics and hints, which can then be dissected using the Analyze tool.
2090
2109
  * */
@@ -1,6 +1,6 @@
1
1
  import * as z from "zod/v4";
2
2
  import type * as t from "./types";
3
- export declare const externalsType: z.ZodEnum<{
3
+ export declare const getExternalsTypeSchema: () => z.ZodEnum<{
4
4
  module: "module";
5
5
  import: "import";
6
6
  jsonp: "jsonp";
@@ -25,7 +25,7 @@ export declare const externalsType: z.ZodEnum<{
25
25
  "node-commonjs": "node-commonjs";
26
26
  "commonjs-import": "commonjs-import";
27
27
  }>;
28
- export declare const rspackOptions: z.ZodObject<{
28
+ export declare const getRspackOptionsSchema: () => z.ZodObject<{
29
29
  name: z.ZodOptional<z.ZodString>;
30
30
  dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
31
31
  extends: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
@@ -326,7 +326,7 @@ export declare const rspackOptions: z.ZodObject<{
326
326
  production: "production";
327
327
  }>>;
328
328
  experiments: z.ZodOptional<z.ZodObject<{
329
- cache: z.ZodUnion<[z.ZodOptional<z.ZodBoolean>, z.ZodUnion<[z.ZodObject<{
329
+ cache: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodObject<{
330
330
  type: z.ZodEnum<{
331
331
  memory: "memory";
332
332
  }>;
@@ -347,15 +347,15 @@ export declare const rspackOptions: z.ZodObject<{
347
347
  }>;
348
348
  directory: z.ZodOptional<z.ZodString>;
349
349
  }, z.core.$strip>>;
350
- }, z.core.$strip>]>]>;
351
- lazyCompilation: z.ZodUnion<[z.ZodOptional<z.ZodBoolean>, z.ZodObject<{
350
+ }, z.core.$strip>]>]>>;
351
+ lazyCompilation: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
352
352
  imports: z.ZodOptional<z.ZodBoolean>;
353
353
  entries: z.ZodOptional<z.ZodBoolean>;
354
354
  test: z.ZodOptional<z.ZodUnion<[z.ZodCustom<RegExp, RegExp>, z.ZodCustom<(...args: unknown[]) => any, (...args: unknown[]) => any>]>>;
355
355
  client: z.ZodOptional<z.ZodString>;
356
356
  serverUrl: z.ZodOptional<z.ZodString>;
357
357
  prefix: z.ZodOptional<z.ZodString>;
358
- }, z.core.$strip>]>;
358
+ }, z.core.$strip>]>>;
359
359
  asyncWebAssembly: z.ZodOptional<z.ZodBoolean>;
360
360
  outputModule: z.ZodOptional<z.ZodBoolean>;
361
361
  topLevelAwait: z.ZodOptional<z.ZodBoolean>;
@@ -400,11 +400,8 @@ export declare const rspackOptions: z.ZodObject<{
400
400
  parallelLoader: z.ZodOptional<z.ZodBoolean>;
401
401
  useInputFileSystem: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodArray<z.ZodCustom<RegExp, RegExp>>]>>;
402
402
  inlineConst: z.ZodOptional<z.ZodBoolean>;
403
- typeReexportsPresence: z.ZodOptional<z.ZodEnum<{
404
- "no-tolerant": "no-tolerant";
405
- tolerant: "tolerant";
406
- "tolerant-no-check": "tolerant-no-check";
407
- }>>;
403
+ inlineEnum: z.ZodOptional<z.ZodBoolean>;
404
+ typeReexportsPresence: z.ZodOptional<z.ZodBoolean>;
408
405
  }, z.core.$strict>>;
409
406
  externals: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodCustom<RegExp, RegExp>]>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodBoolean]>, z.ZodArray<z.ZodString>]>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>]>>]>, z.ZodCustom<(...args: unknown[]) => any, (...args: unknown[]) => any>]>>, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodCustom<RegExp, RegExp>]>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodBoolean]>, z.ZodArray<z.ZodString>]>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>]>>]>, z.ZodCustom<(...args: unknown[]) => any, (...args: unknown[]) => any>]>]>>;
410
407
  externalsType: z.ZodOptional<z.ZodEnum<{
@@ -476,7 +473,11 @@ export declare const rspackOptions: z.ZodObject<{
476
473
  global: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"warn">]>>;
477
474
  }, z.core.$strict>]>>;
478
475
  loader: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
479
- ignoreWarnings: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodCustom<RegExp, RegExp>, z.ZodCustom<(...args: unknown[]) => any, (...args: unknown[]) => any>]>>>;
476
+ ignoreWarnings: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodCustom<RegExp, RegExp>, z.ZodCustom<(...args: unknown[]) => any, (...args: unknown[]) => any>]>, z.ZodObject<{
477
+ file: z.ZodOptional<z.ZodCustom<RegExp, RegExp>>;
478
+ message: z.ZodOptional<z.ZodCustom<RegExp, RegExp>>;
479
+ module: z.ZodOptional<z.ZodCustom<RegExp, RegExp>>;
480
+ }, z.core.$strip>]>>>;
480
481
  watchOptions: z.ZodOptional<z.ZodObject<{
481
482
  aggregateTimeout: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodLiteral<number>]>>;
482
483
  followSymlinks: z.ZodOptional<z.ZodBoolean>;
package/dist/exports.d.ts CHANGED
@@ -119,6 +119,7 @@ import { SplitChunksPlugin } from "./builtin-plugin";
119
119
  import { RemoveDuplicateModulesPlugin } from "./builtin-plugin";
120
120
  import { RsdoctorPlugin } from "./builtin-plugin";
121
121
  import { RstestPlugin } from "./builtin-plugin";
122
+ import { RslibPlugin } from "./builtin-plugin";
122
123
  import { CssChunkingPlugin } from "./builtin-plugin";
123
124
  interface Optimize {
124
125
  LimitChunkCountPlugin: typeof LimitChunkCountPlugin;
@@ -182,6 +183,7 @@ interface Experiments {
182
183
  RemoveDuplicateModulesPlugin: typeof RemoveDuplicateModulesPlugin;
183
184
  RsdoctorPlugin: typeof RsdoctorPlugin;
184
185
  RstestPlugin: typeof RstestPlugin;
186
+ RslibPlugin: typeof RslibPlugin;
185
187
  SubresourceIntegrityPlugin: typeof SubresourceIntegrityPlugin;
186
188
  lazyCompilationMiddleware: typeof lazyCompilationMiddleware;
187
189
  swc: {