@rspack/browser 1.7.2 → 2.0.0-canary-20260116

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.
@@ -42,7 +42,7 @@ export declare class MultiCompiler {
42
42
  watching?: MultiWatching;
43
43
  constructor(compilers: Compiler[] | Record<string, Compiler>, options?: MultiCompilerOptions);
44
44
  set unsafeFastDrop(value: boolean);
45
- get options(): import(".").RspackOptionsNormalized[] & MultiCompilerOptions;
45
+ get options(): import("./config").RspackOptionsNormalized[] & MultiCompilerOptions;
46
46
  get outputPath(): string;
47
47
  get inputFileSystem(): InputFileSystem;
48
48
  get outputFileSystem(): typeof import("fs");
@@ -105,11 +105,6 @@ export type LoaderOptions = {
105
105
  targets?: Targets | string[] | string;
106
106
  include?: FeatureOptions;
107
107
  exclude?: FeatureOptions;
108
- /**
109
- * @deprecated Use `drafts` instead.
110
- * This will be removed in the next major version.
111
- */
112
- draft?: Drafts;
113
108
  drafts?: Drafts;
114
109
  nonStandard?: NonStandard;
115
110
  pseudoClasses?: PseudoClasses;
@@ -21,12 +21,6 @@ export type SwcLoaderOptions = Config & {
21
21
  */
22
22
  rspackExperiments?: {
23
23
  import?: PluginImportOptions;
24
- /**
25
- * @deprecated Use top-level `collectTypeScriptInfo` instead.
26
- * Collects information from TypeScript's AST for consumption by subsequent Rspack processes,
27
- * providing better TypeScript development experience and smaller output bundle size.
28
- */
29
- collectTypeScriptInfo?: CollectTypeScriptInfoOptions;
30
24
  };
31
25
  };
32
26
  export interface TerserCompressOptions {
@@ -12,7 +12,7 @@ declare const EnableChunkLoadingPluginInner: {
12
12
  new (type: string): {
13
13
  name: string;
14
14
  _args: [type: string];
15
- affectedHooks: keyof import("../Compiler").CompilerHooks | undefined;
15
+ affectedHooks: keyof import("..").CompilerHooks | undefined;
16
16
  raw(compiler: Compiler): import("../binding").BuiltinPlugin;
17
17
  apply(compiler: Compiler): void;
18
18
  };
@@ -3,7 +3,7 @@ export declare const JsLoaderRspackPlugin: {
3
3
  new (compiler: Compiler): {
4
4
  name: string;
5
5
  _args: [compiler: Compiler];
6
- affectedHooks: keyof import("../Compiler").CompilerHooks | undefined;
6
+ affectedHooks: keyof import("..").CompilerHooks | undefined;
7
7
  raw(compiler: Compiler): import("../binding").BuiltinPlugin;
8
8
  apply(compiler: Compiler): void;
9
9
  };
@@ -10,11 +10,6 @@ export type LightningCssMinimizerRspackPluginOptions = {
10
10
  targets?: string[] | string;
11
11
  include?: FeatureOptions;
12
12
  exclude?: FeatureOptions;
13
- /**
14
- * @deprecated Use `drafts` instead.
15
- * This will be removed in the next major version.
16
- */
17
- draft?: Drafts;
18
13
  drafts?: Drafts;
19
14
  nonStandard?: NonStandard;
20
15
  pseudoClasses?: PseudoClasses;
@@ -18,7 +18,7 @@ declare const RsdoctorPluginImpl: {
18
18
  new (c?: RsdoctorPluginOptions | undefined): {
19
19
  name: string;
20
20
  _args: [c?: RsdoctorPluginOptions | undefined];
21
- affectedHooks: keyof import("../Compiler").CompilerHooks | undefined;
21
+ affectedHooks: keyof import("..").CompilerHooks | undefined;
22
22
  raw(compiler: Compiler): import("../binding").BuiltinPlugin;
23
23
  apply(compiler: Compiler): void;
24
24
  };
@@ -39,10 +39,6 @@ export type RsdoctorPluginHooks = {
39
39
  assets: liteTapable.AsyncSeriesBailHook<[JsRsdoctorAssetPatch], false | void>;
40
40
  };
41
41
  declare const RsdoctorPlugin: typeof RsdoctorPluginImpl & {
42
- /**
43
- * @deprecated Use `getCompilationHooks` instead.
44
- */
45
- getHooks: (compilation: Compilation) => RsdoctorPluginHooks;
46
42
  getCompilationHooks: (compilation: Compilation) => RsdoctorPluginHooks;
47
43
  };
48
44
  export declare const createRsdoctorPluginHooksRegisters: CreatePartialRegisters<`RsdoctorPlugin`>;
@@ -19,10 +19,6 @@ export type RuntimePluginHooks = {
19
19
  linkPrefetch: liteTapable.SyncWaterfallHook<[string, Chunk]>;
20
20
  };
21
21
  declare const RuntimePlugin: typeof RuntimePluginImpl & {
22
- /**
23
- * @deprecated Use `getCompilationHooks` instead.
24
- */
25
- getHooks: (compilation: Compilation) => RuntimePluginHooks;
26
22
  getCompilationHooks: (compilation: Compilation) => RuntimePluginHooks;
27
23
  };
28
24
  export declare const createRuntimePluginHooksRegisters: CreatePartialRegisters<`RuntimePlugin`>;
@@ -20,7 +20,7 @@ declare const NativeSubresourceIntegrityPlugin: {
20
20
  new (options: NativeSubresourceIntegrityPluginOptions): {
21
21
  name: string;
22
22
  _args: [options: NativeSubresourceIntegrityPluginOptions];
23
- affectedHooks: keyof import("../Compiler").CompilerHooks | undefined;
23
+ affectedHooks: keyof import("..").CompilerHooks | undefined;
24
24
  raw(compiler: Compiler): import("../binding").BuiltinPlugin;
25
25
  apply(compiler: Compiler): void;
26
26
  };
@@ -52,11 +52,6 @@ export type HtmlRspackPluginOptions = {
52
52
  * @default "auto"
53
53
  */
54
54
  chunksSortMode?: 'auto' | 'manual';
55
- /**
56
- * Configure the SRI hash algorithm, which is disabled by default.
57
- * @deprecated Use `experiments.SubresourceIntegrityPlugin` instead.
58
- */
59
- sri?: 'sha256' | 'sha384' | 'sha512';
60
55
  /**
61
56
  * Controls whether to minify the output, disabled by default.
62
57
  */
@@ -7,16 +7,12 @@ declare const HtmlRspackPluginImpl: {
7
7
  new (c?: HtmlRspackPluginOptions | undefined): {
8
8
  name: string;
9
9
  _args: [c?: HtmlRspackPluginOptions | undefined];
10
- affectedHooks: keyof import("../../Compiler").CompilerHooks | undefined;
10
+ affectedHooks: keyof import("../..").CompilerHooks | undefined;
11
11
  raw(compiler: Compiler): import("../../binding").BuiltinPlugin;
12
12
  apply(compiler: Compiler): void;
13
13
  };
14
14
  };
15
15
  declare const HtmlRspackPlugin: typeof HtmlRspackPluginImpl & {
16
- /**
17
- * @deprecated Use `getCompilationHooks` instead.
18
- */
19
- getHooks: (compilation: Compilation) => HtmlRspackPluginHooks;
20
16
  getCompilationHooks: (compilation: Compilation) => HtmlRspackPluginHooks;
21
17
  createHtmlTagObject: (tagName: string, attributes?: Record<string, string | boolean>, innerHTML?: string) => JsHtmlPluginTag;
22
18
  version: number;
@@ -10,7 +10,7 @@
10
10
  import type { HttpUriPluginOptions } from '../builtin-plugin';
11
11
  import type { Compilation } from '../Compilation';
12
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, 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 './types';
13
+ import type { Amd, AssetModuleFilename, Bail, BundlerInfoOptions, 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, Node, NoParseOption, Optimization, OutputModule, ParserOptionsByModuleType, Path, Performance, Plugins, PublicPath, Resolve, RspackOptions, RuleSetRules, ScriptType, SnapshotOptions, SourceMapFilename, StatsValue, StrictModuleErrorHandling, Target, TrustedTypes, UniqueName, WasmLoading, Watch, WatchOptions, WebassemblyModuleFilename, WorkerPublicPath } from './types';
14
14
  export declare const getNormalizedRspackOptions: (config: RspackOptions) => RspackOptionsNormalized;
15
15
  export type EntryDynamicNormalized = () => Promise<EntryStaticNormalized>;
16
16
  export type EntryNormalized = EntryDynamicNormalized | EntryStaticNormalized;
@@ -66,9 +66,9 @@ export interface OutputNormalized {
66
66
  devtoolModuleFilenameTemplate?: DevtoolModuleFilenameTemplate;
67
67
  devtoolFallbackModuleFilenameTemplate?: DevtoolFallbackModuleFilenameTemplate;
68
68
  environment?: Environment;
69
- charset?: boolean;
70
69
  chunkLoadTimeout?: number;
71
70
  compareBeforeEmit?: boolean;
71
+ bundlerInfo?: BundlerInfoOptions;
72
72
  }
73
73
  export interface ModuleOptionsNormalized {
74
74
  defaultRules?: RuleSetRules;
@@ -78,7 +78,7 @@ export interface ModuleOptionsNormalized {
78
78
  noParse?: NoParseOption;
79
79
  unsafeCache?: boolean | RegExp;
80
80
  }
81
- export type ExperimentCacheNormalized = boolean | {
81
+ export type CacheNormalized = boolean | {
82
82
  type: 'memory';
83
83
  } | {
84
84
  type: 'persistent';
@@ -95,40 +95,13 @@ export type ExperimentCacheNormalized = boolean | {
95
95
  };
96
96
  };
97
97
  export interface ExperimentsNormalized {
98
- cache?: ExperimentCacheNormalized;
99
- /**
100
- * @deprecated This option is deprecated and will be removed in future versions.
101
- *
102
- * Please use the Configuration top-level `lazyCompilation` option instead.
103
- */
104
- lazyCompilation?: false | LazyCompilationOptions;
105
98
  asyncWebAssembly?: boolean;
106
99
  outputModule?: boolean;
107
- topLevelAwait?: boolean;
108
100
  css?: boolean;
109
- /**
110
- * @deprecated This option is deprecated, layers is enabled since v1.6.0
111
- */
112
- layers?: boolean;
113
101
  incremental?: false | Incremental;
114
102
  futureDefaults?: boolean;
115
- rspackFuture?: RspackFutureOptions;
116
103
  buildHttp?: HttpUriPluginOptions;
117
- parallelLoader?: boolean;
118
104
  useInputFileSystem?: false | RegExp[];
119
- /**
120
- * @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
121
- */
122
- inlineConst?: boolean;
123
- /**
124
- * @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
125
- */
126
- inlineEnum?: boolean;
127
- typeReexportsPresence?: boolean;
128
- /**
129
- * @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
130
- */
131
- lazyBarrel?: boolean;
132
105
  nativeWatcher?: boolean;
133
106
  deferImport?: boolean;
134
107
  }
@@ -157,7 +130,7 @@ export interface RspackOptionsNormalized {
157
130
  node: Node;
158
131
  loader: Loader;
159
132
  snapshot: SnapshotOptions;
160
- cache?: CacheOptions;
133
+ cache?: CacheNormalized;
161
134
  stats: StatsValue;
162
135
  optimization: Optimization;
163
136
  plugins: Plugins;
@@ -168,7 +141,6 @@ export interface RspackOptionsNormalized {
168
141
  devServer?: DevServer;
169
142
  ignoreWarnings?: IgnoreWarningsNormalized;
170
143
  performance?: Performance;
171
- profile?: Profile;
172
144
  amd?: Amd;
173
145
  bail?: Bail;
174
146
  }
@@ -325,14 +325,6 @@ export type Output = {
325
325
  crossOriginLoading?: CrossOriginLoading;
326
326
  /** This option determines the name of CSS output files on disk. */
327
327
  cssFilename?: CssFilename;
328
- /**
329
- * @deprecated this config is unused, and will be removed in the future.
330
- * Rspack adds some metadata in CSS to parse CSS modules, and this configuration determines whether to compress these metadata.
331
- *
332
- * The value is `true` in production mode.
333
- * The value is `false` in development mode.
334
- * */
335
- cssHeadDataCompression?: boolean;
336
328
  /** This option determines the name of non-initial CSS output files on disk. */
337
329
  cssChunkFilename?: CssChunkFilename;
338
330
  /**
@@ -369,26 +361,6 @@ export type Output = {
369
361
  enabledLibraryTypes?: EnabledLibraryTypes;
370
362
  /** Output a library exposing the exports of your entry point. */
371
363
  library?: Library;
372
- /**
373
- * Specify which export should be exposed as a library.
374
- * @deprecated We might drop support for this, so prefer to use output.library.export
375
- * */
376
- libraryExport?: LibraryExport;
377
- /**
378
- * Configure how the library will be exposed.
379
- * @deprecated Use output.library.type instead as we might drop support for output.libraryTarget in the future.
380
- * */
381
- libraryTarget?: LibraryType;
382
- /**
383
- * When using output.library.type: "umd", setting output.umdNamedDefine to true will name the AMD module of the UMD build.
384
- * @deprecated Use output.library.umdNamedDefine instead.
385
- */
386
- umdNamedDefine?: UmdNamedDefine;
387
- /**
388
- * Add a comment in the UMD wrapper.
389
- * @deprecated use output.library.auxiliaryComment instead.
390
- * */
391
- auxiliaryComment?: AuxiliaryComment;
392
364
  /**
393
365
  * Output JavaScript files as module type.
394
366
  * Disabled by default as it's an experimental feature. To use it, you must set experiments.outputModule to true.
@@ -501,17 +473,16 @@ export type Output = {
501
473
  * @default 120000
502
474
  * */
503
475
  chunkLoadTimeout?: number;
504
- /**
505
- * Add charset="utf-8" to the HTML <script> tag.
506
- * @default true
507
- * */
508
- charset?: boolean;
509
476
  /** Tell Rspack what kind of ES-features may be used in the generated runtime-code. */
510
477
  environment?: Environment;
511
478
  /**
512
479
  * Check if to be emitted file already exists and have the same content before writing to output filesystem.
513
480
  */
514
481
  compareBeforeEmit?: boolean;
482
+ /**
483
+ * Information about the bundler.
484
+ */
485
+ bundlerInfo?: BundlerInfoOptions;
515
486
  };
516
487
  /**
517
488
  * Path alias
@@ -855,17 +826,33 @@ export type JavascriptParserOptions = {
855
826
  overrideStrict?: 'strict' | 'non-strict';
856
827
  /**
857
828
  * Control whether renaming of the CommonJS `require` function will be parsed and transformed.
858
- * @default true
829
+ * @default false
859
830
  */
860
831
  requireAlias?: boolean;
832
+ /**
833
+ * Control whether `require` used as an expression (e.g., `const req = require; req('./module')`) will be parsed.
834
+ * @default true
835
+ */
861
836
  requireAsExpression?: boolean;
837
+ /**
838
+ * Control whether dynamic `require` calls (e.g., `require(variable)`) will be parsed.
839
+ * @default true
840
+ */
862
841
  requireDynamic?: boolean;
842
+ /**
843
+ * Control whether `require.resolve()` calls will be parsed.
844
+ * @default true
845
+ */
863
846
  requireResolve?: boolean;
864
847
  /**
865
848
  * CommonJS-specific parser options. `true` enables the default behaviour, `{ exports: 'skipInEsm' }` preserves CommonJS export mutations when executed inside ESM.
866
849
  * @default true
867
850
  */
868
851
  commonjs?: JavascriptParserCommonjsOption;
852
+ /**
853
+ * Control whether dynamic `import()` calls (e.g., `import(variable)`) will be parsed.
854
+ * @default true
855
+ */
869
856
  importDynamic?: boolean;
870
857
  /**
871
858
  * Enable magic comments for CommonJS require() expressions.
@@ -875,7 +862,11 @@ export type JavascriptParserOptions = {
875
862
  typeReexportsPresence?: 'no-tolerant' | 'tolerant' | 'tolerant-no-check';
876
863
  /** Whether to enable JSX parsing */
877
864
  jsx?: boolean;
878
- /** Whether to enable defer import */
865
+ /**
866
+ * Whether to enable defer import.
867
+ * This option is controlled by `experiments.deferImport` and should not be set directly.
868
+ * @default false
869
+ */
879
870
  deferImport?: boolean;
880
871
  };
881
872
  export type JsonParserOptions = {
@@ -1059,12 +1050,12 @@ type AllowTarget = 'web' | 'webworker' | 'es3' | 'es5' | 'es2015' | 'es2016' | '
1059
1050
  export type Target = false | AllowTarget | AllowTarget[];
1060
1051
  /**
1061
1052
  * Specify the default type of externals.
1062
- * `amd`, `umd`, `system` and `jsonp` externals depend on the `output.libraryTarget` being set to the same value e.g. you can only consume amd externals within an amd library.
1053
+ * `amd`, `umd`, `system` and `jsonp` externals depend on the `output.library.type` being set to the same value e.g. you can only consume amd externals within an amd library.
1063
1054
  * @default 'var'
1064
1055
  */
1065
1056
  export type ExternalsType = 'var' | 'module' | 'assign' | 'this' | 'window' | 'self' | 'global' | 'commonjs' | 'commonjs2' | 'commonjs-module' | 'commonjs-static' | 'amd' | 'amd-require' | 'umd' | 'umd2' | 'jsonp' | 'system' | 'promise' | 'import' | 'module-import' | 'script' | 'node-commonjs' | 'commonjs-import';
1066
1057
  /**
1067
- * External item object when both libraryTarget and externalsType is 'umd'
1058
+ * External item object when both library.type and externalsType is 'umd'
1068
1059
  */
1069
1060
  export type ExternalItemUmdValue = {
1070
1061
  root: string | string[];
@@ -1081,7 +1072,7 @@ export type ExternalItemObjectValue = Record<string, string | string[]>;
1081
1072
  */
1082
1073
  export type ExternalItemValue = string | boolean | string[] | ExternalItemUmdValue
1083
1074
  /**
1084
- * when libraryTarget and externalsType is not 'umd'
1075
+ * when library.type and externalsType is not 'umd'
1085
1076
  */
1086
1077
  | ExternalItemObjectValue;
1087
1078
  /**
@@ -1255,7 +1246,22 @@ export type SnapshotOptions = {};
1255
1246
  * // Disable caching
1256
1247
  * cache: false
1257
1248
  */
1258
- export type CacheOptions = boolean;
1249
+ export type CacheOptions = boolean | {
1250
+ type: 'memory';
1251
+ } | {
1252
+ type: 'persistent';
1253
+ buildDependencies?: string[];
1254
+ version?: string;
1255
+ snapshot?: {
1256
+ immutablePaths?: (string | RegExp)[];
1257
+ unmanagedPaths?: (string | RegExp)[];
1258
+ managedPaths?: (string | RegExp)[];
1259
+ };
1260
+ storage?: {
1261
+ type: 'filesystem';
1262
+ directory?: string;
1263
+ };
1264
+ };
1259
1265
  export type StatsPresets = 'normal' | 'none' | 'verbose' | 'errors-only' | 'errors-warnings' | 'minimal' | 'detailed' | 'summary';
1260
1266
  type ModuleFilterItemTypes = RegExp | string | ((name: string, module: any, type: any) => boolean);
1261
1267
  type ModuleFilterTypes = boolean | ModuleFilterItemTypes | ModuleFilterItemTypes[];
@@ -1917,53 +1923,21 @@ export type Optimization = {
1917
1923
  avoidEntryIife?: boolean;
1918
1924
  };
1919
1925
  /**
1920
- * Options for caching snapshots and intermediate products during the build process.
1921
- * @description Controls whether caching is enabled or disabled.
1922
- * @default true in development mode, false in production mode
1923
- * @example
1924
- * // Enable caching
1925
- * cache: true
1926
- *
1927
- * // Disable caching
1928
- * cache: false
1926
+ * Information about the bundler.
1929
1927
  */
1930
- export type ExperimentCacheOptions = boolean | {
1931
- type: 'memory';
1932
- } | {
1933
- type: 'persistent';
1934
- buildDependencies?: string[];
1928
+ export type BundlerInfoOptions = {
1929
+ /**
1930
+ * Version of the bundler.
1931
+ */
1935
1932
  version?: string;
1936
- snapshot?: {
1937
- immutablePaths?: (string | RegExp)[];
1938
- unmanagedPaths?: (string | RegExp)[];
1939
- managedPaths?: (string | RegExp)[];
1940
- };
1941
- storage?: {
1942
- type: 'filesystem';
1943
- directory?: string;
1944
- };
1945
- };
1946
- /**
1947
- * Options for future Rspack features.
1948
- */
1949
- export type RspackFutureOptions = {
1950
1933
  /**
1951
- * Information about the bundler.
1934
+ * Name of the bundler.
1952
1935
  */
1953
- bundlerInfo?: {
1954
- /**
1955
- * Version of the bundler.
1956
- */
1957
- version?: string;
1958
- /**
1959
- * Name of the bundler.
1960
- */
1961
- bundler?: string;
1962
- /**
1963
- * Force specific features.
1964
- */
1965
- force?: boolean | ('version' | 'uniqueId')[];
1966
- };
1936
+ bundler?: string;
1937
+ /**
1938
+ * Force specific features.
1939
+ */
1940
+ force?: boolean | ('version' | 'uniqueId')[];
1967
1941
  };
1968
1942
  /**
1969
1943
  * Options for lazy compilation.
@@ -2087,16 +2061,6 @@ export type UseInputFileSystem = false | RegExp[];
2087
2061
  * Experimental features configuration.
2088
2062
  */
2089
2063
  export type Experiments = {
2090
- /**
2091
- * Enable new cache.
2092
- */
2093
- cache?: ExperimentCacheOptions;
2094
- /**
2095
- * Enable lazy compilation.
2096
- * @deprecated Please use the configuration top-level `lazyCompilation` option instead.
2097
- * @default false
2098
- */
2099
- lazyCompilation?: boolean | LazyCompilationOptions;
2100
2064
  /**
2101
2065
  * Enable async WebAssembly.
2102
2066
  * Support the new WebAssembly according to the [updated specification](https://github.com/WebAssembly/esm-integration), it makes a WebAssembly module an async module.
@@ -2108,12 +2072,6 @@ export type Experiments = {
2108
2072
  * @default false
2109
2073
  */
2110
2074
  outputModule?: boolean;
2111
- /**
2112
- * Enable top-level await.
2113
- * @deprecated This option is deprecated, top-level await is enabled by default.
2114
- * @default true
2115
- */
2116
- topLevelAwait?: boolean;
2117
2075
  /**
2118
2076
  * Enable CSS support.
2119
2077
  *
@@ -2127,12 +2085,6 @@ export type Experiments = {
2127
2085
  * - `module.generator["css/module"]`
2128
2086
  */
2129
2087
  css?: boolean;
2130
- /**
2131
- * Enable module layers feature.
2132
- * @deprecated This option is deprecated, layers is enabled since v1.6.0
2133
- * @default false
2134
- */
2135
- layers?: boolean;
2136
2088
  /**
2137
2089
  * Enable incremental builds.
2138
2090
  */
@@ -2142,20 +2094,11 @@ export type Experiments = {
2142
2094
  * @default false
2143
2095
  */
2144
2096
  futureDefaults?: boolean;
2145
- /**
2146
- * Enable future Rspack features default options.
2147
- */
2148
- rspackFuture?: RspackFutureOptions;
2149
2097
  /**
2150
2098
  * Enable loading of modules via HTTP/HTTPS requests.
2151
2099
  * @default false
2152
2100
  */
2153
2101
  buildHttp?: HttpUriOptions;
2154
- /**
2155
- * Enable parallel loader
2156
- * @default false
2157
- */
2158
- parallelLoader?: boolean;
2159
2102
  /**
2160
2103
  * Enable Node.js input file system
2161
2104
  * @default false
@@ -2166,30 +2109,6 @@ export type Experiments = {
2166
2109
  * @default false
2167
2110
  */
2168
2111
  nativeWatcher?: boolean;
2169
- /**
2170
- * Enable inline const feature
2171
- * @default false
2172
- * @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
2173
- */
2174
- inlineConst?: boolean;
2175
- /**
2176
- * Enable inline enum feature
2177
- * @default false
2178
- * @deprecated This option is deprecated, it's already stable. Rspack will remove this option in future version
2179
- */
2180
- inlineEnum?: boolean;
2181
- /**
2182
- * Enable type reexports presence feature
2183
- * @default false
2184
- * @deprecated This option is deprecated, it's already stable. Rspack will remove this option in future version
2185
- */
2186
- typeReexportsPresence?: boolean;
2187
- /**
2188
- * Enable lazy make side effects free barrel file
2189
- * @default false
2190
- * @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
2191
- */
2192
- lazyBarrel?: boolean;
2193
2112
  /**
2194
2113
  * Enable defer import feature
2195
2114
  * @default false
@@ -2246,10 +2165,6 @@ export type IgnoreWarnings = (RegExp | {
2246
2165
  */
2247
2166
  module?: RegExp;
2248
2167
  } | ((warning: WebpackError, compilation: Compilation) => boolean))[];
2249
- /**
2250
- * Capture a "profile" of the application, including statistics and hints, which can then be dissected using the Analyze tool.
2251
- * */
2252
- export type Profile = boolean;
2253
2168
  /**
2254
2169
  * Set the value of `require.amd` and `define.amd`. Or disable AMD support.
2255
2170
  */
@@ -2405,10 +2320,6 @@ export type RspackOptions = {
2405
2320
  * Options for module configuration.
2406
2321
  */
2407
2322
  module?: ModuleOptions;
2408
- /**
2409
- * Whether to capture a profile of the application.
2410
- */
2411
- profile?: Profile;
2412
2323
  /**
2413
2324
  * Set the value of `require.amd` or `define.amd`.
2414
2325
  * Setting `amd` to false will disable rspack's AMD support.
package/dist/exports.d.ts CHANGED
@@ -31,7 +31,7 @@ export { ModuleFilenameHelpers };
31
31
  export { Template } from './Template';
32
32
  export declare const WebpackError: ErrorConstructor;
33
33
  export type { Watching } from './Watching';
34
- import sources = require('webpack-sources');
34
+ import * as sources from 'webpack-sources';
35
35
  export { sources };
36
36
  import { applyRspackOptionsDefaults, getNormalizedRspackOptions } from './config';
37
37
  type Config = {
@@ -47,11 +47,7 @@ export declare const util: {
47
47
  cleverMerge: <First, Second>(first: First, second: Second) => First | Second | (First & Second);
48
48
  };
49
49
  export type { BannerPluginArgument, DefinePluginOptions, EntryOptions, ProgressPluginArgument, ProvidePluginOptions, } from './builtin-plugin';
50
- export { BannerPlugin, CaseSensitivePlugin,
51
- /**
52
- * @deprecated Use `rspack.CaseSensitivePlugin` instead
53
- */
54
- CaseSensitivePlugin as WarnCaseSensitiveModulesPlugin, DefinePlugin, DynamicEntryPlugin, EntryPlugin, ExternalsPlugin, HotModuleReplacementPlugin, IgnorePlugin, type IgnorePluginOptions, NoEmitOnErrorsPlugin, ProgressPlugin, ProvidePlugin, RuntimePlugin, } from './builtin-plugin';
50
+ export { BannerPlugin, CaseSensitivePlugin, DefinePlugin, DynamicEntryPlugin, EntryPlugin, ExternalsPlugin, HotModuleReplacementPlugin, IgnorePlugin, type IgnorePluginOptions, NoEmitOnErrorsPlugin, ProgressPlugin, ProvidePlugin, RuntimePlugin, } from './builtin-plugin';
55
51
  export { DllPlugin, type DllPluginOptions } from './lib/DllPlugin';
56
52
  export { DllReferencePlugin, type DllReferencePluginOptions, type DllReferencePluginOptionsContent, type DllReferencePluginOptionsManifest, type DllReferencePluginOptionsSourceType, } from './lib/DllReferencePlugin';
57
53
  export { default as EntryOptionPlugin } from './lib/EntryOptionPlugin';
@@ -147,18 +143,10 @@ interface Experiments {
147
143
  cleanup: () => Promise<void>;
148
144
  };
149
145
  RemoveDuplicateModulesPlugin: typeof RemoveDuplicateModulesPlugin;
150
- /**
151
- * @deprecated Use `rspack.SubresourceIntegrityPlugin` instead
152
- */
153
- SubresourceIntegrityPlugin: typeof SubresourceIntegrityPlugin;
154
146
  EsmLibraryPlugin: typeof EsmLibraryPlugin;
155
147
  RsdoctorPlugin: typeof RsdoctorPlugin;
156
148
  RstestPlugin: typeof RstestPlugin;
157
149
  RslibPlugin: typeof RslibPlugin;
158
- /**
159
- * @deprecated Use `rspack.lazyCompilationMiddleware` instead
160
- */
161
- lazyCompilationMiddleware: typeof lazyCompilationMiddleware;
162
150
  swc: {
163
151
  transform: typeof transform;
164
152
  minify: typeof minify;