@rspack-debug/browser 2.0.0-canary.20260120 → 2.0.0-rc.2
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/Compilation.d.ts +3 -0
- package/dist/Compiler.d.ts +1 -0
- package/dist/FileSystem.d.ts +1 -1
- package/dist/ModuleGraph.d.ts +3 -1
- package/dist/ModuleGraphConnection.d.ts +10 -0
- package/dist/NormalModule.d.ts +0 -1
- package/dist/RuntimeGlobals.d.ts +1 -1
- package/dist/browser/BrowserRequirePlugin.d.ts +1 -1
- package/dist/browser/fs.d.ts +1 -1
- package/dist/builtin-loader/swc/pluginImport.d.ts +1 -1
- package/dist/builtin-loader/swc/types.d.ts +36 -1
- package/dist/builtin-plugin/EsmLibraryPlugin.d.ts +4 -2
- package/dist/builtin-plugin/EsmNodeTargetPlugin.d.ts +9 -0
- package/dist/builtin-plugin/HashedModuleIdsPlugin.d.ts +10 -0
- package/dist/builtin-plugin/ProgressPlugin.d.ts +5 -4
- package/dist/builtin-plugin/RsdoctorPlugin.d.ts +2 -2
- package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +9 -9
- package/dist/builtin-plugin/SplitChunksPlugin.d.ts +2 -1
- package/dist/builtin-plugin/WorkerPlugin.d.ts +1 -0
- package/dist/builtin-plugin/index.d.ts +3 -0
- package/dist/builtin-plugin/lazy-compilation/middleware.d.ts +3 -3
- package/dist/builtin-plugin/rsc/Coordinator.d.ts +8 -0
- package/dist/builtin-plugin/rsc/RscClientPlugin.d.ts +13 -0
- package/dist/builtin-plugin/rsc/RscServerPlugin.d.ts +39 -0
- package/dist/builtin-plugin/rsc/index.d.ts +24 -0
- package/dist/checkNodeVersion.d.ts +1 -0
- package/dist/config/adapterRuleUse.d.ts +1 -1
- package/dist/config/devServer.d.ts +102 -237
- package/dist/config/normalization.d.ts +4 -4
- package/dist/config/types.d.ts +184 -71
- package/dist/container/ContainerPlugin.d.ts +3 -2
- package/dist/container/ContainerReferencePlugin.d.ts +4 -3
- package/dist/container/ModuleFederationManifestPlugin.d.ts +10 -3
- package/dist/container/ModuleFederationPlugin.d.ts +20 -1
- package/dist/container/ModuleFederationPluginV1.d.ts +2 -2
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +4 -0
- package/dist/exports.d.ts +16 -7
- package/dist/index.d.ts +2 -1
- package/dist/index.js +11541 -7053
- package/dist/napi-binding.d.ts +254 -94
- package/dist/rspack.wasi-browser.js +15 -3
- package/dist/sharing/CollectSharedEntryPlugin.d.ts +22 -0
- package/dist/sharing/ConsumeSharedPlugin.d.ts +16 -3
- package/dist/sharing/IndependentSharedPlugin.d.ts +35 -0
- package/dist/sharing/ProvideSharedPlugin.d.ts +22 -2
- package/dist/sharing/SharePlugin.d.ts +43 -5
- package/dist/sharing/SharedContainerPlugin.d.ts +23 -0
- package/dist/sharing/SharedUsedExportsOptimizerPlugin.d.ts +14 -0
- package/dist/sharing/TreeShakingSharedPlugin.d.ts +16 -0
- package/dist/sharing/utils.d.ts +1 -0
- package/dist/swc.d.ts +1 -1
- package/dist/util/createHash.d.ts +1 -1
- package/dist/util/supportsColor.d.ts +6 -0
- package/dist/wasi-worker-browser.mjs +10300 -6050
- package/package.json +6 -4
- package/dist/rslib-runtime.js +0 -68
package/dist/napi-binding.d.ts
CHANGED
|
@@ -25,6 +25,10 @@ export const COMMIT_CUSTOM_FIELDS_SYMBOL: unique symbol;
|
|
|
25
25
|
|
|
26
26
|
export const RUST_ERROR_SYMBOL: unique symbol;
|
|
27
27
|
|
|
28
|
+
export const CIRCULAR_CONNECTION_SYMBOL: unique symbol;
|
|
29
|
+
export const TRANSITIVE_ONLY_SYMBOL: unique symbol;
|
|
30
|
+
export type ConnectionState = boolean | typeof CIRCULAR_CONNECTION_SYMBOL | typeof TRANSITIVE_ONLY_SYMBOL;
|
|
31
|
+
|
|
28
32
|
interface KnownBuildInfo {
|
|
29
33
|
[BUILD_INFO_ASSETS_SYMBOL]: Assets,
|
|
30
34
|
[BUILD_INFO_FILE_DEPENDENCIES_SYMBOL]: string[],
|
|
@@ -95,6 +99,8 @@ export interface JsSource {
|
|
|
95
99
|
source: string | Buffer
|
|
96
100
|
map?: string
|
|
97
101
|
}
|
|
102
|
+
|
|
103
|
+
export type CompilerId = void;
|
|
98
104
|
/* -- banner.d.ts end -- */
|
|
99
105
|
|
|
100
106
|
/* -- napi-rs generated below -- */
|
|
@@ -213,6 +219,7 @@ export declare class Dependency {
|
|
|
213
219
|
get critical(): boolean
|
|
214
220
|
set critical(val: boolean)
|
|
215
221
|
get ids(): Array<string> | undefined
|
|
222
|
+
get loc(): DependencyLocation | null
|
|
216
223
|
}
|
|
217
224
|
|
|
218
225
|
export declare class Diagnostics {
|
|
@@ -334,6 +341,7 @@ export declare class JsCompiler {
|
|
|
334
341
|
rebuild(changed_files: string[], removed_files: string[], callback: (err: null | Error) => void): void
|
|
335
342
|
close(): Promise<void>
|
|
336
343
|
getVirtualFileStore(): VirtualFileStore | null
|
|
344
|
+
getCompilerId(): ExternalObject<CompilerId>
|
|
337
345
|
}
|
|
338
346
|
|
|
339
347
|
export declare class JsContextModuleFactoryAfterResolveData {
|
|
@@ -361,6 +369,10 @@ export declare class JsContextModuleFactoryBeforeResolveData {
|
|
|
361
369
|
set recursive(recursive: boolean)
|
|
362
370
|
}
|
|
363
371
|
|
|
372
|
+
export declare class JsCoordinator {
|
|
373
|
+
constructor(getServerCompilerIdJsFn: () => ExternalObject<CompilerId>)
|
|
374
|
+
}
|
|
375
|
+
|
|
364
376
|
export declare class JsDependencies {
|
|
365
377
|
get fileDependencies(): Array<string>
|
|
366
378
|
get addedFileDependencies(): Array<string>
|
|
@@ -444,6 +456,7 @@ export declare class ModuleGraphConnection {
|
|
|
444
456
|
get module(): Module | null
|
|
445
457
|
get resolvedModule(): Module | null
|
|
446
458
|
get originModule(): Module | null
|
|
459
|
+
getActiveState(runtime: string | string[] | undefined): ConnectionState
|
|
447
460
|
}
|
|
448
461
|
|
|
449
462
|
export declare class NativeWatcher {
|
|
@@ -522,6 +535,7 @@ export declare enum BuiltinPluginName {
|
|
|
522
535
|
DynamicEntryPlugin = 'DynamicEntryPlugin',
|
|
523
536
|
ExternalsPlugin = 'ExternalsPlugin',
|
|
524
537
|
NodeTargetPlugin = 'NodeTargetPlugin',
|
|
538
|
+
EsmNodeTargetPlugin = 'EsmNodeTargetPlugin',
|
|
525
539
|
ElectronTargetPlugin = 'ElectronTargetPlugin',
|
|
526
540
|
EnableChunkLoadingPlugin = 'EnableChunkLoadingPlugin',
|
|
527
541
|
EnableLibraryPlugin = 'EnableLibraryPlugin',
|
|
@@ -540,15 +554,19 @@ export declare enum BuiltinPluginName {
|
|
|
540
554
|
SplitChunksPlugin = 'SplitChunksPlugin',
|
|
541
555
|
RemoveDuplicateModulesPlugin = 'RemoveDuplicateModulesPlugin',
|
|
542
556
|
ShareRuntimePlugin = 'ShareRuntimePlugin',
|
|
557
|
+
SharedUsedExportsOptimizerPlugin = 'SharedUsedExportsOptimizerPlugin',
|
|
543
558
|
ContainerPlugin = 'ContainerPlugin',
|
|
544
559
|
ContainerReferencePlugin = 'ContainerReferencePlugin',
|
|
545
560
|
ProvideSharedPlugin = 'ProvideSharedPlugin',
|
|
546
561
|
ConsumeSharedPlugin = 'ConsumeSharedPlugin',
|
|
562
|
+
CollectSharedEntryPlugin = 'CollectSharedEntryPlugin',
|
|
563
|
+
SharedContainerPlugin = 'SharedContainerPlugin',
|
|
547
564
|
ModuleFederationRuntimePlugin = 'ModuleFederationRuntimePlugin',
|
|
548
565
|
ModuleFederationManifestPlugin = 'ModuleFederationManifestPlugin',
|
|
549
566
|
NamedModuleIdsPlugin = 'NamedModuleIdsPlugin',
|
|
550
567
|
NaturalModuleIdsPlugin = 'NaturalModuleIdsPlugin',
|
|
551
568
|
DeterministicModuleIdsPlugin = 'DeterministicModuleIdsPlugin',
|
|
569
|
+
HashedModuleIdsPlugin = 'HashedModuleIdsPlugin',
|
|
552
570
|
NaturalChunkIdsPlugin = 'NaturalChunkIdsPlugin',
|
|
553
571
|
NamedChunkIdsPlugin = 'NamedChunkIdsPlugin',
|
|
554
572
|
DeterministicChunkIdsPlugin = 'DeterministicChunkIdsPlugin',
|
|
@@ -602,7 +620,9 @@ export declare enum BuiltinPluginName {
|
|
|
602
620
|
LazyCompilationPlugin = 'LazyCompilationPlugin',
|
|
603
621
|
ModuleInfoHeaderPlugin = 'ModuleInfoHeaderPlugin',
|
|
604
622
|
HttpUriPlugin = 'HttpUriPlugin',
|
|
605
|
-
CssChunkingPlugin = 'CssChunkingPlugin'
|
|
623
|
+
CssChunkingPlugin = 'CssChunkingPlugin',
|
|
624
|
+
RscServerPlugin = 'RscServerPlugin',
|
|
625
|
+
RscClientPlugin = 'RscClientPlugin'
|
|
606
626
|
}
|
|
607
627
|
|
|
608
628
|
export declare function cleanupGlobalTrace(): void
|
|
@@ -707,20 +727,24 @@ export interface JsBeforeEmitData {
|
|
|
707
727
|
uid?: number
|
|
708
728
|
}
|
|
709
729
|
|
|
730
|
+
export interface JsBeforeModuleIdsArg {
|
|
731
|
+
modules: Array<JsModuleForIds>
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
export interface JsBeforeModuleIdsResult {
|
|
735
|
+
assignments: Record<string, string | number>
|
|
736
|
+
}
|
|
737
|
+
|
|
710
738
|
export interface JsBuildMeta {
|
|
711
739
|
strictEsmModule?: boolean
|
|
712
740
|
hasTopLevelAwait?: boolean
|
|
713
741
|
esm?: boolean
|
|
714
742
|
exportsType?: undefined | 'unset' | 'default' | 'namespace' | 'flagged' | 'dynamic'
|
|
715
|
-
defaultObject?: undefined | 'false' | 'redirect' |
|
|
743
|
+
defaultObject?: undefined | 'false' | 'redirect' | 'redirect-warn'
|
|
716
744
|
sideEffectFree?: boolean
|
|
717
745
|
exportsFinalName?: Array<[string, string]> | undefined
|
|
718
746
|
}
|
|
719
747
|
|
|
720
|
-
export interface JsBuildMetaDefaultObjectRedirectWarn {
|
|
721
|
-
redirectWarn: JsDefaultObjectRedirectWarnObject
|
|
722
|
-
}
|
|
723
|
-
|
|
724
748
|
export interface JsBuildTimeExecutionOption {
|
|
725
749
|
publicPath?: string
|
|
726
750
|
baseUri?: string
|
|
@@ -782,10 +806,6 @@ export interface JsCreateScriptData {
|
|
|
782
806
|
chunk: Chunk
|
|
783
807
|
}
|
|
784
808
|
|
|
785
|
-
export interface JsDefaultObjectRedirectWarnObject {
|
|
786
|
-
ignore: boolean
|
|
787
|
-
}
|
|
788
|
-
|
|
789
809
|
export interface JsDiagnostic {
|
|
790
810
|
message: string
|
|
791
811
|
help?: string
|
|
@@ -970,6 +990,10 @@ export interface JsModuleDescriptor {
|
|
|
970
990
|
id?: string | number | null
|
|
971
991
|
}
|
|
972
992
|
|
|
993
|
+
export interface JsModuleForIds {
|
|
994
|
+
identifier: string
|
|
995
|
+
}
|
|
996
|
+
|
|
973
997
|
export interface JsNormalModuleFactoryCreateModuleArgs {
|
|
974
998
|
dependencyType: string
|
|
975
999
|
rawRequest: string
|
|
@@ -1028,6 +1052,16 @@ export interface JsResourceData {
|
|
|
1028
1052
|
descriptionFilePath?: string
|
|
1029
1053
|
}
|
|
1030
1054
|
|
|
1055
|
+
export interface JsRscClientPluginOptions {
|
|
1056
|
+
coordinator: JsCoordinator
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
export interface JsRscServerPluginOptions {
|
|
1060
|
+
coordinator: JsCoordinator
|
|
1061
|
+
onServerComponentChanges?: (() => void) | undefined | null
|
|
1062
|
+
onManifest?: ((arg: string) => Promise<undefined>) | undefined | null
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1031
1065
|
export interface JsRsdoctorAsset {
|
|
1032
1066
|
ukey: number
|
|
1033
1067
|
path: string
|
|
@@ -1065,6 +1099,30 @@ export interface JsRsdoctorChunkModules {
|
|
|
1065
1099
|
modules: Array<number>
|
|
1066
1100
|
}
|
|
1067
1101
|
|
|
1102
|
+
export interface JsRsdoctorConnection {
|
|
1103
|
+
ukey: number
|
|
1104
|
+
dependencyId: string
|
|
1105
|
+
module: number
|
|
1106
|
+
originModule?: number
|
|
1107
|
+
resolvedModule: number
|
|
1108
|
+
dependencyType: string
|
|
1109
|
+
userRequest: string
|
|
1110
|
+
loc?: string
|
|
1111
|
+
active: boolean
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
export interface JsRsdoctorConnectionsOnlyImport {
|
|
1115
|
+
moduleUkey: number
|
|
1116
|
+
modulePath: string
|
|
1117
|
+
connections: Array<JsRsdoctorConnectionsOnlyImportConnection>
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
export interface JsRsdoctorConnectionsOnlyImportConnection {
|
|
1121
|
+
originModule?: number
|
|
1122
|
+
dependencyType: string
|
|
1123
|
+
userRequest: string
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1068
1126
|
export interface JsRsdoctorDependency {
|
|
1069
1127
|
ukey: number
|
|
1070
1128
|
kind: string
|
|
@@ -1090,7 +1148,11 @@ export interface JsRsdoctorExportInfo {
|
|
|
1090
1148
|
from?: number
|
|
1091
1149
|
variable?: number
|
|
1092
1150
|
identifier?: JsRsdoctorStatement
|
|
1093
|
-
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
export interface JsRsdoctorJsonModuleSize {
|
|
1154
|
+
identifier: string
|
|
1155
|
+
size: number
|
|
1094
1156
|
}
|
|
1095
1157
|
|
|
1096
1158
|
export interface JsRsdoctorModule {
|
|
@@ -1107,12 +1169,15 @@ export interface JsRsdoctorModule {
|
|
|
1107
1169
|
chunks: Array<number>
|
|
1108
1170
|
issuerPath: Array<number>
|
|
1109
1171
|
bailoutReason: Array<string>
|
|
1172
|
+
sideEffectsLocations: Array<JsRsdoctorSideEffectLocation>
|
|
1173
|
+
exportsType: string
|
|
1110
1174
|
}
|
|
1111
1175
|
|
|
1112
1176
|
export interface JsRsdoctorModuleGraph {
|
|
1113
1177
|
modules: Array<JsRsdoctorModule>
|
|
1114
1178
|
dependencies: Array<JsRsdoctorDependency>
|
|
1115
1179
|
chunkModules: Array<JsRsdoctorChunkModules>
|
|
1180
|
+
connectionsOnlyImports: Array<JsRsdoctorConnectionsOnlyImport>
|
|
1116
1181
|
}
|
|
1117
1182
|
|
|
1118
1183
|
export interface JsRsdoctorModuleGraphModule {
|
|
@@ -1141,6 +1206,7 @@ export interface JsRsdoctorModuleOriginalSource {
|
|
|
1141
1206
|
|
|
1142
1207
|
export interface JsRsdoctorModuleSourcesPatch {
|
|
1143
1208
|
moduleOriginalSources: Array<JsRsdoctorModuleOriginalSource>
|
|
1209
|
+
jsonModuleSizes: Array<JsRsdoctorJsonModuleSize>
|
|
1144
1210
|
}
|
|
1145
1211
|
|
|
1146
1212
|
export interface JsRsdoctorSideEffect {
|
|
@@ -1155,6 +1221,13 @@ export interface JsRsdoctorSideEffect {
|
|
|
1155
1221
|
variable?: number
|
|
1156
1222
|
}
|
|
1157
1223
|
|
|
1224
|
+
export interface JsRsdoctorSideEffectLocation {
|
|
1225
|
+
location: string
|
|
1226
|
+
nodeType: string
|
|
1227
|
+
module: number
|
|
1228
|
+
request: string
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1158
1231
|
export interface JsRsdoctorSourceMapFeatures {
|
|
1159
1232
|
cheap?: boolean
|
|
1160
1233
|
module?: boolean
|
|
@@ -1812,6 +1885,7 @@ export interface RawCacheGroupOptions {
|
|
|
1812
1885
|
minChunks?: number
|
|
1813
1886
|
minSize?: number | RawSplitChunkSizes
|
|
1814
1887
|
minSizeReduction?: number | RawSplitChunkSizes
|
|
1888
|
+
enforceSizeThreshold?: number | RawSplitChunkSizes
|
|
1815
1889
|
maxSize?: number | RawSplitChunkSizes
|
|
1816
1890
|
maxAsyncSize?: number | RawSplitChunkSizes
|
|
1817
1891
|
maxInitialSize?: number | RawSplitChunkSizes
|
|
@@ -1832,6 +1906,8 @@ export interface RawCacheOptionsPersistent {
|
|
|
1832
1906
|
version?: string
|
|
1833
1907
|
snapshot?: RawSnapshotOptions
|
|
1834
1908
|
storage?: RawStorageOptions
|
|
1909
|
+
portable?: boolean
|
|
1910
|
+
readonly?: boolean
|
|
1835
1911
|
}
|
|
1836
1912
|
|
|
1837
1913
|
export interface RawCircularDependencyRspackPluginOptions {
|
|
@@ -1844,6 +1920,11 @@ export interface RawCircularDependencyRspackPluginOptions {
|
|
|
1844
1920
|
onEnd?: () => void
|
|
1845
1921
|
}
|
|
1846
1922
|
|
|
1923
|
+
export interface RawCollectShareEntryPluginOptions {
|
|
1924
|
+
consumes: Array<RawConsumeOptions>
|
|
1925
|
+
filename?: string
|
|
1926
|
+
}
|
|
1927
|
+
|
|
1847
1928
|
export interface RawCompilerPlatform {
|
|
1848
1929
|
web?: boolean | null
|
|
1849
1930
|
browser?: boolean | null
|
|
@@ -1858,12 +1939,13 @@ export interface RawConsumeOptions {
|
|
|
1858
1939
|
import?: string
|
|
1859
1940
|
importResolved?: string
|
|
1860
1941
|
shareKey: string
|
|
1861
|
-
shareScope: string
|
|
1942
|
+
shareScope: string | Array<string>
|
|
1862
1943
|
requiredVersion?: string | false | undefined
|
|
1863
1944
|
packageName?: string
|
|
1864
1945
|
strictVersion: boolean
|
|
1865
1946
|
singleton: boolean
|
|
1866
1947
|
eager: boolean
|
|
1948
|
+
treeShakingMode?: string
|
|
1867
1949
|
}
|
|
1868
1950
|
|
|
1869
1951
|
export interface RawConsumeSharedPluginOptions {
|
|
@@ -1873,7 +1955,7 @@ export interface RawConsumeSharedPluginOptions {
|
|
|
1873
1955
|
|
|
1874
1956
|
export interface RawContainerPluginOptions {
|
|
1875
1957
|
name: string
|
|
1876
|
-
shareScope: string
|
|
1958
|
+
shareScope: string | Array<string>
|
|
1877
1959
|
library: JsLibraryOptions
|
|
1878
1960
|
runtime?: false | string
|
|
1879
1961
|
filename?: string
|
|
@@ -1884,7 +1966,7 @@ export interface RawContainerPluginOptions {
|
|
|
1884
1966
|
export interface RawContainerReferencePluginOptions {
|
|
1885
1967
|
remoteType: string
|
|
1886
1968
|
remotes: Array<RawRemoteOptions>
|
|
1887
|
-
shareScope?: string
|
|
1969
|
+
shareScope?: string | Array<string>
|
|
1888
1970
|
enhanced: boolean
|
|
1889
1971
|
}
|
|
1890
1972
|
|
|
@@ -2014,6 +2096,7 @@ export interface RawCssAutoGeneratorOptions {
|
|
|
2014
2096
|
export interface RawCssAutoParserOptions {
|
|
2015
2097
|
namedExports?: boolean
|
|
2016
2098
|
url?: boolean
|
|
2099
|
+
resolveImport?: boolean | ((context: { url: string, media: string | undefined, resourcePath: string, supports: string | undefined, layer: string | undefined }) => boolean)
|
|
2017
2100
|
}
|
|
2018
2101
|
|
|
2019
2102
|
export interface RawCssChunkingPluginOptions {
|
|
@@ -2040,6 +2123,14 @@ export interface RawCssGeneratorOptions {
|
|
|
2040
2123
|
esModule?: boolean
|
|
2041
2124
|
}
|
|
2042
2125
|
|
|
2126
|
+
export interface RawCssImportContext {
|
|
2127
|
+
url: string
|
|
2128
|
+
media?: string
|
|
2129
|
+
resourcePath: string
|
|
2130
|
+
supports?: string
|
|
2131
|
+
layer?: string
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2043
2134
|
export interface RawCssModuleGeneratorOptions {
|
|
2044
2135
|
exportsConvention?: "as-is" | "camel-case" | "camel-case-only" | "dashes" | "dashes-only"
|
|
2045
2136
|
exportsOnly?: boolean
|
|
@@ -2050,11 +2141,13 @@ export interface RawCssModuleGeneratorOptions {
|
|
|
2050
2141
|
export interface RawCssModuleParserOptions {
|
|
2051
2142
|
namedExports?: boolean
|
|
2052
2143
|
url?: boolean
|
|
2144
|
+
resolveImport?: boolean | ((context: { url: string, media: string | undefined, resourcePath: string, supports: string | undefined, layer: string | undefined }) => boolean)
|
|
2053
2145
|
}
|
|
2054
2146
|
|
|
2055
2147
|
export interface RawCssParserOptions {
|
|
2056
2148
|
namedExports?: boolean
|
|
2057
2149
|
url?: boolean
|
|
2150
|
+
resolveImport?: boolean | ((context: { url: string, media: string | undefined, resourcePath: string, supports: string | undefined, layer: string | undefined }) => boolean)
|
|
2058
2151
|
}
|
|
2059
2152
|
|
|
2060
2153
|
export interface RawDllEntryPluginOptions {
|
|
@@ -2095,6 +2188,12 @@ export interface RawDynamicEntryPluginOptions {
|
|
|
2095
2188
|
entry: () => Promise<RawEntryDynamicResult[]>
|
|
2096
2189
|
}
|
|
2097
2190
|
|
|
2191
|
+
export interface RawEnableLibraryPluginOptions {
|
|
2192
|
+
libraryType: string
|
|
2193
|
+
preserveModules?: string
|
|
2194
|
+
splitChunks?: RawSplitChunksOptions
|
|
2195
|
+
}
|
|
2196
|
+
|
|
2098
2197
|
export interface RawEntryDynamicResult {
|
|
2099
2198
|
import: Array<string>
|
|
2100
2199
|
options: JsEntryOptions
|
|
@@ -2121,6 +2220,7 @@ export interface RawEnvironment {
|
|
|
2121
2220
|
|
|
2122
2221
|
export interface RawEsmLibraryPlugin {
|
|
2123
2222
|
preserveModules?: string
|
|
2223
|
+
splitChunks?: RawSplitChunksOptions
|
|
2124
2224
|
}
|
|
2125
2225
|
|
|
2126
2226
|
export interface RawEvalDevToolModulePluginOptions {
|
|
@@ -2130,10 +2230,10 @@ export interface RawEvalDevToolModulePluginOptions {
|
|
|
2130
2230
|
}
|
|
2131
2231
|
|
|
2132
2232
|
export interface RawExperiments {
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2233
|
+
useInputFileSystem?: false | Array<RegExp>
|
|
2234
|
+
css?: boolean
|
|
2235
|
+
deferImport: boolean
|
|
2236
|
+
pureFunctions: boolean
|
|
2137
2237
|
}
|
|
2138
2238
|
|
|
2139
2239
|
export interface RawExposeOptions {
|
|
@@ -2172,6 +2272,7 @@ export interface RawExternalsPresets {
|
|
|
2172
2272
|
export interface RawExtractComments {
|
|
2173
2273
|
banner?: string | boolean
|
|
2174
2274
|
condition?: string
|
|
2275
|
+
conditionFlags?: string
|
|
2175
2276
|
}
|
|
2176
2277
|
|
|
2177
2278
|
export interface RawFallbackCacheGroupOptions {
|
|
@@ -2207,6 +2308,13 @@ export interface RawGeneratorOptions {
|
|
|
2207
2308
|
json?: RawJsonGeneratorOptions
|
|
2208
2309
|
}
|
|
2209
2310
|
|
|
2311
|
+
export interface RawHashedModuleIdsPluginOptions {
|
|
2312
|
+
context?: string
|
|
2313
|
+
hashFunction?: string
|
|
2314
|
+
hashDigest?: string
|
|
2315
|
+
hashDigestLength?: number
|
|
2316
|
+
}
|
|
2317
|
+
|
|
2210
2318
|
export interface RawHtmlRspackPluginBaseOptions {
|
|
2211
2319
|
href?: string
|
|
2212
2320
|
target?: "_self" | "_blank" | "_parent" | "_top"
|
|
@@ -2260,12 +2368,11 @@ export interface RawIgnorePluginOptions {
|
|
|
2260
2368
|
|
|
2261
2369
|
export interface RawIncremental {
|
|
2262
2370
|
silent: boolean
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
dependenciesDiagnostics: boolean
|
|
2267
|
-
sideEffects: boolean
|
|
2371
|
+
buildModuleGraph: boolean
|
|
2372
|
+
finishModules: boolean
|
|
2373
|
+
optimizeDependencies: boolean
|
|
2268
2374
|
buildChunkGraph: boolean
|
|
2375
|
+
optimizeChunkModules: boolean
|
|
2269
2376
|
moduleIds: boolean
|
|
2270
2377
|
chunkIds: boolean
|
|
2271
2378
|
modulesHashes: boolean
|
|
@@ -2273,7 +2380,7 @@ export interface RawIncremental {
|
|
|
2273
2380
|
modulesRuntimeRequirements: boolean
|
|
2274
2381
|
chunksRuntimeRequirements: boolean
|
|
2275
2382
|
chunksHashes: boolean
|
|
2276
|
-
|
|
2383
|
+
chunkAsset: boolean
|
|
2277
2384
|
emitAssets: boolean
|
|
2278
2385
|
}
|
|
2279
2386
|
|
|
@@ -2318,41 +2425,42 @@ export interface RawJavascriptParserOptions {
|
|
|
2318
2425
|
exprContextCritical?: boolean
|
|
2319
2426
|
unknownContextCritical?: boolean
|
|
2320
2427
|
wrappedContextCritical?: boolean
|
|
2428
|
+
strictThisContextOnImports?: boolean
|
|
2321
2429
|
wrappedContextRegExp?: RegExp
|
|
2322
2430
|
exportsPresence?: string
|
|
2323
2431
|
importExportsPresence?: string
|
|
2324
2432
|
reexportExportsPresence?: string
|
|
2325
|
-
strictExportPresence?: boolean
|
|
2326
2433
|
worker?: Array<string>
|
|
2327
2434
|
overrideStrict?: string
|
|
2328
|
-
importMeta?:
|
|
2329
|
-
|
|
2330
|
-
* This option is experimental in Rspack only and subject to change or be removed anytime.
|
|
2331
|
-
* @experimental
|
|
2332
|
-
*/
|
|
2333
|
-
requireAlias?: boolean
|
|
2334
|
-
/**
|
|
2335
|
-
* This option is experimental in Rspack only and subject to change or be removed anytime.
|
|
2336
|
-
* @experimental
|
|
2337
|
-
*/
|
|
2338
|
-
requireAsExpression?: boolean
|
|
2339
|
-
/**
|
|
2340
|
-
* This option is experimental in Rspack only and subject to change or be removed anytime.
|
|
2341
|
-
* @experimental
|
|
2342
|
-
*/
|
|
2343
|
-
requireDynamic?: boolean
|
|
2344
|
-
/**
|
|
2345
|
-
* This option is experimental in Rspack only and subject to change or be removed anytime.
|
|
2346
|
-
* @experimental
|
|
2347
|
-
*/
|
|
2348
|
-
requireResolve?: boolean
|
|
2435
|
+
importMeta?: string
|
|
2436
|
+
commonjsMagicComments?: boolean
|
|
2349
2437
|
commonjs?: boolean | { exports?: boolean | 'skipInEsm' }
|
|
2438
|
+
deferImport?: boolean
|
|
2439
|
+
/**
|
|
2440
|
+
* This option is experimental in Rspack only and subject to change or be removed anytime.
|
|
2441
|
+
* @experimental
|
|
2442
|
+
*/
|
|
2443
|
+
requireAlias?: boolean
|
|
2444
|
+
/**
|
|
2445
|
+
* This option is experimental in Rspack only and subject to change or be removed anytime.
|
|
2446
|
+
* @experimental
|
|
2447
|
+
*/
|
|
2448
|
+
requireAsExpression?: boolean
|
|
2449
|
+
/**
|
|
2450
|
+
* This option is experimental in Rspack only and subject to change or be removed anytime.
|
|
2451
|
+
* @experimental
|
|
2452
|
+
*/
|
|
2453
|
+
requireDynamic?: boolean
|
|
2454
|
+
/**
|
|
2455
|
+
* This option is experimental in Rspack only and subject to change or be removed anytime.
|
|
2456
|
+
* @experimental
|
|
2457
|
+
*/
|
|
2458
|
+
requireResolve?: boolean
|
|
2350
2459
|
/**
|
|
2351
2460
|
* This option is experimental in Rspack only and subject to change or be removed anytime.
|
|
2352
2461
|
* @experimental
|
|
2353
2462
|
*/
|
|
2354
2463
|
importDynamic?: boolean
|
|
2355
|
-
commonjsMagicComments?: boolean
|
|
2356
2464
|
/**
|
|
2357
2465
|
* This option is experimental in Rspack only and subject to change or be removed anytime.
|
|
2358
2466
|
* @experimental
|
|
@@ -2363,7 +2471,17 @@ typeReexportsPresence?: string
|
|
|
2363
2471
|
* @experimental
|
|
2364
2472
|
*/
|
|
2365
2473
|
jsx?: boolean
|
|
2366
|
-
|
|
2474
|
+
/**
|
|
2475
|
+
* This option is experimental in Rspack only and subject to change or be removed anytime.
|
|
2476
|
+
* @experimental
|
|
2477
|
+
*/
|
|
2478
|
+
importMetaResolve?: boolean
|
|
2479
|
+
/**
|
|
2480
|
+
* Flag top-level exported functions as side-effect-free for pure-function-based tree shaking.
|
|
2481
|
+
* This option is experimental in Rspack only and subject to change or be removed anytime.
|
|
2482
|
+
* @experimental
|
|
2483
|
+
*/
|
|
2484
|
+
pureFunctions?: Array<string>
|
|
2367
2485
|
}
|
|
2368
2486
|
|
|
2369
2487
|
export interface RawJsonGeneratorOptions {
|
|
@@ -2463,8 +2581,13 @@ export interface RawModuleFederationManifestPluginOptions {
|
|
|
2463
2581
|
buildInfo?: RawStatsBuildInfo
|
|
2464
2582
|
}
|
|
2465
2583
|
|
|
2584
|
+
export interface RawModuleFederationRuntimeExperimentsOptions {
|
|
2585
|
+
asyncStartup?: boolean
|
|
2586
|
+
}
|
|
2587
|
+
|
|
2466
2588
|
export interface RawModuleFederationRuntimePluginOptions {
|
|
2467
2589
|
entryRuntime?: string | undefined
|
|
2590
|
+
experiments?: RawModuleFederationRuntimeExperimentsOptions
|
|
2468
2591
|
}
|
|
2469
2592
|
|
|
2470
2593
|
export interface RawModuleFilenameTemplateFnCtx {
|
|
@@ -2492,7 +2615,6 @@ export interface RawModuleOptions {
|
|
|
2492
2615
|
parser?: Record<string, RawParserOptions>
|
|
2493
2616
|
generator?: Record<string, RawGeneratorOptions>
|
|
2494
2617
|
noParse?: string | RegExp | ((request: string) => boolean) | (string | RegExp | ((request: string) => boolean))[]
|
|
2495
|
-
unsafeCache?: boolean | RegExp
|
|
2496
2618
|
}
|
|
2497
2619
|
|
|
2498
2620
|
export interface RawModuleRule {
|
|
@@ -2568,7 +2690,6 @@ export interface RawOccurrenceChunkIdsPluginOptions {
|
|
|
2568
2690
|
}
|
|
2569
2691
|
|
|
2570
2692
|
export interface RawOptimizationOptions {
|
|
2571
|
-
removeAvailableModules: boolean
|
|
2572
2693
|
sideEffects: boolean | string
|
|
2573
2694
|
usedExports: boolean | string
|
|
2574
2695
|
providedExports: boolean
|
|
@@ -2580,6 +2701,12 @@ export interface RawOptimizationOptions {
|
|
|
2580
2701
|
avoidEntryIife: boolean
|
|
2581
2702
|
}
|
|
2582
2703
|
|
|
2704
|
+
export interface RawOptimizeSharedConfig {
|
|
2705
|
+
shareKey: string
|
|
2706
|
+
treeShaking: boolean
|
|
2707
|
+
usedExports?: Array<string>
|
|
2708
|
+
}
|
|
2709
|
+
|
|
2583
2710
|
export interface RawOptions {
|
|
2584
2711
|
name?: string
|
|
2585
2712
|
mode?: undefined | 'production' | 'development' | 'none'
|
|
@@ -2592,11 +2719,12 @@ export interface RawOptions {
|
|
|
2592
2719
|
stats: RawStatsOptions
|
|
2593
2720
|
cache: boolean | { type: "memory" } | ({ type: "persistent" } & RawCacheOptionsPersistent)
|
|
2594
2721
|
experiments: RawExperiments
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2722
|
+
incremental?: false | { [key: string]: boolean }
|
|
2723
|
+
node?: RawNodeOption
|
|
2724
|
+
amd?: string
|
|
2725
|
+
bail: boolean
|
|
2726
|
+
__references: Record<string, any>
|
|
2727
|
+
__virtual_files?: Array<JsVirtualFile>
|
|
2600
2728
|
}
|
|
2601
2729
|
|
|
2602
2730
|
export interface RawOutputOptions {
|
|
@@ -2660,24 +2788,32 @@ export interface RawPathData {
|
|
|
2660
2788
|
url?: string
|
|
2661
2789
|
}
|
|
2662
2790
|
|
|
2791
|
+
export interface RawProgressPluginHandlerInfo {
|
|
2792
|
+
/** Number of built modules */
|
|
2793
|
+
builtModules: number
|
|
2794
|
+
/** Identifier of the active module (only provided during `build modules` updates) */
|
|
2795
|
+
moduleIdentifier?: string
|
|
2796
|
+
}
|
|
2797
|
+
|
|
2663
2798
|
export interface RawProgressPluginOptions {
|
|
2664
2799
|
prefix?: string
|
|
2665
2800
|
profile?: boolean
|
|
2666
2801
|
template?: string
|
|
2667
2802
|
tick?: string | Array<string>
|
|
2668
2803
|
progressChars?: string
|
|
2669
|
-
handler?: (percent: number, msg: string,
|
|
2804
|
+
handler?: (percent: number, msg: string, info: RawProgressPluginHandlerInfo) => void
|
|
2670
2805
|
}
|
|
2671
2806
|
|
|
2672
2807
|
export interface RawProvideOptions {
|
|
2673
2808
|
key: string
|
|
2674
2809
|
shareKey: string
|
|
2675
|
-
shareScope: string
|
|
2810
|
+
shareScope: string | Array<string>
|
|
2676
2811
|
version?: string | false | undefined
|
|
2677
2812
|
eager: boolean
|
|
2678
2813
|
singleton?: boolean
|
|
2679
2814
|
requiredVersion?: string | false | undefined
|
|
2680
2815
|
strictVersion?: boolean
|
|
2816
|
+
treeShakingMode?: string
|
|
2681
2817
|
}
|
|
2682
2818
|
|
|
2683
2819
|
export interface RawRelated {
|
|
@@ -2692,7 +2828,7 @@ export interface RawRemoteAliasTarget {
|
|
|
2692
2828
|
export interface RawRemoteOptions {
|
|
2693
2829
|
key: string
|
|
2694
2830
|
external: Array<string>
|
|
2695
|
-
shareScope: string
|
|
2831
|
+
shareScope: string | Array<string>
|
|
2696
2832
|
}
|
|
2697
2833
|
|
|
2698
2834
|
export interface RawResolveOptions {
|
|
@@ -2770,6 +2906,11 @@ export interface RawRslibPluginOptions {
|
|
|
2770
2906
|
* @default `false`
|
|
2771
2907
|
*/
|
|
2772
2908
|
forceNodeShims?: boolean
|
|
2909
|
+
/**
|
|
2910
|
+
* Auto downgrade module external type to node-commonjs for CJS require of node builtins
|
|
2911
|
+
* @default `false`
|
|
2912
|
+
*/
|
|
2913
|
+
autoCjsNodeBuiltin?: boolean
|
|
2773
2914
|
}
|
|
2774
2915
|
|
|
2775
2916
|
export interface RawRstestPluginOptions {
|
|
@@ -2778,6 +2919,7 @@ export interface RawRstestPluginOptions {
|
|
|
2778
2919
|
hoistMockModule: boolean
|
|
2779
2920
|
manualMockRoot: string
|
|
2780
2921
|
preserveNewUrl?: Array<string>
|
|
2922
|
+
globals?: boolean
|
|
2781
2923
|
}
|
|
2782
2924
|
|
|
2783
2925
|
export interface RawRuleSetCondition {
|
|
@@ -2811,6 +2953,21 @@ export interface RawRuntimeChunkOptions {
|
|
|
2811
2953
|
name: string | ((entrypoint: { name: string }) => string)
|
|
2812
2954
|
}
|
|
2813
2955
|
|
|
2956
|
+
export interface RawSharedContainerPluginOptions {
|
|
2957
|
+
name: string
|
|
2958
|
+
request: string
|
|
2959
|
+
version: string
|
|
2960
|
+
fileName?: string
|
|
2961
|
+
library: JsLibraryOptions
|
|
2962
|
+
}
|
|
2963
|
+
|
|
2964
|
+
export interface RawSharedUsedExportsOptimizerPluginOptions {
|
|
2965
|
+
shared: Array<RawOptimizeSharedConfig>
|
|
2966
|
+
injectTreeShakingUsedExports?: boolean
|
|
2967
|
+
manifestFileName?: string
|
|
2968
|
+
statsFileName?: string
|
|
2969
|
+
}
|
|
2970
|
+
|
|
2814
2971
|
export interface RawSizeLimitsPluginOptions {
|
|
2815
2972
|
assetFilter?: (assetFilename: string) => boolean
|
|
2816
2973
|
hints?: "error" | "warning"
|
|
@@ -2844,7 +3001,7 @@ export interface RawSplitChunksOptions {
|
|
|
2844
3001
|
hidePathInfo?: boolean
|
|
2845
3002
|
minSize?: number | RawSplitChunkSizes
|
|
2846
3003
|
minSizeReduction?: number | RawSplitChunkSizes
|
|
2847
|
-
enforceSizeThreshold?: number
|
|
3004
|
+
enforceSizeThreshold?: number | RawSplitChunkSizes
|
|
2848
3005
|
minRemainingSize?: number | RawSplitChunkSizes
|
|
2849
3006
|
maxSize?: number | RawSplitChunkSizes
|
|
2850
3007
|
maxAsyncSize?: number | RawSplitChunkSizes
|
|
@@ -2854,6 +3011,8 @@ export interface RawSplitChunksOptions {
|
|
|
2854
3011
|
export interface RawStatsBuildInfo {
|
|
2855
3012
|
buildVersion: string
|
|
2856
3013
|
buildName?: string
|
|
3014
|
+
target?: Array<string>
|
|
3015
|
+
plugins?: Array<string>
|
|
2857
3016
|
}
|
|
2858
3017
|
|
|
2859
3018
|
export interface RawStatsOptions {
|
|
@@ -2914,8 +3073,7 @@ export interface RealDependencyLocation {
|
|
|
2914
3073
|
end?: SourcePosition
|
|
2915
3074
|
}
|
|
2916
3075
|
|
|
2917
|
-
/**
|
|
2918
|
-
* this is a process level tracing, which means it would be shared by all compilers in the same process
|
|
3076
|
+
/** * this is a process level tracing, which means it would be shared by all compilers in the same process
|
|
2919
3077
|
* only the first call would take effect, the following calls would be ignored
|
|
2920
3078
|
* Some code is modified based on
|
|
2921
3079
|
* https://github.com/swc-project/swc/blob/d1d0607158ab40463d1b123fed52cc526eba8385/bindings/binding_core_node/src/util.rs#L29-L58
|
|
@@ -2943,39 +3101,40 @@ export declare enum RegisterJsTapKind {
|
|
|
2943
3101
|
CompilationAfterOptimizeModules = 14,
|
|
2944
3102
|
CompilationOptimizeTree = 15,
|
|
2945
3103
|
CompilationOptimizeChunkModules = 16,
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
3104
|
+
CompilationBeforeModuleIds = 17,
|
|
3105
|
+
CompilationAdditionalTreeRuntimeRequirements = 18,
|
|
3106
|
+
CompilationRuntimeRequirementInTree = 19,
|
|
3107
|
+
CompilationRuntimeModule = 20,
|
|
3108
|
+
CompilationChunkHash = 21,
|
|
3109
|
+
CompilationChunkAsset = 22,
|
|
3110
|
+
CompilationProcessAssets = 23,
|
|
3111
|
+
CompilationAfterProcessAssets = 24,
|
|
3112
|
+
CompilationSeal = 25,
|
|
3113
|
+
CompilationAfterSeal = 26,
|
|
3114
|
+
NormalModuleFactoryBeforeResolve = 27,
|
|
3115
|
+
NormalModuleFactoryFactorize = 28,
|
|
3116
|
+
NormalModuleFactoryResolve = 29,
|
|
3117
|
+
NormalModuleFactoryAfterResolve = 30,
|
|
3118
|
+
NormalModuleFactoryCreateModule = 31,
|
|
3119
|
+
NormalModuleFactoryResolveForScheme = 32,
|
|
3120
|
+
ContextModuleFactoryBeforeResolve = 33,
|
|
3121
|
+
ContextModuleFactoryAfterResolve = 34,
|
|
3122
|
+
JavascriptModulesChunkHash = 35,
|
|
3123
|
+
HtmlPluginBeforeAssetTagGeneration = 36,
|
|
3124
|
+
HtmlPluginAlterAssetTags = 37,
|
|
3125
|
+
HtmlPluginAlterAssetTagGroups = 38,
|
|
3126
|
+
HtmlPluginAfterTemplateExecution = 39,
|
|
3127
|
+
HtmlPluginBeforeEmit = 40,
|
|
3128
|
+
HtmlPluginAfterEmit = 41,
|
|
3129
|
+
RuntimePluginCreateScript = 42,
|
|
3130
|
+
RuntimePluginCreateLink = 43,
|
|
3131
|
+
RuntimePluginLinkPreload = 44,
|
|
3132
|
+
RuntimePluginLinkPrefetch = 45,
|
|
3133
|
+
RsdoctorPluginModuleGraph = 46,
|
|
3134
|
+
RsdoctorPluginChunkGraph = 47,
|
|
3135
|
+
RsdoctorPluginModuleIds = 48,
|
|
3136
|
+
RsdoctorPluginModuleSources = 49,
|
|
3137
|
+
RsdoctorPluginAssets = 50
|
|
2979
3138
|
}
|
|
2980
3139
|
|
|
2981
3140
|
export interface RegisterJsTaps {
|
|
@@ -2999,6 +3158,7 @@ export interface RegisterJsTaps {
|
|
|
2999
3158
|
registerCompilationAfterOptimizeModulesTaps: (stages: Array<number>) => Array<{ function: (() => void); stage: number; }>
|
|
3000
3159
|
registerCompilationOptimizeTreeTaps: (stages: Array<number>) => Array<{ function: (() => Promise<void>); stage: number; }>
|
|
3001
3160
|
registerCompilationOptimizeChunkModulesTaps: (stages: Array<number>) => Array<{ function: (() => Promise<boolean | undefined>); stage: number; }>
|
|
3161
|
+
registerCompilationBeforeModuleIdsTaps: (stages: Array<number>) => Array<{ function: ((arg: JsBeforeModuleIdsArg) => JsBeforeModuleIdsResult); stage: number; }>
|
|
3002
3162
|
registerCompilationChunkHashTaps: (stages: Array<number>) => Array<{ function: ((arg: Chunk) => Buffer); stage: number; }>
|
|
3003
3163
|
registerCompilationChunkAssetTaps: (stages: Array<number>) => Array<{ function: ((arg: JsChunkAssetArgs) => void); stage: number; }>
|
|
3004
3164
|
registerCompilationProcessAssetsTaps: (stages: Array<number>) => Array<{ function: ((arg: JsCompilation) => Promise<void>); stage: number; }>
|