@rspack/browser 1.7.3 → 2.0.0-canary.20260120
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.
- package/dist/BuildInfo.d.ts +3 -3
- package/dist/Chunk.d.ts +3 -3
- package/dist/ChunkGraph.d.ts +2 -2
- package/dist/Chunks.d.ts +2 -2
- package/dist/Compilation.d.ts +3 -3
- package/dist/Compiler.d.ts +4 -2
- package/dist/ConcatenatedModule.d.ts +1 -1
- package/dist/ContextModule.d.ts +1 -1
- package/dist/Diagnostics.d.ts +1 -1
- package/dist/Entrypoint.d.ts +1 -1
- package/dist/ExportsInfo.d.ts +1 -1
- package/dist/ExternalModule.d.ts +1 -1
- package/dist/FileSystem.d.ts +1 -1
- package/dist/Module.d.ts +3 -3
- package/dist/ModuleGraph.d.ts +1 -1
- package/dist/MultiCompiler.d.ts +1 -1
- package/dist/NativeWatchFileSystem.d.ts +1 -1
- package/dist/NormalModule.d.ts +2 -2
- package/dist/NormalModuleFactory.d.ts +1 -1
- package/dist/Resolver.d.ts +1 -1
- package/dist/ResolverFactory.d.ts +1 -1
- package/dist/RspackError.d.ts +2 -2
- package/dist/RuntimeGlobals.d.ts +2 -2
- package/dist/RuntimeModule.d.ts +1 -1
- package/dist/builtin-loader/lightningcss/index.d.ts +11 -14
- package/dist/builtin-loader/lightningcss/target.d.ts +4 -0
- package/dist/builtin-loader/swc/index.d.ts +2 -2
- package/dist/builtin-loader/swc/types.d.ts +0 -6
- package/dist/builtin-plugin/BannerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CircularDependencyRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CssChunkingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableLibraryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EsmLibraryPlugin.d.ts +2 -0
- package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ExternalsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +1 -1
- package/dist/builtin-plugin/HotModuleReplacementPlugin.d.ts +1 -1
- package/dist/builtin-plugin/HttpUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/IgnorePlugin.d.ts +1 -1
- package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +5 -9
- package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ProgressPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RsdoctorPlugin.d.ts +2 -6
- package/dist/builtin-plugin/RslibPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RstestPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -5
- package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SplitChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +2 -2
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +3 -2
- package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +1 -1
- package/dist/builtin-plugin/WorkerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/base.d.ts +1 -1
- package/dist/builtin-plugin/css-extract/index.d.ts +1 -1
- package/dist/builtin-plugin/html-plugin/hooks.d.ts +1 -1
- package/dist/builtin-plugin/html-plugin/options.d.ts +0 -5
- package/dist/builtin-plugin/html-plugin/plugin.d.ts +2 -6
- package/dist/config/adapter.d.ts +1 -1
- package/dist/config/adapterRuleUse.d.ts +3 -2
- package/dist/config/defaults.d.ts +4 -2
- package/dist/config/normalization.d.ts +4 -32
- package/dist/config/target.d.ts +14 -11
- package/dist/config/types.d.ts +70 -147
- package/dist/container/ContainerPlugin.d.ts +1 -1
- package/dist/container/ContainerReferencePlugin.d.ts +1 -1
- package/dist/container/ModuleFederationManifestPlugin.d.ts +1 -1
- package/dist/exports.d.ts +5 -17
- package/dist/{index.mjs → index.js} +2504 -3848
- package/dist/lib/DllPlugin.d.ts +1 -1
- package/dist/lib/DllReferencePlugin.d.ts +3 -3
- package/dist/lib/WebpackError.d.ts +1 -1
- package/dist/loader-runner/index.d.ts +1 -1
- package/dist/loader-runner/worker.d.ts +1 -1
- package/dist/napi-binding.d.ts +32 -46
- package/dist/rspack.wasm32-wasi.wasm +0 -0
- package/dist/runtime/moduleFederationDefaultRuntime.d.ts +1 -2
- package/dist/sharing/ConsumeSharedPlugin.d.ts +1 -1
- package/dist/sharing/ProvideSharedPlugin.d.ts +1 -1
- package/dist/sharing/ShareRuntimePlugin.d.ts +1 -1
- package/dist/stats/StatsFactory.d.ts +1 -1
- package/dist/stats/statsFactoryUtils.d.ts +2 -5
- package/dist/swc.d.ts +1 -1
- package/dist/taps/compilation.d.ts +1 -1
- package/dist/taps/types.d.ts +1 -1
- package/dist/util/SplitChunkSize.d.ts +1 -1
- package/dist/util/source.d.ts +1 -1
- package/dist/util/targetsVersion.d.ts +2 -0
- package/package.json +2 -3
- package/dist/builtin-loader/index.d.ts +0 -1
- /package/dist/{index.mjs.LICENSE.txt → index.js.LICENSE.txt} +0 -0
- /package/dist/{rslib-runtime.mjs → rslib-runtime.js} +0 -0
package/dist/config/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AssetInfo, RawFuncUseCtx } from '
|
|
1
|
+
import type { AssetInfo, RawFuncUseCtx } from '../binding';
|
|
2
2
|
import type { HttpUriPluginOptions } from '../builtin-plugin/HttpUriPlugin';
|
|
3
3
|
import type { ChunkGraph } from '../ChunkGraph';
|
|
4
4
|
import type { Compilation, PathData } from '../Compilation';
|
|
@@ -83,6 +83,10 @@ export type LibraryOptions = {
|
|
|
83
83
|
* Otherwise, an anonymous define is used.
|
|
84
84
|
* */
|
|
85
85
|
umdNamedDefine?: UmdNamedDefine;
|
|
86
|
+
/**
|
|
87
|
+
* PreserveModules only works for `modern-module`
|
|
88
|
+
*/
|
|
89
|
+
preserveModules?: string;
|
|
86
90
|
};
|
|
87
91
|
/** Options for library. */
|
|
88
92
|
export type Library = LibraryName | LibraryOptions | undefined;
|
|
@@ -325,14 +329,6 @@ export type Output = {
|
|
|
325
329
|
crossOriginLoading?: CrossOriginLoading;
|
|
326
330
|
/** This option determines the name of CSS output files on disk. */
|
|
327
331
|
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
332
|
/** This option determines the name of non-initial CSS output files on disk. */
|
|
337
333
|
cssChunkFilename?: CssChunkFilename;
|
|
338
334
|
/**
|
|
@@ -347,7 +343,7 @@ export type Output = {
|
|
|
347
343
|
hotUpdateChunkFilename?: HotUpdateChunkFilename;
|
|
348
344
|
/**
|
|
349
345
|
* Only used when target is set to 'web', which uses JSONP for loading hot updates.
|
|
350
|
-
* @default '
|
|
346
|
+
* @default 'rspackHotUpdate' + output.uniqueName
|
|
351
347
|
* */
|
|
352
348
|
hotUpdateGlobal?: HotUpdateGlobal;
|
|
353
349
|
/**
|
|
@@ -369,26 +365,6 @@ export type Output = {
|
|
|
369
365
|
enabledLibraryTypes?: EnabledLibraryTypes;
|
|
370
366
|
/** Output a library exposing the exports of your entry point. */
|
|
371
367
|
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
368
|
/**
|
|
393
369
|
* Output JavaScript files as module type.
|
|
394
370
|
* Disabled by default as it's an experimental feature. To use it, you must set experiments.outputModule to true.
|
|
@@ -501,17 +477,16 @@ export type Output = {
|
|
|
501
477
|
* @default 120000
|
|
502
478
|
* */
|
|
503
479
|
chunkLoadTimeout?: number;
|
|
504
|
-
/**
|
|
505
|
-
* Add charset="utf-8" to the HTML <script> tag.
|
|
506
|
-
* @default true
|
|
507
|
-
* */
|
|
508
|
-
charset?: boolean;
|
|
509
480
|
/** Tell Rspack what kind of ES-features may be used in the generated runtime-code. */
|
|
510
481
|
environment?: Environment;
|
|
511
482
|
/**
|
|
512
483
|
* Check if to be emitted file already exists and have the same content before writing to output filesystem.
|
|
513
484
|
*/
|
|
514
485
|
compareBeforeEmit?: boolean;
|
|
486
|
+
/**
|
|
487
|
+
* Information about the bundler.
|
|
488
|
+
*/
|
|
489
|
+
bundlerInfo?: BundlerInfoOptions;
|
|
515
490
|
};
|
|
516
491
|
/**
|
|
517
492
|
* Path alias
|
|
@@ -855,17 +830,33 @@ export type JavascriptParserOptions = {
|
|
|
855
830
|
overrideStrict?: 'strict' | 'non-strict';
|
|
856
831
|
/**
|
|
857
832
|
* Control whether renaming of the CommonJS `require` function will be parsed and transformed.
|
|
858
|
-
* @default
|
|
833
|
+
* @default false
|
|
859
834
|
*/
|
|
860
835
|
requireAlias?: boolean;
|
|
836
|
+
/**
|
|
837
|
+
* Control whether `require` used as an expression (e.g., `const req = require; req('./module')`) will be parsed.
|
|
838
|
+
* @default true
|
|
839
|
+
*/
|
|
861
840
|
requireAsExpression?: boolean;
|
|
841
|
+
/**
|
|
842
|
+
* Control whether dynamic `require` calls (e.g., `require(variable)`) will be parsed.
|
|
843
|
+
* @default true
|
|
844
|
+
*/
|
|
862
845
|
requireDynamic?: boolean;
|
|
846
|
+
/**
|
|
847
|
+
* Control whether `require.resolve()` calls will be parsed.
|
|
848
|
+
* @default true
|
|
849
|
+
*/
|
|
863
850
|
requireResolve?: boolean;
|
|
864
851
|
/**
|
|
865
852
|
* CommonJS-specific parser options. `true` enables the default behaviour, `{ exports: 'skipInEsm' }` preserves CommonJS export mutations when executed inside ESM.
|
|
866
853
|
* @default true
|
|
867
854
|
*/
|
|
868
855
|
commonjs?: JavascriptParserCommonjsOption;
|
|
856
|
+
/**
|
|
857
|
+
* Control whether dynamic `import()` calls (e.g., `import(variable)`) will be parsed.
|
|
858
|
+
* @default true
|
|
859
|
+
*/
|
|
869
860
|
importDynamic?: boolean;
|
|
870
861
|
/**
|
|
871
862
|
* Enable magic comments for CommonJS require() expressions.
|
|
@@ -875,7 +866,11 @@ export type JavascriptParserOptions = {
|
|
|
875
866
|
typeReexportsPresence?: 'no-tolerant' | 'tolerant' | 'tolerant-no-check';
|
|
876
867
|
/** Whether to enable JSX parsing */
|
|
877
868
|
jsx?: boolean;
|
|
878
|
-
/**
|
|
869
|
+
/**
|
|
870
|
+
* Whether to enable defer import.
|
|
871
|
+
* This option is controlled by `experiments.deferImport` and should not be set directly.
|
|
872
|
+
* @default false
|
|
873
|
+
*/
|
|
879
874
|
deferImport?: boolean;
|
|
880
875
|
};
|
|
881
876
|
export type JsonParserOptions = {
|
|
@@ -1059,12 +1054,12 @@ type AllowTarget = 'web' | 'webworker' | 'es3' | 'es5' | 'es2015' | 'es2016' | '
|
|
|
1059
1054
|
export type Target = false | AllowTarget | AllowTarget[];
|
|
1060
1055
|
/**
|
|
1061
1056
|
* Specify the default type of externals.
|
|
1062
|
-
* `amd`, `umd`, `system` and `jsonp` externals depend on the `output.
|
|
1057
|
+
* `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
1058
|
* @default 'var'
|
|
1064
1059
|
*/
|
|
1065
1060
|
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
1061
|
/**
|
|
1067
|
-
* External item object when both
|
|
1062
|
+
* External item object when both library.type and externalsType is 'umd'
|
|
1068
1063
|
*/
|
|
1069
1064
|
export type ExternalItemUmdValue = {
|
|
1070
1065
|
root: string | string[];
|
|
@@ -1081,7 +1076,7 @@ export type ExternalItemObjectValue = Record<string, string | string[]>;
|
|
|
1081
1076
|
*/
|
|
1082
1077
|
export type ExternalItemValue = string | boolean | string[] | ExternalItemUmdValue
|
|
1083
1078
|
/**
|
|
1084
|
-
* when
|
|
1079
|
+
* when library.type and externalsType is not 'umd'
|
|
1085
1080
|
*/
|
|
1086
1081
|
| ExternalItemObjectValue;
|
|
1087
1082
|
/**
|
|
@@ -1255,7 +1250,22 @@ export type SnapshotOptions = {};
|
|
|
1255
1250
|
* // Disable caching
|
|
1256
1251
|
* cache: false
|
|
1257
1252
|
*/
|
|
1258
|
-
export type CacheOptions = boolean
|
|
1253
|
+
export type CacheOptions = boolean | {
|
|
1254
|
+
type: 'memory';
|
|
1255
|
+
} | {
|
|
1256
|
+
type: 'persistent';
|
|
1257
|
+
buildDependencies?: string[];
|
|
1258
|
+
version?: string;
|
|
1259
|
+
snapshot?: {
|
|
1260
|
+
immutablePaths?: (string | RegExp)[];
|
|
1261
|
+
unmanagedPaths?: (string | RegExp)[];
|
|
1262
|
+
managedPaths?: (string | RegExp)[];
|
|
1263
|
+
};
|
|
1264
|
+
storage?: {
|
|
1265
|
+
type: 'filesystem';
|
|
1266
|
+
directory?: string;
|
|
1267
|
+
};
|
|
1268
|
+
};
|
|
1259
1269
|
export type StatsPresets = 'normal' | 'none' | 'verbose' | 'errors-only' | 'errors-warnings' | 'minimal' | 'detailed' | 'summary';
|
|
1260
1270
|
type ModuleFilterItemTypes = RegExp | string | ((name: string, module: any, type: any) => boolean);
|
|
1261
1271
|
type ModuleFilterTypes = boolean | ModuleFilterItemTypes | ModuleFilterItemTypes[];
|
|
@@ -1917,53 +1927,21 @@ export type Optimization = {
|
|
|
1917
1927
|
avoidEntryIife?: boolean;
|
|
1918
1928
|
};
|
|
1919
1929
|
/**
|
|
1920
|
-
*
|
|
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
|
|
1930
|
+
* Information about the bundler.
|
|
1929
1931
|
*/
|
|
1930
|
-
export type
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
buildDependencies?: string[];
|
|
1932
|
+
export type BundlerInfoOptions = {
|
|
1933
|
+
/**
|
|
1934
|
+
* Version of the bundler.
|
|
1935
|
+
*/
|
|
1935
1936
|
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
1937
|
/**
|
|
1951
|
-
*
|
|
1938
|
+
* Name of the bundler.
|
|
1952
1939
|
*/
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
/**
|
|
1959
|
-
* Name of the bundler.
|
|
1960
|
-
*/
|
|
1961
|
-
bundler?: string;
|
|
1962
|
-
/**
|
|
1963
|
-
* Force specific features.
|
|
1964
|
-
*/
|
|
1965
|
-
force?: boolean | ('version' | 'uniqueId')[];
|
|
1966
|
-
};
|
|
1940
|
+
bundler?: string;
|
|
1941
|
+
/**
|
|
1942
|
+
* Force specific features.
|
|
1943
|
+
*/
|
|
1944
|
+
force?: boolean | ('version' | 'uniqueId')[];
|
|
1967
1945
|
};
|
|
1968
1946
|
/**
|
|
1969
1947
|
* Options for lazy compilation.
|
|
@@ -2087,16 +2065,6 @@ export type UseInputFileSystem = false | RegExp[];
|
|
|
2087
2065
|
* Experimental features configuration.
|
|
2088
2066
|
*/
|
|
2089
2067
|
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
2068
|
/**
|
|
2101
2069
|
* Enable async WebAssembly.
|
|
2102
2070
|
* 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 +2076,6 @@ export type Experiments = {
|
|
|
2108
2076
|
* @default false
|
|
2109
2077
|
*/
|
|
2110
2078
|
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
2079
|
/**
|
|
2118
2080
|
* Enable CSS support.
|
|
2119
2081
|
*
|
|
@@ -2125,14 +2087,16 @@ export type Experiments = {
|
|
|
2125
2087
|
* - `module.generator["css/auto"]`
|
|
2126
2088
|
* - `module.generator.css`
|
|
2127
2089
|
* - `module.generator["css/module"]`
|
|
2090
|
+
*
|
|
2091
|
+
* @deprecated This option is deprecated. In Rspack 2.0, users need to manually add CSS rules to enable CSS support.
|
|
2092
|
+
* Example:
|
|
2093
|
+
* ```js
|
|
2094
|
+
* module: {
|
|
2095
|
+
* rules: [{ test: /\.css$/, type: "css/auto" }]
|
|
2096
|
+
* }
|
|
2097
|
+
* ```
|
|
2128
2098
|
*/
|
|
2129
2099
|
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
2100
|
/**
|
|
2137
2101
|
* Enable incremental builds.
|
|
2138
2102
|
*/
|
|
@@ -2142,20 +2106,11 @@ export type Experiments = {
|
|
|
2142
2106
|
* @default false
|
|
2143
2107
|
*/
|
|
2144
2108
|
futureDefaults?: boolean;
|
|
2145
|
-
/**
|
|
2146
|
-
* Enable future Rspack features default options.
|
|
2147
|
-
*/
|
|
2148
|
-
rspackFuture?: RspackFutureOptions;
|
|
2149
2109
|
/**
|
|
2150
2110
|
* Enable loading of modules via HTTP/HTTPS requests.
|
|
2151
2111
|
* @default false
|
|
2152
2112
|
*/
|
|
2153
2113
|
buildHttp?: HttpUriOptions;
|
|
2154
|
-
/**
|
|
2155
|
-
* Enable parallel loader
|
|
2156
|
-
* @default false
|
|
2157
|
-
*/
|
|
2158
|
-
parallelLoader?: boolean;
|
|
2159
2114
|
/**
|
|
2160
2115
|
* Enable Node.js input file system
|
|
2161
2116
|
* @default false
|
|
@@ -2166,30 +2121,6 @@ export type Experiments = {
|
|
|
2166
2121
|
* @default false
|
|
2167
2122
|
*/
|
|
2168
2123
|
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
2124
|
/**
|
|
2194
2125
|
* Enable defer import feature
|
|
2195
2126
|
* @default false
|
|
@@ -2246,10 +2177,6 @@ export type IgnoreWarnings = (RegExp | {
|
|
|
2246
2177
|
*/
|
|
2247
2178
|
module?: RegExp;
|
|
2248
2179
|
} | ((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
2180
|
/**
|
|
2254
2181
|
* Set the value of `require.amd` and `define.amd`. Or disable AMD support.
|
|
2255
2182
|
*/
|
|
@@ -2405,10 +2332,6 @@ export type RspackOptions = {
|
|
|
2405
2332
|
* Options for module configuration.
|
|
2406
2333
|
*/
|
|
2407
2334
|
module?: ModuleOptions;
|
|
2408
|
-
/**
|
|
2409
|
-
* Whether to capture a profile of the application.
|
|
2410
|
-
*/
|
|
2411
|
-
profile?: Profile;
|
|
2412
2335
|
/**
|
|
2413
2336
|
* Set the value of `require.amd` or `define.amd`.
|
|
2414
2337
|
* Setting `amd` to false will disable rspack's AMD support.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BuiltinPlugin, BuiltinPluginName } from '
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from '../binding';
|
|
2
2
|
import { RspackBuiltinPlugin } from '../builtin-plugin/base';
|
|
3
3
|
import type { Compiler } from '../Compiler';
|
|
4
4
|
import type { EntryRuntime, FilenameTemplate, LibraryOptions } from '../config';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BuiltinPlugin, BuiltinPluginName } from '
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from '../binding';
|
|
2
2
|
import { RspackBuiltinPlugin } from '../builtin-plugin/base';
|
|
3
3
|
import type { Compiler } from '../Compiler';
|
|
4
4
|
import type { ExternalsType } from '../config';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BuiltinPlugin, BuiltinPluginName } from '
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from '../binding';
|
|
2
2
|
import { RspackBuiltinPlugin } from '../builtin-plugin/base';
|
|
3
3
|
import type { Compiler } from '../Compiler';
|
|
4
4
|
export type RemoteAliasMap = Record<string, {
|
package/dist/exports.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ export type { MultiCompilerOptions, MultiRspackOptions } from './MultiCompiler';
|
|
|
8
8
|
export { MultiCompiler } from './MultiCompiler';
|
|
9
9
|
import { RspackOptionsApply } from './rspackOptionsApply';
|
|
10
10
|
export { RspackOptionsApply, RspackOptionsApply as WebpackOptionsApply };
|
|
11
|
-
export type { ChunkGroup } from '
|
|
12
|
-
export { AsyncDependenciesBlock, Dependency, EntryDependency, } from '
|
|
11
|
+
export type { ChunkGroup } from './binding';
|
|
12
|
+
export { AsyncDependenciesBlock, Dependency, EntryDependency, } from './binding';
|
|
13
13
|
export type { Chunk } from './Chunk';
|
|
14
14
|
export { ConcatenatedModule } from './ConcatenatedModule';
|
|
15
15
|
export { ContextModule } from './ContextModule';
|
|
@@ -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
|
|
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';
|
|
@@ -137,7 +133,7 @@ export type { FeatureOptions as LightningcssFeatureOptions, LoaderOptions as Lig
|
|
|
137
133
|
export type { SwcLoaderEnvConfig, SwcLoaderEsParserConfig, SwcLoaderJscConfig, SwcLoaderModuleConfig, SwcLoaderOptions, SwcLoaderParserConfig, SwcLoaderTransformConfig, SwcLoaderTsParserConfig, } from './builtin-loader/swc/index';
|
|
138
134
|
export type { CircularDependencyRspackPluginOptions, CopyRspackPluginOptions, CssExtractRspackLoaderOptions, CssExtractRspackPluginOptions, EvalDevToolModulePluginOptions, HtmlRspackPluginOptions, LightningCssMinimizerRspackPluginOptions, RsdoctorPluginData, RsdoctorPluginHooks, SourceMapDevToolPluginOptions, SubresourceIntegrityPluginOptions, SwcJsMinimizerRspackPluginOptions, } from './builtin-plugin';
|
|
139
135
|
export { CircularDependencyRspackPlugin, ContextReplacementPlugin, CopyRspackPlugin, CssExtractRspackPlugin, EvalDevToolModulePlugin, EvalSourceMapDevToolPlugin, HtmlRspackPlugin, LightningCssMinimizerRspackPlugin, NormalModuleReplacementPlugin, SourceMapDevToolPlugin, SwcJsMinimizerRspackPlugin, } from './builtin-plugin';
|
|
140
|
-
import { EnforceExtension, ResolverFactory, async as resolveAsync, sync as resolveSync } from '
|
|
136
|
+
import { EnforceExtension, ResolverFactory, async as resolveAsync, sync as resolveSync } from './binding';
|
|
141
137
|
import { createNativePlugin } from './builtin-plugin';
|
|
142
138
|
import { minify, minifySync, transform, transformSync } from './swc';
|
|
143
139
|
import { VirtualModulesPlugin } from './VirtualModulesPlugin';
|
|
@@ -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;
|