@rspack/core 1.0.14 → 1.1.0-beta.0

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.
@@ -1,439 +1,13 @@
1
- /**
2
- * Some types are modified from https://github.com/swc-project/swc/blob/16a38851/packages/types/index.ts#L647
3
- * license at https://github.com/swc-project/swc/blob/main/LICENSE
4
- */
1
+ import type { Config, EnvConfig, EsParserConfig, JscConfig, ModuleConfig, ParserConfig, TransformConfig, TsParserConfig } from "../../../compiled/@swc/types";
5
2
  import type { PluginImportOptions } from "./pluginImport";
6
- import type { ReactOptions } from "./react";
7
- export type JscTarget = "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "esnext";
8
- export type SwcLoaderParserConfig = SwcLoaderTsParserConfig | SwcLoaderEsParserConfig;
9
- export interface SwcLoaderTsParserConfig {
10
- syntax: "typescript";
11
- /**
12
- * Defaults to `false`.
13
- */
14
- tsx?: boolean;
15
- /**
16
- * Defaults to `false`.
17
- */
18
- decorators?: boolean;
19
- /**
20
- * Defaults to `false`
21
- */
22
- dynamicImport?: boolean;
23
- }
24
- export interface SwcLoaderEsParserConfig {
25
- syntax: "ecmascript";
26
- /**
27
- * Defaults to false.
28
- */
29
- jsx?: boolean;
30
- /**
31
- * Defaults to `false`
32
- */
33
- functionBind?: boolean;
34
- /**
35
- * Defaults to `false`
36
- */
37
- decorators?: boolean;
38
- /**
39
- * Defaults to `false`
40
- */
41
- decoratorsBeforeExport?: boolean;
42
- /**
43
- * Defaults to `false`
44
- */
45
- exportDefaultFrom?: boolean;
46
- /**
47
- * Defaults to `false`
48
- */
49
- importAssertions?: boolean;
50
- }
51
- /**
52
- * - `import { DEBUG } from '@ember/env-flags';`
53
- * - `import { FEATURE_A, FEATURE_B } from '@ember/features';`
54
- *
55
- * See: https://github.com/swc-project/swc/issues/18#issuecomment-466272558
56
- */
57
- export type ConstModulesConfig = {
58
- globals?: {
59
- [module: string]: {
60
- [name: string]: string;
61
- };
62
- };
63
- };
64
- /**
65
- * Options for inline-global pass.
66
- */
67
- export interface GlobalPassOption {
68
- /**
69
- * Global variables that should be inlined with passed value.
70
- *
71
- * e.g. `{ __DEBUG__: true }`
72
- */
73
- vars?: Record<string, string>;
74
- /**
75
- * Names of environment variables that should be inlined with the value of corresponding env during build.
76
- *
77
- * Defaults to `["NODE_ENV", "SWC_ENV"]`
78
- */
79
- envs?: string[] | Record<string, string>;
80
- /**
81
- * Replaces typeof calls for passed variables with corresponding value
82
- *
83
- * e.g. `{ window: 'object' }`
84
- */
85
- typeofs?: Record<string, string>;
86
- }
87
- /**
88
- * https://swc.rs/docs/configuring-swc.html#jsctransformoptimizerjsonify
89
- */
90
- export type OptimizerConfig = {
91
- /**
92
- * https://swc.rs/docs/configuration/compilation#jsctransformoptimizersimplify
93
- */
94
- simplify?: boolean;
95
- /**
96
- * https://swc.rs/docs/configuring-swc.html#jsctransformoptimizerglobals
97
- */
98
- globals?: GlobalPassOption;
99
- /**
100
- * https://swc.rs/docs/configuring-swc.html#jsctransformoptimizerjsonify
101
- */
102
- jsonify?: {
103
- minCost: number;
104
- };
105
- };
106
- export interface SwcLoaderTransformConfig {
107
- /**
108
- * Effective only if `syntax` supports ƒ.
109
- */
110
- react?: ReactOptions;
111
- constModules?: ConstModulesConfig;
112
- /**
113
- * Defaults to null, which skips optimizer pass.
114
- */
115
- optimizer?: OptimizerConfig;
116
- /**
117
- * https://swc.rs/docs/configuring-swc.html#jsctransformlegacydecorator
118
- */
119
- legacyDecorator?: boolean;
120
- /**
121
- * https://swc.rs/docs/configuring-swc.html#jsctransformdecoratormetadata
122
- */
123
- decoratorMetadata?: boolean;
124
- /**
125
- * https://swc.rs/docs/configuration/compilation#jsctransformdecoratorversion
126
- */
127
- decoratorVersion?: "2021-12" | "2022-03";
128
- treatConstEnumAsEnum?: boolean;
129
- useDefineForClassFields?: boolean;
130
- }
131
- export interface SwcLoaderEnvConfig {
132
- mode?: "usage" | "entry";
133
- debug?: boolean;
134
- dynamicImport?: boolean;
135
- loose?: boolean;
136
- /**
137
- * Transpiles the broken syntax to the closest non-broken modern syntax
138
- * Defaults to false.
139
- */
140
- bugfixes?: boolean;
141
- /**
142
- * Skipped es features.
143
- * e.g.)
144
- * - `core-js/modules/foo`
145
- */
146
- skip?: string[];
147
- include?: string[];
148
- exclude?: string[];
149
- /**
150
- * The version of the used core js.
151
- */
152
- coreJs?: string;
153
- targets?: any;
154
- path?: string;
155
- shippedProposals?: boolean;
156
- /**
157
- * Enable all transforms
158
- */
159
- forceAllTransforms?: boolean;
160
- }
161
- export interface SwcLoaderJscConfig {
162
- loose?: boolean;
163
- /**
164
- * Defaults to EsParserConfig
165
- */
166
- parser?: SwcLoaderParserConfig;
167
- transform?: SwcLoaderTransformConfig;
168
- /**
169
- * Use `@swc/helpers` instead of inline helpers.
170
- */
171
- externalHelpers?: boolean;
172
- /**
173
- * Defaults to `es3` (which enabled **all** pass).
174
- */
175
- target?: JscTarget;
176
- /**
177
- * Keep class names.
178
- */
179
- keepClassNames?: boolean;
180
- /**
181
- * This is experimental, and can be removed without a major version bump.
182
- */
183
- experimental?: {
184
- optimizeHygiene?: boolean;
185
- /**
186
- * Preserve `with` in imports and exports.
187
- */
188
- keepImportAttributes?: boolean;
189
- /**
190
- * Use `assert` instead of `with` for imports and exports.
191
- * This option only works when `keepImportAttributes` is `true`.
192
- */
193
- emitAssertForImportAttributes?: boolean;
194
- /**
195
- * Specify the location where SWC stores its intermediate cache files.
196
- * Currently only transform plugin uses this. If not specified, SWC will
197
- * create `.swc` directories.
198
- */
199
- cacheRoot?: string;
200
- /**
201
- * List of custom transform plugins written in WebAssembly.
202
- * First parameter of tuple indicates the name of the plugin - it can be either
203
- * a name of the npm package can be resolved, or absolute path to .wasm binary.
204
- *
205
- * Second parameter of tuple is JSON based configuration for the plugin.
206
- */
207
- plugins?: Array<[string, Record<string, any>]>;
208
- /**
209
- * Disable builtin transforms. If enabled, only Wasm plugins are used.
210
- */
211
- disableBuiltinTransformsForInternalTesting?: boolean;
212
- };
213
- baseUrl?: string;
214
- paths?: {
215
- [from: string]: [string];
216
- };
217
- preserveAllComments?: boolean;
218
- }
219
- export type SwcLoaderModuleConfig = Es6Config | CommonJsConfig | UmdConfig | AmdConfig | NodeNextConfig | SystemjsConfig;
220
- export interface BaseModuleConfig {
221
- /**
222
- * By default, when using exports with babel a non-enumerable `__esModule`
223
- * property is exported. In some cases this property is used to determine
224
- * if the import is the default export or if it contains the default export.
225
- *
226
- * In order to prevent the __esModule property from being exported, you
227
- * can set the strict option to true.
228
- *
229
- * Defaults to `false`.
230
- */
231
- strict?: boolean;
232
- /**
233
- * Emits 'use strict' directive.
234
- *
235
- * Defaults to `true`.
236
- */
237
- strictMode?: boolean;
238
- /**
239
- * Changes Babel's compiled import statements to be lazily evaluated when their imported bindings are used for the first time.
240
- *
241
- * This can improve initial load time of your module because evaluating dependencies up
242
- * front is sometimes entirely un-necessary. This is especially the case when implementing
243
- * a library module.
244
- *
245
- *
246
- * The value of `lazy` has a few possible effects:
247
- *
248
- * - `false` - No lazy initialization of any imported module.
249
- * - `true` - Do not lazy-initialize local `./foo` imports, but lazy-init `foo` dependencies.
250
- *
251
- * Local paths are much more likely to have circular dependencies, which may break if loaded lazily,
252
- * so they are not lazy by default, whereas dependencies between independent modules are rarely cyclical.
253
- *
254
- * - `Array<string>` - Lazy-initialize all imports with source matching one of the given strings.
255
- *
256
- * -----
257
- *
258
- * The two cases where imports can never be lazy are:
259
- *
260
- * - `import "foo";`
261
- *
262
- * Side-effect imports are automatically non-lazy since their very existence means
263
- * that there is no binding to later kick off initialization.
264
- *
265
- * - `export * from "foo"`
266
- *
267
- * Re-exporting all names requires up-front execution because otherwise there is no
268
- * way to know what names need to be exported.
269
- *
270
- * Defaults to `false`.
271
- */
272
- lazy?: boolean | string[];
273
- /**
274
- * @deprecated Use the `importInterop` option instead.
275
- *
276
- * By default, when using exports with swc a non-enumerable __esModule property is exported.
277
- * This property is then used to determine if the import is the default export or if
278
- * it contains the default export.
279
- *
280
- * In cases where the auto-unwrapping of default is not needed, you can set the noInterop option
281
- * to true to avoid the usage of the interopRequireDefault helper (shown in inline form above).
282
- *
283
- * Defaults to `false`.
284
- */
285
- noInterop?: boolean;
286
- /**
287
- * Defaults to `swc`.
288
- *
289
- * CommonJS modules and ECMAScript modules are not fully compatible.
290
- * However, compilers, bundlers and JavaScript runtimes developed different strategies
291
- * to make them work together as well as possible.
292
- *
293
- * - `swc` (alias: `babel`)
294
- *
295
- * When using exports with `swc` a non-enumerable `__esModule` property is exported
296
- * This property is then used to determine if the import is the default export
297
- * or if it contains the default export.
298
- *
299
- * ```javascript
300
- * import foo from "foo";
301
- * import { bar } from "bar";
302
- * foo;
303
- * bar;
304
- *
305
- * // Is compiled to ...
306
- *
307
- * "use strict";
308
- *
309
- * function _interop_require_default(obj) {
310
- * return obj && obj.__esModule ? obj : { default: obj };
311
- * }
312
- *
313
- * var _foo = _interop_require_default(require("foo"));
314
- * var _bar = require("bar");
315
- *
316
- * _foo.default;
317
- * _bar.bar;
318
- * ```
319
- *
320
- * When this import interop is used, if both the imported and the importer module are compiled
321
- * with swc they behave as if none of them was compiled.
322
- *
323
- * This is the default behavior.
324
- *
325
- * - `node`
326
- *
327
- * When importing CommonJS files (either directly written in CommonJS, or generated with a compiler)
328
- * Node.js always binds the `default` export to the value of `module.exports`.
329
- *
330
- * ```javascript
331
- * import foo from "foo";
332
- * import { bar } from "bar";
333
- * foo;
334
- * bar;
335
- *
336
- * // Is compiled to ...
337
- *
338
- * "use strict";
339
- *
340
- * var _foo = require("foo");
341
- * var _bar = require("bar");
342
- *
343
- * _foo;
344
- * _bar.bar;
345
- * ```
346
- * This is not exactly the same as what Node.js does since swc allows accessing any property of `module.exports`
347
- * as a named export, while Node.js only allows importing statically analyzable properties of `module.exports`.
348
- * However, any import working in Node.js will also work when compiled with swc using `importInterop: "node"`.
349
- *
350
- * - `none`
351
- *
352
- * If you know that the imported file has been transformed with a compiler that stores the `default` export on
353
- * `exports.default` (such as swc or Babel), you can safely omit the `_interop_require_default` helper.
354
- *
355
- * ```javascript
356
- * import foo from "foo";
357
- * import { bar } from "bar";
358
- * foo;
359
- * bar;
360
- *
361
- * // Is compiled to ...
362
- *
363
- * "use strict";
364
- *
365
- * var _foo = require("foo");
366
- * var _bar = require("bar");
367
- *
368
- * _foo.default;
369
- * _bar.bar;
370
- * ```
371
- */
372
- importInterop?: "swc" | "babel" | "node" | "none";
373
- /**
374
- * Emits `cjs-module-lexer` annotation
375
- * `cjs-module-lexer` is used in Node.js core for detecting the named exports available when importing a CJS module into ESM.
376
- * swc will emit `cjs-module-lexer` detectable annotation with this option enabled.
377
- *
378
- * Defaults to `true` if import_interop is Node, else `false`
379
- */
380
- exportInteropAnnotation?: boolean;
381
- /**
382
- * If set to true, dynamic imports will be preserved.
383
- */
384
- ignoreDynamic?: boolean;
385
- allowTopLevelThis?: boolean;
386
- preserveImportMeta?: boolean;
387
- }
388
- export interface Es6Config extends BaseModuleConfig {
389
- type: "es6";
390
- }
391
- export interface NodeNextConfig extends BaseModuleConfig {
392
- type: "nodenext";
393
- }
394
- export interface CommonJsConfig extends BaseModuleConfig {
395
- type: "commonjs";
396
- }
397
- export interface UmdConfig extends BaseModuleConfig {
398
- type: "umd";
399
- globals?: {
400
- [key: string]: string;
401
- };
402
- }
403
- export interface AmdConfig extends BaseModuleConfig {
404
- type: "amd";
405
- moduleId?: string;
406
- }
407
- export interface SystemjsConfig {
408
- type: "systemjs";
409
- allowTopLevelThis?: boolean;
410
- }
411
- export type SwcLoaderOptions = {
412
- /**
413
- * Note: The type is string because it follows rust's regex syntax.
414
- */
415
- test?: string | string[];
416
- /**
417
- * Note: The type is string because it follows rust's regex syntax.
418
- */
419
- exclude?: string | string[];
420
- env?: SwcLoaderEnvConfig;
421
- jsc?: SwcLoaderJscConfig;
422
- module?: SwcLoaderModuleConfig;
423
- minify?: boolean;
424
- /**
425
- * - true to generate a sourcemap for the code and include it in the result object.
426
- * - "inline" to generate a sourcemap and append it as a data URL to the end of the code, but not include it in the result object.
427
- *
428
- * `swc-cli` overloads some of these to also affect how maps are written to disk:
429
- *
430
- * - true will write the map to a .map file on disk
431
- * - "inline" will write the file directly, so it will have a data: containing the map
432
- * - Note: These options are bit weird, so it may make the most sense to just use true
433
- * and handle the rest in your own code, depending on your use case.
434
- */
435
- sourceMaps?: boolean;
436
- inlineSourcesContent?: boolean;
3
+ export type SwcLoaderEnvConfig = EnvConfig;
4
+ export type SwcLoaderJscConfig = JscConfig;
5
+ export type SwcLoaderModuleConfig = ModuleConfig;
6
+ export type SwcLoaderParserConfig = ParserConfig;
7
+ export type SwcLoaderEsParserConfig = EsParserConfig;
8
+ export type SwcLoaderTsParserConfig = TsParserConfig;
9
+ export type SwcLoaderTransformConfig = TransformConfig;
10
+ export type SwcLoaderOptions = Config & {
437
11
  isModule?: boolean | "unknown";
438
12
  /**
439
13
  * Experimental features provided by Rspack.
@@ -11,7 +11,7 @@ export type HtmlRspackPluginOptions = {
11
11
  * The file to write the HTML to. You can specify a subdirectory here too (eg: pages/index.html).
12
12
  * @default 'index.html'
13
13
  */
14
- filename?: string;
14
+ filename?: string | ((entry: string) => string);
15
15
  /** The template file path. */
16
16
  template?: string;
17
17
  /**
@@ -0,0 +1,10 @@
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ export declare const RemoveDuplicateModulesPlugin: {
3
+ new (): {
4
+ name: BuiltinPluginName;
5
+ _args: [];
6
+ 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;
7
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
+ apply(compiler: import("..").Compiler): void;
9
+ };
10
+ };
@@ -1,17 +1,17 @@
1
1
  import { BuiltinPluginName } from "@rspack/binding";
2
2
  export declare const SizeLimitsPlugin: {
3
3
  new (options: {
4
- assetFilter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
5
- hints?: false | "error" | "warning" | undefined;
6
- maxAssetSize?: number | undefined;
7
- maxEntrypointSize?: number | undefined;
4
+ assetFilter?: (assetFilename: string) => boolean;
5
+ hints?: false | "warning" | "error";
6
+ maxAssetSize?: number;
7
+ maxEntrypointSize?: number;
8
8
  }): {
9
9
  name: BuiltinPluginName;
10
10
  _args: [options: {
11
- assetFilter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
12
- hints?: false | "error" | "warning" | undefined;
13
- maxAssetSize?: number | undefined;
14
- maxEntrypointSize?: number | undefined;
11
+ assetFilter?: (assetFilename: string) => boolean;
12
+ hints?: false | "warning" | "error";
13
+ maxAssetSize?: number;
14
+ maxEntrypointSize?: number;
15
15
  }];
16
16
  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;
17
17
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,6 +1,6 @@
1
1
  import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
2
2
  import type { Compiler } from "../Compiler";
3
- import type { OptimizationSplitChunksOptions } from "../config/zod";
3
+ import type { OptimizationSplitChunksOptions } from "../config";
4
4
  import { RspackBuiltinPlugin } from "./base";
5
5
  export declare class SplitChunksPlugin extends RspackBuiltinPlugin {
6
6
  private options;
@@ -8,7 +8,7 @@ export * from "./BundlerInfoRspackPlugin";
8
8
  export * from "./ChunkPrefetchPreloadPlugin";
9
9
  export * from "./CommonJsChunkFormatPlugin";
10
10
  export * from "./CopyRspackPlugin";
11
- export * from "./css-extract";
11
+ export * from "./css-extract/index";
12
12
  export * from "./CssModulesPlugin";
13
13
  export * from "./DataUriPlugin";
14
14
  export * from "./DefinePlugin";
@@ -56,7 +56,9 @@ export * from "./SideEffectsFlagPlugin";
56
56
  export * from "./SizeLimitsPlugin";
57
57
  export * from "./SourceMapDevToolPlugin";
58
58
  export * from "./SplitChunksPlugin";
59
- export * from "./LightningCssMiminizerRspackPlugin";
59
+ export * from "./LightningCssMinimizerRspackPlugin";
60
+ export * from "./RemoveDuplicateModulesPlugin";
61
+ export * from "./LightningCssMinimizerRspackPlugin";
60
62
  export * from "./SwcJsMinimizerPlugin";
61
63
  export * from "./WarnCaseSensitiveModulesPlugin";
62
64
  export * from "./WebWorkerTemplatePlugin";
@@ -2,7 +2,7 @@ import { type JsLibraryOptions, type RawOptions } from "@rspack/binding";
2
2
  import type { Compiler } from "../Compiler";
3
3
  import { type LoaderContext, type LoaderDefinition, type LoaderDefinitionFunction } from "./adapterRuleUse";
4
4
  import type { RspackOptionsNormalized } from "./normalization";
5
- import type { ChunkLoading, LibraryOptions, Resolve } from "./zod";
5
+ import type { ChunkLoading, LibraryOptions, Resolve } from "./types";
6
6
  export type { LoaderContext, LoaderDefinition, LoaderDefinitionFunction };
7
7
  export declare const getRawOptions: (options: RspackOptionsNormalized, compiler: Compiler) => RawOptions;
8
8
  export declare function getRawResolve(resolve: Resolve): RawOptions["resolve"];
@@ -6,7 +6,7 @@ import type { Module } from "../Module";
6
6
  import { type LoaderObject } from "../loader-runner";
7
7
  import type { Logger } from "../logging/Logger";
8
8
  import type Hash from "../util/hash";
9
- import type { Mode, PublicPath, Resolve, RuleSetUseItem, Target } from "./zod";
9
+ import type { Mode, PublicPath, Resolve, RuleSetUseItem, Target } from "./types";
10
10
  export declare const BUILTIN_LOADER_PREFIX = "builtin:";
11
11
  export interface ComposeJsUseOptions {
12
12
  devtool: RawOptions["devtool"];
@@ -2,3 +2,4 @@ export * from "./adapter";
2
2
  export * from "./defaults";
3
3
  export * from "./normalization";
4
4
  export * from "./zod";
5
+ export type * from "./types";
@@ -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, 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";
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 "./types";
12
12
  export declare const getNormalizedRspackOptions: (config: RspackOptions) => RspackOptionsNormalized;
13
13
  export type EntryDynamicNormalized = () => Promise<EntryStaticNormalized>;
14
14
  export type EntryNormalized = EntryDynamicNormalized | EntryStaticNormalized;
@@ -75,6 +75,7 @@ export interface OutputNormalized {
75
75
  charset?: boolean;
76
76
  chunkLoadTimeout?: number;
77
77
  cssHeadDataCompression?: boolean;
78
+ compareBeforeEmit?: boolean;
78
79
  }
79
80
  export interface ModuleOptionsNormalized {
80
81
  defaultRules?: RuleSetRules;