@rspack-debug/browser 0.0.0-alpha.0 → 1.6.4

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.
Files changed (252) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +15 -0
  3. package/dist/BuildInfo.d.ts +17 -0
  4. package/dist/Chunk.d.ts +16 -0
  5. package/dist/ChunkGraph.d.ts +9 -0
  6. package/dist/Chunks.d.ts +12 -0
  7. package/dist/CodeGenerationResults.d.ts +1 -0
  8. package/dist/Compilation.d.ts +417 -0
  9. package/dist/Compiler.d.ts +223 -0
  10. package/dist/ConcatenatedModule.d.ts +1 -0
  11. package/dist/ContextModule.d.ts +1 -0
  12. package/dist/ContextModuleFactory.d.ts +13 -0
  13. package/dist/Diagnostics.d.ts +7 -0
  14. package/dist/Entrypoint.d.ts +2 -0
  15. package/dist/ErrorHelpers.d.ts +3 -0
  16. package/dist/ExecuteModulePlugin.d.ts +4 -0
  17. package/dist/ExportsInfo.d.ts +20 -0
  18. package/dist/ExternalModule.d.ts +1 -0
  19. package/dist/FileSystem.d.ts +54 -0
  20. package/dist/FileSystemInfo.d.ts +5 -0
  21. package/dist/Module.d.ts +42 -0
  22. package/dist/ModuleGraph.d.ts +19 -0
  23. package/dist/ModuleTypeConstants.d.ts +8 -0
  24. package/dist/MultiCompiler.d.ts +82 -0
  25. package/dist/MultiStats.d.ts +23 -0
  26. package/dist/MultiWatching.d.ts +27 -0
  27. package/dist/NativeWatchFileSystem.d.ts +23 -0
  28. package/dist/NormalModule.d.ts +15 -0
  29. package/dist/NormalModuleFactory.d.ts +23 -0
  30. package/dist/Resolver.d.ts +30 -0
  31. package/dist/ResolverFactory.d.ts +17 -0
  32. package/dist/RspackError.d.ts +12 -0
  33. package/dist/RuleSetCompiler.d.ts +9 -0
  34. package/dist/RuntimeGlobals.d.ts +328 -0
  35. package/dist/RuntimeModule.d.ts +32 -0
  36. package/dist/Stats.d.ts +17 -0
  37. package/dist/Template.d.ts +77 -0
  38. package/dist/VirtualModulesPlugin.d.ts +12 -0
  39. package/dist/Watching.d.ts +56 -0
  40. package/dist/binding.d.ts +8 -0
  41. package/dist/browser/BrowserHttpImportEsmPlugin.d.ts +48 -0
  42. package/dist/browser/BrowserRequirePlugin.d.ts +38 -0
  43. package/dist/browser/buffer.d.ts +1 -0
  44. package/dist/browser/fs.d.ts +13 -0
  45. package/dist/browser/index.d.ts +11 -0
  46. package/dist/browser/service.d.ts +25 -0
  47. package/dist/builtin-loader/index.d.ts +1 -0
  48. package/dist/builtin-loader/lightningcss/index.d.ts +117 -0
  49. package/dist/builtin-loader/swc/collectTypeScriptInfo.d.ts +21 -0
  50. package/dist/builtin-loader/swc/index.d.ts +5 -0
  51. package/dist/builtin-loader/swc/pluginImport.d.ts +33 -0
  52. package/dist/builtin-loader/swc/types.d.ts +83 -0
  53. package/dist/builtin-plugin/APIPlugin.d.ts +9 -0
  54. package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +9 -0
  55. package/dist/builtin-plugin/AssetModulesPlugin.d.ts +9 -0
  56. package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +9 -0
  57. package/dist/builtin-plugin/BannerPlugin.d.ts +40 -0
  58. package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +14 -0
  59. package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +9 -0
  60. package/dist/builtin-plugin/CircularDependencyRspackPlugin.d.ts +59 -0
  61. package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +9 -0
  62. package/dist/builtin-plugin/ContextReplacementPlugin.d.ts +9 -0
  63. package/dist/builtin-plugin/CopyRspackPlugin.d.ts +14 -0
  64. package/dist/builtin-plugin/CssChunkingPlugin.d.ts +21 -0
  65. package/dist/builtin-plugin/CssModulesPlugin.d.ts +9 -0
  66. package/dist/builtin-plugin/DataUriPlugin.d.ts +9 -0
  67. package/dist/builtin-plugin/DefinePlugin.d.ts +16 -0
  68. package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +7 -0
  69. package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +7 -0
  70. package/dist/builtin-plugin/DllEntryPlugin.d.ts +12 -0
  71. package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +11 -0
  72. package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +12 -0
  73. package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +9 -0
  74. package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +25 -0
  75. package/dist/builtin-plugin/EnableLibraryPlugin.d.ts +11 -0
  76. package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +9 -0
  77. package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +9 -0
  78. package/dist/builtin-plugin/EntryPlugin.d.ts +32 -0
  79. package/dist/builtin-plugin/EsmLibraryPlugin.d.ts +11 -0
  80. package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +11 -0
  81. package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +10 -0
  82. package/dist/builtin-plugin/ExternalsPlugin.d.ts +12 -0
  83. package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +9 -0
  84. package/dist/builtin-plugin/FileUriPlugin.d.ts +9 -0
  85. package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +9 -0
  86. package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +9 -0
  87. package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +9 -0
  88. package/dist/builtin-plugin/HotModuleReplacementPlugin.d.ts +7 -0
  89. package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +9 -0
  90. package/dist/builtin-plugin/HttpUriPlugin.d.ts +36 -0
  91. package/dist/builtin-plugin/IgnorePlugin.d.ts +19 -0
  92. package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +9 -0
  93. package/dist/builtin-plugin/InlineExportsPlugin.d.ts +9 -0
  94. package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +15 -0
  95. package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +10 -0
  96. package/dist/builtin-plugin/JsonModulesPlugin.d.ts +9 -0
  97. package/dist/builtin-plugin/LibManifestPlugin.d.ts +17 -0
  98. package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +32 -0
  99. package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +14 -0
  100. package/dist/builtin-plugin/MangleExportsPlugin.d.ts +9 -0
  101. package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +9 -0
  102. package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +9 -0
  103. package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +7 -0
  104. package/dist/builtin-plugin/ModuleInfoHeaderPlugin.d.ts +9 -0
  105. package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +9 -0
  106. package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +9 -0
  107. package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +7 -0
  108. package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +7 -0
  109. package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +9 -0
  110. package/dist/builtin-plugin/NodeTargetPlugin.d.ts +9 -0
  111. package/dist/builtin-plugin/NormalModuleReplacementPlugin.d.ts +10 -0
  112. package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +10 -0
  113. package/dist/builtin-plugin/ProgressPlugin.d.ts +11 -0
  114. package/dist/builtin-plugin/ProvidePlugin.d.ts +10 -0
  115. package/dist/builtin-plugin/RealContentHashPlugin.d.ts +9 -0
  116. package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +9 -0
  117. package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +9 -0
  118. package/dist/builtin-plugin/RsdoctorPlugin.d.ts +49 -0
  119. package/dist/builtin-plugin/RslibPlugin.d.ts +11 -0
  120. package/dist/builtin-plugin/RstestPlugin.d.ts +11 -0
  121. package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +11 -0
  122. package/dist/builtin-plugin/RuntimePlugin.d.ts +28 -0
  123. package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +9 -0
  124. package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +19 -0
  125. package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +11 -0
  126. package/dist/builtin-plugin/SplitChunksPlugin.d.ts +11 -0
  127. package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +39 -0
  128. package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +215 -0
  129. package/dist/builtin-plugin/URLPlugin.d.ts +9 -0
  130. package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +9 -0
  131. package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +7 -0
  132. package/dist/builtin-plugin/WorkerPlugin.d.ts +13 -0
  133. package/dist/builtin-plugin/base.d.ts +45 -0
  134. package/dist/builtin-plugin/css-extract/index.d.ts +24 -0
  135. package/dist/builtin-plugin/css-extract/loader.d.ts +21 -0
  136. package/dist/builtin-plugin/css-extract/utils.d.ts +6 -0
  137. package/dist/builtin-plugin/html-plugin/hooks.d.ts +32 -0
  138. package/dist/builtin-plugin/html-plugin/index.d.ts +2 -0
  139. package/dist/builtin-plugin/html-plugin/options.d.ts +82 -0
  140. package/dist/builtin-plugin/html-plugin/plugin.d.ts +24 -0
  141. package/dist/builtin-plugin/html-plugin/taps.d.ts +2 -0
  142. package/dist/builtin-plugin/index.d.ts +84 -0
  143. package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +10 -0
  144. package/dist/builtin-plugin/lazy-compilation/middleware.d.ts +4 -0
  145. package/dist/config/adapter.d.ts +8 -0
  146. package/dist/config/adapterRuleUse.d.ts +391 -0
  147. package/dist/config/browserslistTargetHandler.d.ts +15 -0
  148. package/dist/config/defaults.d.ts +4 -0
  149. package/dist/config/devServer.d.ts +314 -0
  150. package/dist/config/index.d.ts +5 -0
  151. package/dist/config/normalization.d.ts +169 -0
  152. package/dist/config/target.d.ts +89 -0
  153. package/dist/config/types.d.ts +2383 -0
  154. package/dist/container/ContainerPlugin.d.ts +40 -0
  155. package/dist/container/ContainerReferencePlugin.d.ts +33 -0
  156. package/dist/container/ModuleFederationManifestPlugin.d.ts +37 -0
  157. package/dist/container/ModuleFederationPlugin.d.ts +15 -0
  158. package/dist/container/ModuleFederationPluginV1.d.ts +22 -0
  159. package/dist/container/ModuleFederationRuntimePlugin.d.ts +12 -0
  160. package/dist/container/index.d.ts +4 -0
  161. package/dist/container/options.d.ts +3 -0
  162. package/dist/error/ConcurrentCompilationError.d.ts +14 -0
  163. package/dist/exports.d.ts +166 -0
  164. package/dist/index.d.ts +10 -0
  165. package/dist/index.mjs +66931 -0
  166. package/dist/index.mjs.LICENSE.txt +19 -0
  167. package/dist/lib/AbstractMethodError.d.ts +23 -0
  168. package/dist/lib/Cache.d.ts +65 -0
  169. package/dist/lib/CacheFacade.d.ts +139 -0
  170. package/dist/lib/DllPlugin.d.ts +42 -0
  171. package/dist/lib/DllReferencePlugin.d.ts +119 -0
  172. package/dist/lib/EntryOptionPlugin.d.ts +33 -0
  173. package/dist/lib/EnvironmentPlugin.d.ts +22 -0
  174. package/dist/lib/HookWebpackError.d.ts +40 -0
  175. package/dist/lib/IgnoreWarningsPlugin.d.ts +25 -0
  176. package/dist/lib/LoaderOptionsPlugin.d.ts +28 -0
  177. package/dist/lib/LoaderTargetPlugin.d.ts +24 -0
  178. package/dist/lib/ModuleFilenameHelpers.d.ts +53 -0
  179. package/dist/lib/WebpackError.d.ts +21 -0
  180. package/dist/lib/cache/MemoryCachePlugin.d.ts +5 -0
  181. package/dist/lib/cache/getLazyHashedEtag.d.ts +35 -0
  182. package/dist/lib/cache/mergeEtags.d.ts +17 -0
  183. package/dist/loader-runner/LoaderLoadingError.d.ts +13 -0
  184. package/dist/loader-runner/ModuleError.d.ts +13 -0
  185. package/dist/loader-runner/index.d.ts +34 -0
  186. package/dist/loader-runner/loadLoader.d.ts +12 -0
  187. package/dist/loader-runner/service.d.ts +71 -0
  188. package/dist/loader-runner/utils.d.ts +7 -0
  189. package/dist/loader-runner/worker.d.ts +14 -0
  190. package/dist/logging/Logger.d.ts +61 -0
  191. package/dist/logging/createConsoleLogger.d.ts +35 -0
  192. package/dist/logging/truncateArgs.d.ts +16 -0
  193. package/dist/napi-binding.d.ts +3128 -0
  194. package/dist/node/NodeEnvironmentPlugin.d.ts +10 -0
  195. package/dist/node/NodeTemplatePlugin.d.ts +18 -0
  196. package/dist/node/NodeWatchFileSystem.d.ts +18 -0
  197. package/dist/node/nodeConsole.d.ts +15 -0
  198. package/dist/rspack.d.ts +16 -0
  199. package/dist/rspack.wasi-browser.js +125 -0
  200. package/dist/rspackOptionsApply.d.ts +4 -0
  201. package/dist/runtime/cssExtractHmr.d.ts +4 -0
  202. package/dist/runtime/moduleFederationDefaultRuntime.d.ts +2 -0
  203. package/dist/sharing/ConsumeSharedPlugin.d.ts +41 -0
  204. package/dist/sharing/ProvideSharedPlugin.d.ts +34 -0
  205. package/dist/sharing/SharePlugin.d.ts +51 -0
  206. package/dist/sharing/ShareRuntimePlugin.d.ts +9 -0
  207. package/dist/sharing/utils.d.ts +1 -0
  208. package/dist/stats/DefaultStatsFactoryPlugin.d.ts +20 -0
  209. package/dist/stats/DefaultStatsPresetPlugin.d.ts +4 -0
  210. package/dist/stats/DefaultStatsPrinterPlugin.d.ts +13 -0
  211. package/dist/stats/StatsFactory.d.ts +57 -0
  212. package/dist/stats/StatsPrinter.d.ts +57 -0
  213. package/dist/stats/statsFactoryUtils.d.ts +341 -0
  214. package/dist/swc.d.ts +7 -0
  215. package/dist/taps/compilation.d.ts +8 -0
  216. package/dist/taps/compiler.d.ts +2 -0
  217. package/dist/taps/contextModuleFactory.d.ts +2 -0
  218. package/dist/taps/index.d.ts +6 -0
  219. package/dist/taps/javascriptModules.d.ts +2 -0
  220. package/dist/taps/normalModuleFactory.d.ts +2 -0
  221. package/dist/taps/types.d.ts +11 -0
  222. package/dist/trace/index.d.ts +46 -0
  223. package/dist/trace/traceHookPlugin.d.ts +5 -0
  224. package/dist/util/ArrayQueue.d.ts +45 -0
  225. package/dist/util/AsyncTask.d.ts +7 -0
  226. package/dist/util/MergeCaller.d.ts +10 -0
  227. package/dist/util/SizeFormatHelpers.d.ts +10 -0
  228. package/dist/util/SplitChunkSize.d.ts +5 -0
  229. package/dist/util/assertNotNil.d.ts +1 -0
  230. package/dist/util/assetCondition.d.ts +2 -0
  231. package/dist/util/asyncLib.d.ts +54 -0
  232. package/dist/util/bindingVersionCheck.d.ts +5 -0
  233. package/dist/util/cleverMerge.d.ts +24 -0
  234. package/dist/util/comparators.d.ts +16 -0
  235. package/dist/util/createHash.d.ts +16 -0
  236. package/dist/util/createReadonlyMap.d.ts +1 -0
  237. package/dist/util/fake.d.ts +9 -0
  238. package/dist/util/fs.d.ts +375 -0
  239. package/dist/util/hash/index.d.ts +26 -0
  240. package/dist/util/hash/md4.d.ts +11 -0
  241. package/dist/util/hash/wasm-hash.d.ts +51 -0
  242. package/dist/util/hash/xxhash64.d.ts +11 -0
  243. package/dist/util/identifier.d.ts +31 -0
  244. package/dist/util/index.d.ts +8 -0
  245. package/dist/util/memoize.d.ts +2 -0
  246. package/dist/util/runtime.d.ts +2 -0
  247. package/dist/util/smartGrouping.d.ts +21 -0
  248. package/dist/util/source.d.ts +6 -0
  249. package/dist/util/validateConfig.d.ts +5 -0
  250. package/dist/wasi-worker-browser.mjs +23591 -0
  251. package/dist/wasi-worker-browser.mjs.LICENSE.txt +12 -0
  252. package/package.json +48 -9
@@ -0,0 +1,3128 @@
1
+ /* auto-generated by NAPI-RS */
2
+ /* eslint-disable */
3
+
4
+ /* -- banner.d.ts -- */
5
+ export type JsFilename =
6
+ | string
7
+ | ((pathData: JsPathData, assetInfo?: AssetInfo) => string);
8
+
9
+ export type RawLazyCompilationTest = RegExp | ((module: Module) => boolean);
10
+
11
+ export type AssetInfo = KnownAssetInfo & Record<string, any>;
12
+
13
+ export type CustomPluginName = string;
14
+
15
+ export const MODULE_IDENTIFIER_SYMBOL: unique symbol;
16
+
17
+ export const COMPILATION_HOOKS_MAP_SYMBOL: unique symbol;
18
+
19
+ export const BUILD_INFO_ASSETS_SYMBOL: unique symbol;
20
+ export const BUILD_INFO_FILE_DEPENDENCIES_SYMBOL: unique symbol;
21
+ export const BUILD_INFO_CONTEXT_DEPENDENCIES_SYMBOL: unique symbol;
22
+ export const BUILD_INFO_MISSING_DEPENDENCIES_SYMBOL: unique symbol;
23
+ export const BUILD_INFO_BUILD_DEPENDENCIES_SYMBOL: unique symbol;
24
+ export const COMMIT_CUSTOM_FIELDS_SYMBOL: unique symbol;
25
+
26
+ export const RUST_ERROR_SYMBOL: unique symbol;
27
+
28
+ interface KnownBuildInfo {
29
+ [BUILD_INFO_ASSETS_SYMBOL]: Assets,
30
+ [BUILD_INFO_FILE_DEPENDENCIES_SYMBOL]: string[],
31
+ [BUILD_INFO_CONTEXT_DEPENDENCIES_SYMBOL]: string[],
32
+ [BUILD_INFO_MISSING_DEPENDENCIES_SYMBOL]: string[],
33
+ [BUILD_INFO_BUILD_DEPENDENCIES_SYMBOL]: string[],
34
+ [COMMIT_CUSTOM_FIELDS_SYMBOL](): void;
35
+ }
36
+
37
+ export type BuildInfo = KnownBuildInfo & Record<string, any>;
38
+
39
+ export interface Module {
40
+ [MODULE_IDENTIFIER_SYMBOL]: string;
41
+ readonly type: string;
42
+ get context(): string | undefined;
43
+ get layer(): string | undefined;
44
+ get factoryMeta(): JsFactoryMeta
45
+ set factoryMeta(factoryMeta: JsFactoryMeta);
46
+ get useSourceMap(): boolean;
47
+ get useSimpleSourceMap(): boolean;
48
+ buildInfo: BuildInfo;
49
+ buildMeta: Record<string, any>;
50
+ }
51
+
52
+ interface NormalModuleConstructor {
53
+ new(): NormalModule;
54
+ readonly prototype: NormalModule;
55
+ }
56
+
57
+ export var NormalModule: NormalModuleConstructor;
58
+
59
+ export interface NormalModule extends Module {
60
+ readonly resource: string;
61
+ readonly request: string;
62
+ readonly userRequest: string;
63
+ readonly rawRequest: string;
64
+ readonly resourceResolveData: Readonly<JsResourceData> | undefined;
65
+ readonly loaders: JsLoaderItem[];
66
+ get matchResource(): string | undefined;
67
+ set matchResource(val: string | undefined);
68
+ }
69
+
70
+ export interface ConcatenatedModule extends Module {
71
+ }
72
+
73
+ export interface ContextModule extends Module {
74
+ }
75
+
76
+ export interface ExternalModule extends Module {
77
+ readonly userRequest: string;
78
+ }
79
+
80
+ export interface RspackError extends Error {
81
+ name: string;
82
+ message: string;
83
+ details?: string;
84
+ module?: null | Module;
85
+ loc?: DependencyLocation;
86
+ file?: string;
87
+ stack?: string;
88
+ hideStack?: boolean;
89
+ error?: Error;
90
+ }
91
+
92
+ export type DependencyLocation = SyntheticDependencyLocation | RealDependencyLocation;
93
+
94
+ export interface JsSource {
95
+ source: string | Buffer
96
+ map?: string
97
+ }
98
+ /* -- banner.d.ts end -- */
99
+
100
+ /* -- napi-rs generated below -- */
101
+
102
+ export declare class ExternalObject<T> {
103
+ readonly '': {
104
+ readonly '': unique symbol
105
+ [K: symbol]: T
106
+ }
107
+ }
108
+ export declare class Assets {
109
+ keys(): Array<string>
110
+ }
111
+
112
+ export declare class AsyncDependenciesBlock {
113
+ get dependencies(): Dependency[]
114
+ get blocks(): AsyncDependenciesBlock[]
115
+ }
116
+
117
+ export declare class Chunk {
118
+ get name(): string | undefined
119
+ get id(): string | undefined
120
+ get ids(): Array<string>
121
+ get idNameHints(): Array<string>
122
+ get filenameTemplate(): string | undefined
123
+ get cssFilenameTemplate(): string | undefined
124
+ get _files(): Array<string>
125
+ get _runtime(): Array<string>
126
+ get hash(): string | undefined
127
+ get contentHash(): Record<string, string>
128
+ get renderedHash(): string | undefined
129
+ get chunkReason(): string | undefined
130
+ get _auxiliaryFiles(): Array<string>
131
+ isOnlyInitial(): boolean
132
+ canBeInitial(): boolean
133
+ hasRuntime(): boolean
134
+ getAllAsyncChunks(): Chunk[]
135
+ getAllInitialChunks(): Chunk[]
136
+ getAllReferencedChunks(): Chunk[]
137
+ get _groupsIterable(): ChunkGroup[]
138
+ getEntryOptions(): EntryOptionsDTO | undefined
139
+ }
140
+
141
+ export declare class ChunkGraph {
142
+ hasChunkEntryDependentChunks(chunk: Chunk): boolean
143
+ getChunkModules(chunk: Chunk): Module[]
144
+ getChunkModulesIterable(chunk: Chunk): Iterable<Module>
145
+ getChunkEntryModulesIterable(chunk: Chunk): Iterable<Module>
146
+ getNumberOfEntryModules(chunk: Chunk): number
147
+ getChunkEntryDependentChunksIterable(chunk: Chunk): Chunk[]
148
+ getChunkModulesIterableBySourceType(chunk: Chunk, sourceType: string): Module[]
149
+ getModuleChunks(module: Module): Chunk[]
150
+ getModuleId(module: Module): string | number | null
151
+ _getModuleHash(module: Module, runtime: string | string[] | undefined): string | null
152
+ getBlockChunkGroup(jsBlock: AsyncDependenciesBlock): ChunkGroup | null
153
+ }
154
+
155
+ export declare class ChunkGroup {
156
+ get chunks(): Chunk[]
157
+ get index(): number | undefined
158
+ get name(): string | undefined
159
+ get origins(): Array<JsChunkGroupOrigin>
160
+ get childrenIterable(): ChunkGroup[]
161
+ isInitial(): boolean
162
+ getParents(): ChunkGroup[]
163
+ getRuntimeChunk(): Chunk
164
+ getEntrypointChunk(): Chunk
165
+ getFiles(): Array<string>
166
+ getModulePreOrderIndex(module: Module): number | null
167
+ getModulePostOrderIndex(module: Module): number | null
168
+ }
169
+
170
+ export declare class Chunks {
171
+ get size(): number
172
+ _values(): Chunk[]
173
+ _has(chunk: Chunk): boolean
174
+ }
175
+
176
+ export declare class CodeGenerationResult {
177
+ get sources(): Sources
178
+ }
179
+
180
+ export declare class CodeGenerationResults {
181
+ get(module: Module, runtime: string | string[] | undefined): CodeGenerationResult
182
+ }
183
+
184
+ export declare class ConcatenatedModule {
185
+ get rootModule(): Module
186
+ get modules(): Module[]
187
+ readableIdentifier(): string
188
+ _originalSource(): JsSource
189
+ nameForCondition(): string | undefined
190
+ get blocks(): AsyncDependenciesBlock[]
191
+ get dependencies(): Dependency[]
192
+ size(ty?: string | undefined | null): number
193
+ libIdent(options: JsLibIdentOptions): string | null
194
+ _emitFile(filename: string, source: JsSource, assetInfo?: AssetInfo | undefined | null): void
195
+ }
196
+
197
+ export declare class ContextModule {
198
+ readableIdentifier(): string
199
+ _originalSource(): JsSource
200
+ nameForCondition(): string | undefined
201
+ get blocks(): AsyncDependenciesBlock[]
202
+ get dependencies(): Dependency[]
203
+ size(ty?: string | undefined | null): number
204
+ libIdent(options: JsLibIdentOptions): string | null
205
+ _emitFile(filename: string, source: JsSource, assetInfo?: AssetInfo | undefined | null): void
206
+ }
207
+
208
+ export declare class Dependency {
209
+ get _parentModule(): Module | undefined
210
+ get type(): string
211
+ get category(): string
212
+ get request(): string | undefined
213
+ get critical(): boolean
214
+ set critical(val: boolean)
215
+ get ids(): Array<string> | undefined
216
+ }
217
+
218
+ export declare class Diagnostics {
219
+ get length(): number
220
+ values(): Array<RspackError>
221
+ get(index: number): RspackError | undefined
222
+ set(index: number, error: RspackError): void
223
+ spliceWithArray(index: number, deleteCount?: number | undefined | null, newItems?: Array<RspackError> | undefined | null): Array<RspackError>
224
+ }
225
+
226
+ export declare class EntryDataDto {
227
+ get dependencies(): Dependency[]
228
+ get includeDependencies(): Dependency[]
229
+ get options(): EntryOptionsDto
230
+ }
231
+ export type EntryDataDTO = EntryDataDto
232
+
233
+ export declare class EntryDependency {
234
+ constructor(request: string)
235
+ get type(): string
236
+ get category(): string
237
+ get request(): string | undefined
238
+ }
239
+
240
+ export declare class EntryOptionsDto {
241
+ get name(): string | undefined
242
+ set name(name: string | undefined)
243
+ get runtime(): false | string | undefined
244
+ set runtime(chunkLoading: boolean | string | undefined)
245
+ get chunkLoading(): string | undefined
246
+ set chunkLoading(chunkLoading: string | false | undefined)
247
+ get asyncChunks(): boolean | undefined
248
+ set asyncChunks(asyncChunks: boolean | undefined)
249
+ get baseUri(): string | undefined
250
+ set baseUri(baseUri: string | undefined)
251
+ get library(): JsLibraryOptions | undefined
252
+ set library(library: JsLibraryOptions | undefined)
253
+ get dependOn(): Array<string> | undefined
254
+ set dependOn(dependOn: Array<string> | undefined)
255
+ get layer(): string | undefined
256
+ set layer(layer: string | undefined)
257
+ }
258
+ export type EntryOptionsDTO = EntryOptionsDto
259
+
260
+ export declare class ExternalModule {
261
+ readableIdentifier(): string
262
+ _originalSource(): JsSource
263
+ nameForCondition(): string | undefined
264
+ get blocks(): AsyncDependenciesBlock[]
265
+ get dependencies(): Dependency[]
266
+ size(ty?: string | undefined | null): number
267
+ libIdent(options: JsLibIdentOptions): string | null
268
+ _emitFile(filename: string, source: JsSource, assetInfo?: AssetInfo | undefined | null): void
269
+ }
270
+
271
+ export declare class JsCompilation {
272
+ updateAsset(filename: string, newSourceOrFunction: JsSource | ((source: JsSource) => JsSource), assetInfoUpdateOrFunction?: AssetInfo | ((assetInfo: AssetInfo) => AssetInfo | undefined)): void
273
+ getAssets(): Readonly<JsAsset>[]
274
+ getAsset(name: string): JsAsset | null
275
+ getAssetSource(name: string): JsSource | null
276
+ get modules(): Array<Module>
277
+ get builtModules(): Array<Module>
278
+ getOptimizationBailout(): Array<JsStatsOptimizationBailout>
279
+ get chunks(): Chunks
280
+ getNamedChunkKeys(): Array<string>
281
+ getNamedChunk(name: string): Chunk
282
+ getNamedChunkGroupKeys(): Array<string>
283
+ getNamedChunkGroup(name: string): ChunkGroup
284
+ setAssetSource(name: string, source: JsSource): void
285
+ deleteAssetSource(name: string): void
286
+ getAssetFilenames(): Array<string>
287
+ hasAsset(name: string): boolean
288
+ emitAsset(filename: string, source: JsSource, assetInfo?: AssetInfo | undefined | null): void
289
+ deleteAsset(filename: string): void
290
+ renameAsset(filename: string, newName: string): void
291
+ get entrypoints(): ChunkGroup[]
292
+ get chunkGroups(): ChunkGroup[]
293
+ get hash(): string | null
294
+ dependencies(): JsDependencies
295
+ pushDiagnostic(diagnostic: JsRspackDiagnostic): void
296
+ pushNativeDiagnostic(diagnostic: ExternalObject<'Diagnostic'>): void
297
+ pushNativeDiagnostics(diagnostics: ExternalObject<'Diagnostic[]'>): void
298
+ get errors(): Diagnostics
299
+ get warnings(): Diagnostics
300
+ getErrors(): Array<RspackError>
301
+ getWarnings(): Array<RspackError>
302
+ getStats(): JsStats
303
+ getAssetPath(filename: string, data: JsPathData): string
304
+ getAssetPathWithInfo(filename: string, data: JsPathData): PathWithInfo
305
+ getPath(filename: string, data: JsPathData): string
306
+ getPathWithInfo(filename: string, data: JsPathData): PathWithInfo
307
+ addFileDependencies(deps: Array<string>): void
308
+ addContextDependencies(deps: Array<string>): void
309
+ addMissingDependencies(deps: Array<string>): void
310
+ addBuildDependencies(deps: Array<string>): void
311
+ /**
312
+ * This is a very unsafe function.
313
+ * Please don't use this at the moment.
314
+ * Using async and mutable reference to `Compilation` at the same time would likely to cause data races.
315
+ */
316
+ rebuildModule(module_identifiers: string[], callback: (...args: any[]) => any): void
317
+ importModule(request: string, layer: string | undefined, public_path: JsFilename | undefined, base_uri: string | undefined, original_module: string, original_module_context: string | undefined | null, callback: (...args: any[]) => any): void
318
+ get entries(): JsEntries
319
+ addRuntimeModule(chunk: Chunk, runtimeModule: JsAddingRuntimeModule): void
320
+ get moduleGraph(): JsModuleGraph
321
+ get chunkGraph(): ChunkGraph
322
+ addEntry(args: [string, EntryDependency, JsEntryOptions | undefined][], callback: (errMsg: Error | null, results: [string | null, Module][]) => void): void
323
+ addInclude(args: [string, EntryDependency, JsEntryOptions | undefined][], callback: (errMsg: Error | null, results: [string | null, Module][]) => void): void
324
+ get codeGenerationResults(): CodeGenerationResults
325
+ createStatsWarnings(warnings: Array<RspackError>, colored?: boolean | undefined | null): JsStatsError[]
326
+ }
327
+
328
+ export declare class JsCompiler {
329
+ constructor(compilerPath: string, options: RawOptions, builtinPlugins: Array<BuiltinPlugin>, registerJsTaps: RegisterJsTaps, outputFilesystem: ThreadsafeNodeFS, intermediateFilesystem: ThreadsafeNodeFS | undefined | null, inputFilesystem: ThreadsafeNodeFS | undefined | null, resolverFactoryReference: JsResolverFactory, unsafeFastDrop: boolean)
330
+ setNonSkippableRegisters(kinds: Array<RegisterJsTapKind>): void
331
+ /** Build with the given option passed to the constructor */
332
+ build(callback: (err: null | Error) => void): void
333
+ /** Rebuild with the given option passed to the constructor */
334
+ rebuild(changed_files: string[], removed_files: string[], callback: (err: null | Error) => void): void
335
+ close(): Promise<void>
336
+ getVirtualFileStore(): VirtualFileStore | null
337
+ }
338
+
339
+ export declare class JsContextModuleFactoryAfterResolveData {
340
+ get resource(): string
341
+ set resource(resource: string)
342
+ get context(): string
343
+ set context(context: string)
344
+ get request(): string
345
+ set request(request: string)
346
+ get regExp(): RegExp | undefined
347
+ set regExp(rawRegExp: RegExp | undefined)
348
+ get recursive(): boolean
349
+ set recursive(recursive: boolean)
350
+ get dependencies(): Dependency[]
351
+ }
352
+
353
+ export declare class JsContextModuleFactoryBeforeResolveData {
354
+ get context(): string
355
+ set context(context: string)
356
+ get request(): string
357
+ set request(request: string)
358
+ get regExp(): RegExp | undefined
359
+ set regExp(rawRegExp: RegExp | undefined)
360
+ get recursive(): boolean
361
+ set recursive(recursive: boolean)
362
+ }
363
+
364
+ export declare class JsDependencies {
365
+ get fileDependencies(): Array<string>
366
+ get addedFileDependencies(): Array<string>
367
+ get removedFileDependencies(): Array<string>
368
+ get contextDependencies(): Array<string>
369
+ get addedContextDependencies(): Array<string>
370
+ get removedContextDependencies(): Array<string>
371
+ get missingDependencies(): Array<string>
372
+ get addedMissingDependencies(): Array<string>
373
+ get removedMissingDependencies(): Array<string>
374
+ get buildDependencies(): Array<string>
375
+ get addedBuildDependencies(): Array<string>
376
+ get removedBuildDependencies(): Array<string>
377
+ }
378
+
379
+ export declare class JsEntries {
380
+ clear(): void
381
+ get size(): number
382
+ has(key: string): boolean
383
+ set(key: string, value: JsEntryData | EntryDataDto): void
384
+ delete(key: string): boolean
385
+ get(key: string): EntryDataDto | undefined
386
+ keys(): Array<string>
387
+ values(): Array<EntryDataDto>
388
+ }
389
+
390
+ export declare class JsExportsInfo {
391
+ isUsed(runtime: string | string[] | undefined): boolean
392
+ isModuleUsed(runtime: string | string[] | undefined): boolean
393
+ setUsedInUnknownWay(runtime: string | string[] | undefined): boolean
394
+ getUsed(name: string | string[], runtime: string | string[] | undefined): 0 | 1 | 2 | 3 | 4
395
+ }
396
+
397
+ export declare class JsModuleGraph {
398
+ getModule(dependency: Dependency): Module | null
399
+ getResolvedModule(dependency: Dependency): Module | null
400
+ getUsedExports(module: Module, runtime: string | string[]): boolean | Array<string> | null
401
+ getIssuer(module: Module): Module | null
402
+ getExportsInfo(module: Module): JsExportsInfo
403
+ getConnection(dependency: Dependency): ModuleGraphConnection | null
404
+ getOutgoingConnections(module: Module): ModuleGraphConnection[]
405
+ getOutgoingConnectionsInOrder(module: Module): ModuleGraphConnection[]
406
+ getIncomingConnections(module: Module): ModuleGraphConnection[]
407
+ getParentModule(dependency: Dependency): Module | null
408
+ getParentBlockIndex(dependency: Dependency): number
409
+ isAsync(module: Module): boolean
410
+ }
411
+
412
+ export declare class JsResolver {
413
+ resolveSync(path: string, request: string): string | undefined
414
+ resolve(path: string, request: string, callback: (err: null | Error, req?: string) => void): void
415
+ }
416
+
417
+ export declare class JsResolverFactory {
418
+ constructor(pnp: boolean, jsResolveOptions: RawResolveOptions, jsLoaderResolveOptions: RawResolveOptions)
419
+ get(type: string, options?: RawResolveOptionsWithDependencyType): JsResolver
420
+ }
421
+
422
+ export declare class JsStats {
423
+ toJson(jsOptions: JsStatsOptions): JsStatsCompilation
424
+ getLogging(acceptedTypes: number): Array<JsStatsLogging>
425
+ }
426
+
427
+ export declare class KnownBuildInfo {
428
+
429
+ }
430
+
431
+ export declare class Module {
432
+ readableIdentifier(): string
433
+ _originalSource(): JsSource
434
+ nameForCondition(): string | undefined
435
+ get blocks(): AsyncDependenciesBlock[]
436
+ get dependencies(): Dependency[]
437
+ size(ty?: string | undefined | null): number
438
+ libIdent(options: JsLibIdentOptions): string | null
439
+ _emitFile(filename: string, source: JsSource, assetInfo?: AssetInfo | undefined | null): void
440
+ }
441
+
442
+ export declare class ModuleGraphConnection {
443
+ get dependency(): Dependency
444
+ get module(): Module | null
445
+ get resolvedModule(): Module | null
446
+ get originModule(): Module | null
447
+ }
448
+
449
+ export declare class NativeWatcher {
450
+ constructor(options: NativeWatcherOptions)
451
+ watch(files: [Array<string>, Array<string>], directories: [Array<string>, Array<string>], missing: [Array<string>, Array<string>], startTime: bigint, callback: (err: Error | null, result: NativeWatchResult) => void, callbackUndelayed: (path: string) => void): void
452
+ triggerEvent(kind: 'change' | 'remove' | 'create', path: string): void
453
+ /**
454
+ * # Safety
455
+ *
456
+ * This function is unsafe because it uses `&mut self` to call the watcher asynchronously.
457
+ * It's important to ensure that the watcher is not used in any other places before this function is finished.
458
+ * You must ensure that the watcher not call watch, close or pause in the same time, otherwise it may lead to undefined behavior.
459
+ */
460
+ close(): Promise<void>
461
+ pause(): void
462
+ }
463
+
464
+ export declare class NativeWatchResult {
465
+ changedFiles: Array<string>
466
+ removedFiles: Array<string>
467
+ }
468
+
469
+
470
+ export declare class RawExternalItemFnCtx {
471
+ data(): RawExternalItemFnCtxData
472
+ getResolve(options?: RawResolveOptionsWithDependencyType | undefined | null): (context: string, path: string, callback: (error?: Error, text?: string) => void) => void
473
+ }
474
+
475
+ export declare class ReadonlyResourceData {
476
+ get descriptionFileData(): any
477
+ get descriptionFilePath(): string
478
+ }
479
+
480
+ export declare class ResolverFactory {
481
+ constructor(options?: NapiResolveOptions | undefined | null)
482
+ static default(): ResolverFactory
483
+ /** Clone the resolver using the same underlying cache. */
484
+ cloneWithOptions(options: NapiResolveOptions): ResolverFactory
485
+ /** Clear the underlying cache. */
486
+ clearCache(): void
487
+ /** Synchronously resolve `specifier` at an absolute path to a `directory`. */
488
+ sync(directory: string, request: string): ResolveResult
489
+ /** Asynchronously resolve `specifier` at an absolute path to a `directory`. */
490
+ async(directory: string, request: string): Promise<ResolveResult>
491
+ }
492
+
493
+ export declare class Sources {
494
+ _get(sourceType: string): JsSource | null
495
+ }
496
+
497
+ export declare class VirtualFileStore {
498
+ writeVirtualFileSync(path: string, content: string): void
499
+ batchWriteVirtualFilesSync(files: Array<JsVirtualFile>): void
500
+ }
501
+ export type JsVirtualFileStore = VirtualFileStore
502
+
503
+ export interface AssetInfoRelated {
504
+ sourceMap?: string | null
505
+ }
506
+
507
+ export declare function async(path: string, request: string): Promise<ResolveResult>
508
+
509
+ export interface BuiltinPlugin {
510
+ name: BuiltinPluginName | CustomPluginName
511
+ options: unknown
512
+ canInherentFromParent?: boolean
513
+ }
514
+
515
+ export declare enum BuiltinPluginName {
516
+ DefinePlugin = 'DefinePlugin',
517
+ ProvidePlugin = 'ProvidePlugin',
518
+ BannerPlugin = 'BannerPlugin',
519
+ IgnorePlugin = 'IgnorePlugin',
520
+ ProgressPlugin = 'ProgressPlugin',
521
+ EntryPlugin = 'EntryPlugin',
522
+ DynamicEntryPlugin = 'DynamicEntryPlugin',
523
+ ExternalsPlugin = 'ExternalsPlugin',
524
+ NodeTargetPlugin = 'NodeTargetPlugin',
525
+ ElectronTargetPlugin = 'ElectronTargetPlugin',
526
+ EnableChunkLoadingPlugin = 'EnableChunkLoadingPlugin',
527
+ EnableLibraryPlugin = 'EnableLibraryPlugin',
528
+ EnableWasmLoadingPlugin = 'EnableWasmLoadingPlugin',
529
+ FetchCompileAsyncWasmPlugin = 'FetchCompileAsyncWasmPlugin',
530
+ ChunkPrefetchPreloadPlugin = 'ChunkPrefetchPreloadPlugin',
531
+ CommonJsChunkFormatPlugin = 'CommonJsChunkFormatPlugin',
532
+ ArrayPushCallbackChunkFormatPlugin = 'ArrayPushCallbackChunkFormatPlugin',
533
+ ModuleChunkFormatPlugin = 'ModuleChunkFormatPlugin',
534
+ EsmLibraryPlugin = 'EsmLibraryPlugin',
535
+ HotModuleReplacementPlugin = 'HotModuleReplacementPlugin',
536
+ LimitChunkCountPlugin = 'LimitChunkCountPlugin',
537
+ WorkerPlugin = 'WorkerPlugin',
538
+ WebWorkerTemplatePlugin = 'WebWorkerTemplatePlugin',
539
+ MergeDuplicateChunksPlugin = 'MergeDuplicateChunksPlugin',
540
+ SplitChunksPlugin = 'SplitChunksPlugin',
541
+ RemoveDuplicateModulesPlugin = 'RemoveDuplicateModulesPlugin',
542
+ ShareRuntimePlugin = 'ShareRuntimePlugin',
543
+ ContainerPlugin = 'ContainerPlugin',
544
+ ContainerReferencePlugin = 'ContainerReferencePlugin',
545
+ ProvideSharedPlugin = 'ProvideSharedPlugin',
546
+ ConsumeSharedPlugin = 'ConsumeSharedPlugin',
547
+ ModuleFederationRuntimePlugin = 'ModuleFederationRuntimePlugin',
548
+ ModuleFederationManifestPlugin = 'ModuleFederationManifestPlugin',
549
+ NamedModuleIdsPlugin = 'NamedModuleIdsPlugin',
550
+ NaturalModuleIdsPlugin = 'NaturalModuleIdsPlugin',
551
+ DeterministicModuleIdsPlugin = 'DeterministicModuleIdsPlugin',
552
+ NaturalChunkIdsPlugin = 'NaturalChunkIdsPlugin',
553
+ NamedChunkIdsPlugin = 'NamedChunkIdsPlugin',
554
+ DeterministicChunkIdsPlugin = 'DeterministicChunkIdsPlugin',
555
+ OccurrenceChunkIdsPlugin = 'OccurrenceChunkIdsPlugin',
556
+ RealContentHashPlugin = 'RealContentHashPlugin',
557
+ RemoveEmptyChunksPlugin = 'RemoveEmptyChunksPlugin',
558
+ EnsureChunkConditionsPlugin = 'EnsureChunkConditionsPlugin',
559
+ WarnCaseSensitiveModulesPlugin = 'WarnCaseSensitiveModulesPlugin',
560
+ DataUriPlugin = 'DataUriPlugin',
561
+ FileUriPlugin = 'FileUriPlugin',
562
+ RuntimePlugin = 'RuntimePlugin',
563
+ JsonModulesPlugin = 'JsonModulesPlugin',
564
+ InferAsyncModulesPlugin = 'InferAsyncModulesPlugin',
565
+ JavascriptModulesPlugin = 'JavascriptModulesPlugin',
566
+ AsyncWebAssemblyModulesPlugin = 'AsyncWebAssemblyModulesPlugin',
567
+ AssetModulesPlugin = 'AssetModulesPlugin',
568
+ SourceMapDevToolPlugin = 'SourceMapDevToolPlugin',
569
+ EvalSourceMapDevToolPlugin = 'EvalSourceMapDevToolPlugin',
570
+ EvalDevToolModulePlugin = 'EvalDevToolModulePlugin',
571
+ SideEffectsFlagPlugin = 'SideEffectsFlagPlugin',
572
+ FlagDependencyExportsPlugin = 'FlagDependencyExportsPlugin',
573
+ FlagDependencyUsagePlugin = 'FlagDependencyUsagePlugin',
574
+ InlineExportsPlugin = 'InlineExportsPlugin',
575
+ MangleExportsPlugin = 'MangleExportsPlugin',
576
+ ModuleConcatenationPlugin = 'ModuleConcatenationPlugin',
577
+ CssModulesPlugin = 'CssModulesPlugin',
578
+ APIPlugin = 'APIPlugin',
579
+ RuntimeChunkPlugin = 'RuntimeChunkPlugin',
580
+ SizeLimitsPlugin = 'SizeLimitsPlugin',
581
+ NoEmitOnErrorsPlugin = 'NoEmitOnErrorsPlugin',
582
+ NormalModuleReplacementPlugin = 'NormalModuleReplacementPlugin',
583
+ ContextReplacementPlugin = 'ContextReplacementPlugin',
584
+ DllEntryPlugin = 'DllEntryPlugin',
585
+ DllReferenceAgencyPlugin = 'DllReferenceAgencyPlugin',
586
+ LibManifestPlugin = 'LibManifestPlugin',
587
+ FlagAllModulesAsUsedPlugin = 'FlagAllModulesAsUsedPlugin',
588
+ HttpExternalsRspackPlugin = 'HttpExternalsRspackPlugin',
589
+ CopyRspackPlugin = 'CopyRspackPlugin',
590
+ HtmlRspackPlugin = 'HtmlRspackPlugin',
591
+ SwcJsMinimizerRspackPlugin = 'SwcJsMinimizerRspackPlugin',
592
+ LightningCssMinimizerRspackPlugin = 'LightningCssMinimizerRspackPlugin',
593
+ BundlerInfoRspackPlugin = 'BundlerInfoRspackPlugin',
594
+ CssExtractRspackPlugin = 'CssExtractRspackPlugin',
595
+ SubresourceIntegrityPlugin = 'SubresourceIntegrityPlugin',
596
+ RsdoctorPlugin = 'RsdoctorPlugin',
597
+ RstestPlugin = 'RstestPlugin',
598
+ RslibPlugin = 'RslibPlugin',
599
+ CircularDependencyRspackPlugin = 'CircularDependencyRspackPlugin',
600
+ URLPlugin = 'URLPlugin',
601
+ JsLoaderRspackPlugin = 'JsLoaderRspackPlugin',
602
+ LazyCompilationPlugin = 'LazyCompilationPlugin',
603
+ ModuleInfoHeaderPlugin = 'ModuleInfoHeaderPlugin',
604
+ HttpUriPlugin = 'HttpUriPlugin',
605
+ CssChunkingPlugin = 'CssChunkingPlugin'
606
+ }
607
+
608
+ export declare function cleanupGlobalTrace(): void
609
+
610
+ export interface ContextInfo {
611
+ issuer: string
612
+ issuerLayer?: string
613
+ }
614
+
615
+ export declare enum EnforceExtension {
616
+ Auto = 0,
617
+ Enabled = 1,
618
+ Disabled = 2
619
+ }
620
+
621
+ /**
622
+ * Expected version of @rspack/core to the current binding version
623
+ * @internal
624
+ */
625
+ export const EXPECTED_RSPACK_CORE_VERSION: string
626
+
627
+ export declare function formatDiagnostic(diagnostic: JsDiagnostic): ExternalObject<'Diagnostic'>
628
+
629
+ export interface JsAddingRuntimeModule {
630
+ name: string
631
+ generator: () => String
632
+ dependentHash: boolean
633
+ fullHash: boolean
634
+ isolate: boolean
635
+ stage: number
636
+ }
637
+
638
+ export interface JsAdditionalTreeRuntimeRequirementsArg {
639
+ chunk: Chunk
640
+ runtimeRequirements: JsRuntimeGlobals
641
+ }
642
+
643
+ export interface JsAdditionalTreeRuntimeRequirementsResult {
644
+ runtimeRequirements: JsRuntimeGlobals
645
+ }
646
+
647
+ export interface JsAfterEmitData {
648
+ outputName: string
649
+ compilationId: number
650
+ uid?: number
651
+ }
652
+
653
+ export interface JsAfterTemplateExecutionData {
654
+ html: string
655
+ headTags: Array<JsHtmlPluginTag>
656
+ bodyTags: Array<JsHtmlPluginTag>
657
+ outputName: string
658
+ compilationId: number
659
+ uid?: number
660
+ }
661
+
662
+ export interface JsAlterAssetTagGroupsData {
663
+ headTags: Array<JsHtmlPluginTag>
664
+ bodyTags: Array<JsHtmlPluginTag>
665
+ publicPath: string
666
+ outputName: string
667
+ compilationId: number
668
+ uid?: number
669
+ }
670
+
671
+ export interface JsAlterAssetTagsData {
672
+ assetTags: JsHtmlPluginAssetTags
673
+ outputName: string
674
+ publicPath: string
675
+ compilationId: number
676
+ uid?: number
677
+ }
678
+
679
+ export interface JsAsset {
680
+ name: string
681
+ info: AssetInfo
682
+ }
683
+
684
+ export interface JsAssetEmittedArgs {
685
+ filename: string
686
+ outputPath: string
687
+ targetPath: string
688
+ }
689
+
690
+ export interface JsBannerContentFnCtx {
691
+ hash: string
692
+ chunk: Chunk
693
+ filename: string
694
+ }
695
+
696
+ export interface JsBeforeAssetTagGenerationData {
697
+ assets: JsHtmlPluginAssets
698
+ outputName: string
699
+ compilationId: number
700
+ uid?: number
701
+ }
702
+
703
+ export interface JsBeforeEmitData {
704
+ html: string
705
+ outputName: string
706
+ compilationId: number
707
+ uid?: number
708
+ }
709
+
710
+ export interface JsBuildMeta {
711
+ strictEsmModule?: boolean
712
+ hasTopLevelAwait?: boolean
713
+ esm?: boolean
714
+ exportsType?: undefined | 'unset' | 'default' | 'namespace' | 'flagged' | 'dynamic'
715
+ defaultObject?: undefined | 'false' | 'redirect' | JsBuildMetaDefaultObjectRedirectWarn
716
+ sideEffectFree?: boolean
717
+ exportsFinalName?: Array<[string, string]> | undefined
718
+ }
719
+
720
+ export interface JsBuildMetaDefaultObjectRedirectWarn {
721
+ redirectWarn: JsDefaultObjectRedirectWarnObject
722
+ }
723
+
724
+ export interface JsBuildTimeExecutionOption {
725
+ publicPath?: string
726
+ baseUri?: string
727
+ }
728
+
729
+ export interface JsCacheGroupTestCtx {
730
+ module: Module
731
+ }
732
+
733
+ export interface JsChunkAssetArgs {
734
+ chunk: Chunk
735
+ filename: string
736
+ }
737
+
738
+ export interface JsChunkGroupOrigin {
739
+ module?: Module | undefined
740
+ request?: string
741
+ loc?: string | RealDependencyLocation
742
+ }
743
+
744
+ export interface JsChunkOptionNameCtx {
745
+ module: Module
746
+ chunks: Chunk[]
747
+ cacheGroupKey: string
748
+ }
749
+
750
+ /**
751
+ * File clean options
752
+ *
753
+ * This matches with:
754
+ * - keep:
755
+ * - If a string, keep the files under this path
756
+ */
757
+ export interface JsCleanOptions {
758
+ keep?: string | RegExp | ((path: string) => boolean)
759
+ }
760
+
761
+ export interface JsCodegenerationResult {
762
+ sources: Record<string, string>
763
+ }
764
+
765
+ export interface JsCodegenerationResults {
766
+ map: Record<string, Record<string, JsCodegenerationResult>>
767
+ }
768
+
769
+ export interface JsCreateData {
770
+ request: string
771
+ userRequest: string
772
+ resource: string
773
+ }
774
+
775
+ export interface JsCreateScriptData {
776
+ code: string
777
+ chunk: Chunk
778
+ }
779
+
780
+ export interface JsDefaultObjectRedirectWarnObject {
781
+ ignore: boolean
782
+ }
783
+
784
+ export interface JsDiagnostic {
785
+ message: string
786
+ help?: string
787
+ sourceCode?: string
788
+ location?: JsDiagnosticLocation
789
+ file?: string
790
+ severity: "error" | "warning"
791
+ moduleIdentifier?: string
792
+ }
793
+
794
+ export interface JsDiagnosticLocation {
795
+ text?: string
796
+ /** 1-based */
797
+ line: number
798
+ /** 0-based in bytes */
799
+ column: number
800
+ /** Length in bytes */
801
+ length: number
802
+ }
803
+
804
+ export interface JsEntryData {
805
+ dependencies: Array<Dependency>
806
+ includeDependencies: Array<Dependency>
807
+ options: JsEntryOptions
808
+ }
809
+
810
+ export interface JsEntryOptions {
811
+ name?: string
812
+ runtime?: false | string
813
+ chunkLoading?: false | string
814
+ asyncChunks?: boolean
815
+ publicPath?: "auto" | JsFilename
816
+ baseUri?: string
817
+ filename?: JsFilename
818
+ library?: JsLibraryOptions
819
+ dependOn?: Array<string>
820
+ layer?: string
821
+ }
822
+
823
+ export interface JsEntryPluginOptions {
824
+ context: string
825
+ entry: string
826
+ options: JsEntryOptions
827
+ }
828
+
829
+ export interface JsExecuteModuleArg {
830
+ entry: string
831
+ runtimeModules: Array<string>
832
+ codegenResults: JsCodegenerationResults
833
+ id: number
834
+ }
835
+
836
+ export interface JsExecuteModuleResult {
837
+ fileDependencies: Array<string>
838
+ contextDependencies: Array<string>
839
+ buildDependencies: Array<string>
840
+ missingDependencies: Array<string>
841
+ cacheable: boolean
842
+ id: number
843
+ error?: string
844
+ }
845
+
846
+ export interface JsFactoryMeta {
847
+ sideEffectFree?: boolean
848
+ }
849
+
850
+ export interface JsHtmlPluginAssets {
851
+ publicPath: string
852
+ js: Array<string>
853
+ css: Array<string>
854
+ favicon?: string
855
+ jsIntegrity?: Array<string | undefined | null>
856
+ cssIntegrity?: Array<string | undefined | null>
857
+ }
858
+
859
+ export interface JsHtmlPluginAssetTags {
860
+ scripts: Array<JsHtmlPluginTag>
861
+ styles: Array<JsHtmlPluginTag>
862
+ meta: Array<JsHtmlPluginTag>
863
+ }
864
+
865
+ export interface JsHtmlPluginTag {
866
+ tagName: string
867
+ attributes: Record<string, string | boolean | undefined | null>
868
+ voidTag: boolean
869
+ innerHTML?: string
870
+ asset?: string
871
+ }
872
+
873
+ export interface JsHttpResponseRaw {
874
+ status: number
875
+ headers: Record<string, string>
876
+ body: Buffer
877
+ }
878
+
879
+ export interface JsLibIdentOptions {
880
+ context: string
881
+ }
882
+
883
+ export interface JsLibraryAuxiliaryComment {
884
+ root?: string
885
+ commonjs?: string
886
+ commonjs2?: string
887
+ amd?: string
888
+ }
889
+
890
+ export interface JsLibraryCustomUmdObject {
891
+ amd?: string
892
+ commonjs?: string
893
+ root?: Array<string> | string
894
+ }
895
+
896
+ export interface JsLibraryName {
897
+ type: "string" | "array" | "umdObject"
898
+ stringPayload?: string
899
+ arrayPayload?: Array<string>
900
+ umdObjectPayload?: JsLibraryCustomUmdObject
901
+ }
902
+
903
+ export interface JsLibraryOptions {
904
+ name?: string | Array<string> | JsLibraryCustomUmdObject
905
+ export?: Array<string> | string
906
+ type: string
907
+ umdNamedDefine?: boolean
908
+ auxiliaryComment?: string | JsLibraryAuxiliaryComment
909
+ amdContainer?: string
910
+ }
911
+
912
+ export interface JsLinkPrefetchData {
913
+ code: string
914
+ chunk: Chunk
915
+ }
916
+
917
+ export interface JsLinkPreloadData {
918
+ code: string
919
+ chunk: Chunk
920
+ }
921
+
922
+ export interface JsLoaderContext {
923
+ resource: string
924
+ _module: Module
925
+ hot: Readonly<boolean>
926
+ /** Content maybe empty in pitching stage */
927
+ content: null | Buffer
928
+ additionalData?: any
929
+ __internal__parseMeta: Record<string, string>
930
+ sourceMap?: Buffer
931
+ cacheable: boolean
932
+ fileDependencies: Array<string>
933
+ contextDependencies: Array<string>
934
+ missingDependencies: Array<string>
935
+ buildDependencies: Array<string>
936
+ loaderItems: Array<JsLoaderItem>
937
+ loaderIndex: number
938
+ loaderState: Readonly<JsLoaderState>
939
+ __internal__error?: RspackError
940
+ /**
941
+ * UTF-8 hint for `content`
942
+ * - Some(true): `content` is a `UTF-8` encoded sequence
943
+ */
944
+ __internal__utf8Hint?: boolean
945
+ }
946
+
947
+ export interface JsLoaderItem {
948
+ loader: string
949
+ type: string
950
+ data: any
951
+ normalExecuted: boolean
952
+ pitchExecuted: boolean
953
+ noPitch: boolean
954
+ }
955
+
956
+ export declare enum JsLoaderState {
957
+ Pitching = 'Pitching',
958
+ Normal = 'Normal'
959
+ }
960
+
961
+ export interface JsModuleDescriptor {
962
+ identifier: string
963
+ name: string
964
+ id?: string | number | null
965
+ }
966
+
967
+ export interface JsNormalModuleFactoryCreateModuleArgs {
968
+ dependencyType: string
969
+ rawRequest: string
970
+ resourceResolveData: JsResourceData
971
+ context: string
972
+ matchResource?: string
973
+ }
974
+
975
+ export interface JsOriginRecord {
976
+ moduleDescriptor?: JsModuleDescriptor
977
+ loc: string
978
+ request: string
979
+ }
980
+
981
+ export interface JsPathData {
982
+ filename?: string
983
+ hash?: string
984
+ contentHash?: string
985
+ runtime?: string
986
+ url?: string
987
+ id?: string
988
+ chunk?: JsPathDataChunkLike
989
+ }
990
+
991
+ export interface JsPathDataChunkLike {
992
+ name?: string
993
+ hash?: string
994
+ id?: string
995
+ }
996
+
997
+ export interface JsResolveData {
998
+ request: string
999
+ context: string
1000
+ contextInfo: ContextInfo
1001
+ fileDependencies: Array<string>
1002
+ contextDependencies: Array<string>
1003
+ missingDependencies: Array<string>
1004
+ createData?: JsCreateData
1005
+ }
1006
+
1007
+ export interface JsResolveForSchemeArgs {
1008
+ resourceData: JsResourceData
1009
+ scheme: string
1010
+ }
1011
+
1012
+ export interface JsResourceData {
1013
+ /** Resource with absolute path, query and fragment */
1014
+ resource: string
1015
+ /** Absolute resource path only */
1016
+ path?: string
1017
+ /** Resource query with `?` prefix */
1018
+ query?: string
1019
+ /** Resource fragment with `#` prefix */
1020
+ fragment?: string
1021
+ descriptionFileData?: any
1022
+ descriptionFilePath?: string
1023
+ }
1024
+
1025
+ export interface JsRsdoctorAsset {
1026
+ ukey: number
1027
+ path: string
1028
+ chunks: Array<number>
1029
+ size: number
1030
+ }
1031
+
1032
+ export interface JsRsdoctorAssetPatch {
1033
+ assets: Array<JsRsdoctorAsset>
1034
+ chunkAssets: Array<JsRsdoctorChunkAssets>
1035
+ entrypointAssets: Array<JsRsdoctorEntrypointAssets>
1036
+ }
1037
+
1038
+ export interface JsRsdoctorChunk {
1039
+ ukey: number
1040
+ name: string
1041
+ initial: boolean
1042
+ entry: boolean
1043
+ dependencies: Array<number>
1044
+ imported: Array<number>
1045
+ }
1046
+
1047
+ export interface JsRsdoctorChunkAssets {
1048
+ chunk: number
1049
+ assets: Array<number>
1050
+ }
1051
+
1052
+ export interface JsRsdoctorChunkGraph {
1053
+ chunks: Array<JsRsdoctorChunk>
1054
+ entrypoints: Array<JsRsdoctorEntrypoint>
1055
+ }
1056
+
1057
+ export interface JsRsdoctorChunkModules {
1058
+ chunk: number
1059
+ modules: Array<number>
1060
+ }
1061
+
1062
+ export interface JsRsdoctorDependency {
1063
+ ukey: number
1064
+ kind: string
1065
+ request: string
1066
+ module: number
1067
+ dependency: number
1068
+ }
1069
+
1070
+ export interface JsRsdoctorEntrypoint {
1071
+ ukey: number
1072
+ name: string
1073
+ chunks: Array<number>
1074
+ }
1075
+
1076
+ export interface JsRsdoctorEntrypointAssets {
1077
+ entrypoint: number
1078
+ assets: Array<number>
1079
+ }
1080
+
1081
+ export interface JsRsdoctorExportInfo {
1082
+ ukey: number
1083
+ name: string
1084
+ from?: number
1085
+ variable?: number
1086
+ identifier?: JsRsdoctorStatement
1087
+ sideEffects: Array<number>
1088
+ }
1089
+
1090
+ export interface JsRsdoctorModule {
1091
+ ukey: number
1092
+ identifier: string
1093
+ path: string
1094
+ isEntry: boolean
1095
+ kind: 'normal' | 'concatenated'
1096
+ layer?: string
1097
+ dependencies: Array<number>
1098
+ imported: Array<number>
1099
+ modules: Array<number>
1100
+ belongModules: Array<number>
1101
+ chunks: Array<number>
1102
+ issuerPath: Array<number>
1103
+ bailoutReason: Array<string>
1104
+ }
1105
+
1106
+ export interface JsRsdoctorModuleGraph {
1107
+ modules: Array<JsRsdoctorModule>
1108
+ dependencies: Array<JsRsdoctorDependency>
1109
+ chunkModules: Array<JsRsdoctorChunkModules>
1110
+ }
1111
+
1112
+ export interface JsRsdoctorModuleGraphModule {
1113
+ ukey: number
1114
+ module: number
1115
+ exports: Array<number>
1116
+ sideEffects: Array<number>
1117
+ variables: Array<number>
1118
+ dynamic: boolean
1119
+ }
1120
+
1121
+ export interface JsRsdoctorModuleId {
1122
+ module: number
1123
+ renderId: string
1124
+ }
1125
+
1126
+ export interface JsRsdoctorModuleIdsPatch {
1127
+ moduleIds: Array<JsRsdoctorModuleId>
1128
+ }
1129
+
1130
+ export interface JsRsdoctorModuleOriginalSource {
1131
+ module: number
1132
+ source: string
1133
+ size: number
1134
+ }
1135
+
1136
+ export interface JsRsdoctorModuleSourcesPatch {
1137
+ moduleOriginalSources: Array<JsRsdoctorModuleOriginalSource>
1138
+ }
1139
+
1140
+ export interface JsRsdoctorSideEffect {
1141
+ ukey: number
1142
+ name: string
1143
+ originName?: string
1144
+ module: number
1145
+ identifier: JsRsdoctorStatement
1146
+ isNameSpace: boolean
1147
+ fromDependency?: number
1148
+ exports: Array<number>
1149
+ variable?: number
1150
+ }
1151
+
1152
+ export interface JsRsdoctorSourceMapFeatures {
1153
+ cheap?: boolean
1154
+ module?: boolean
1155
+ }
1156
+
1157
+ export interface JsRsdoctorSourcePosition {
1158
+ line?: number
1159
+ column?: number
1160
+ index?: number
1161
+ }
1162
+
1163
+ export interface JsRsdoctorSourceRange {
1164
+ start: JsRsdoctorSourcePosition
1165
+ end?: JsRsdoctorSourcePosition
1166
+ }
1167
+
1168
+ export interface JsRsdoctorStatement {
1169
+ module: number
1170
+ sourcePosition?: JsRsdoctorSourceRange
1171
+ transformedPosition: JsRsdoctorSourceRange
1172
+ }
1173
+
1174
+ export interface JsRsdoctorVariable {
1175
+ ukey: number
1176
+ name: string
1177
+ module: number
1178
+ usedInfo: string
1179
+ identififer: JsRsdoctorStatement
1180
+ exported?: number
1181
+ }
1182
+
1183
+ export interface JsRspackDiagnostic {
1184
+ severity: JsRspackSeverity
1185
+ error: RspackError
1186
+ }
1187
+
1188
+ export declare enum JsRspackSeverity {
1189
+ Error = 'Error',
1190
+ Warn = 'Warn'
1191
+ }
1192
+
1193
+ export interface JsRuntimeGlobals {
1194
+ value: Array<string>
1195
+ }
1196
+
1197
+ export interface JsRuntimeModule {
1198
+ source?: JsSource
1199
+ moduleIdentifier: string
1200
+ constructorName: string
1201
+ name: string
1202
+ }
1203
+
1204
+ export interface JsRuntimeModuleArg {
1205
+ module: JsRuntimeModule
1206
+ chunk: Chunk
1207
+ }
1208
+
1209
+ export interface JsRuntimeRequirementInTreeArg {
1210
+ chunk: Chunk
1211
+ allRuntimeRequirements: JsRuntimeGlobals
1212
+ runtimeRequirements: JsRuntimeGlobals
1213
+ }
1214
+
1215
+ export interface JsRuntimeRequirementInTreeResult {
1216
+ allRuntimeRequirements: JsRuntimeGlobals
1217
+ }
1218
+
1219
+ /**
1220
+ * Zero copy `JsSourceFromJs` slice shared between Rust and Node.js if buffer is used.
1221
+ *
1222
+ * It can only be used in non-async context and the lifetime is bound to the fn closure.
1223
+ *
1224
+ * If you want to use Node.js Buffer in async context or want to extend the lifetime, use `JsSourceToJs` instead.
1225
+ */
1226
+ export interface JsSourceFromJs {
1227
+ source: string | Buffer
1228
+ map?: string
1229
+ }
1230
+
1231
+ export interface JsSourceToJs {
1232
+ source: string | Buffer
1233
+ map?: string
1234
+ }
1235
+
1236
+ export interface JsStatsAsset {
1237
+ type: string
1238
+ name: string
1239
+ info: JsStatsAssetInfo
1240
+ size: number
1241
+ emitted: boolean
1242
+ chunkNames: Array<string>
1243
+ chunkIdHints: Array<string>
1244
+ chunks: Array<string | undefined | null>
1245
+ auxiliaryChunkNames: Array<string>
1246
+ auxiliaryChunkIdHints: Array<string>
1247
+ auxiliaryChunks: Array<string | undefined | null>
1248
+ }
1249
+
1250
+ export interface JsStatsAssetInfo {
1251
+ minimized?: boolean
1252
+ development?: boolean
1253
+ hotModuleReplacement?: boolean
1254
+ sourceFilename?: string
1255
+ copied?: boolean
1256
+ immutable?: boolean
1257
+ javascriptModule?: boolean
1258
+ chunkhash: Array<string>
1259
+ contenthash: Array<string>
1260
+ fullhash: Array<string>
1261
+ related: Array<JsStatsAssetInfoRelated>
1262
+ isOverSizeLimit?: boolean
1263
+ }
1264
+
1265
+ export interface JsStatsAssetInfoRelated {
1266
+ name: string
1267
+ value: Array<string>
1268
+ }
1269
+
1270
+ export interface JsStatsAssetsByChunkName {
1271
+ name: string
1272
+ files: Array<string>
1273
+ }
1274
+
1275
+ export interface JsStatsChildGroupChildAssets {
1276
+ preload?: Array<string>
1277
+ prefetch?: Array<string>
1278
+ }
1279
+
1280
+ export interface JsStatsChunk {
1281
+ type: string
1282
+ files: Array<string>
1283
+ auxiliaryFiles: Array<string>
1284
+ id?: string
1285
+ idHints: Array<string>
1286
+ hash?: string
1287
+ entry: boolean
1288
+ initial: boolean
1289
+ names: Array<string>
1290
+ size: number
1291
+ parents?: Array<string>
1292
+ children?: Array<string>
1293
+ siblings?: Array<string>
1294
+ childrenByOrder: Record<string, Array<string>>
1295
+ runtime: Array<string>
1296
+ reason?: string
1297
+ rendered: boolean
1298
+ sizes: Array<JsStatsSize>
1299
+ origins: Array<JsOriginRecord>
1300
+ modules?: Array<JsStatsModule>
1301
+ }
1302
+
1303
+ export interface JsStatsChunkGroup {
1304
+ name: string
1305
+ chunks: Array<string>
1306
+ assets: Array<JsStatsChunkGroupAsset>
1307
+ assetsSize: number
1308
+ auxiliaryAssets?: Array<JsStatsChunkGroupAsset>
1309
+ auxiliaryAssetsSize?: number
1310
+ isOverSizeLimit?: boolean
1311
+ children?: JsStatsChunkGroupChildren
1312
+ childAssets?: JsStatsChildGroupChildAssets
1313
+ }
1314
+
1315
+ export interface JsStatsChunkGroupAsset {
1316
+ name: string
1317
+ size: number
1318
+ }
1319
+
1320
+ export interface JsStatsChunkGroupChildren {
1321
+ preload?: Array<JsStatsChunkGroup>
1322
+ prefetch?: Array<JsStatsChunkGroup>
1323
+ }
1324
+
1325
+ export interface JsStatsCompilation {
1326
+ assets?: Array<JsStatsAsset>
1327
+ assetsByChunkName?: Array<JsStatsAssetsByChunkName>
1328
+ chunks?: Array<JsStatsChunk>
1329
+ entrypoints?: Array<JsStatsChunkGroup>
1330
+ errors: Array<JsStatsError>
1331
+ hash?: string
1332
+ modules?: Array<JsStatsModule>
1333
+ namedChunkGroups?: Array<JsStatsChunkGroup>
1334
+ warnings: Array<JsStatsError>
1335
+ }
1336
+
1337
+ export interface JsStatsError {
1338
+ name?: string
1339
+ moduleDescriptor?: JsModuleDescriptor
1340
+ message: string
1341
+ chunkName?: string
1342
+ code?: string
1343
+ chunkEntry?: boolean
1344
+ chunkInitial?: boolean
1345
+ loc?: string
1346
+ file?: string
1347
+ chunkId?: string
1348
+ details?: string
1349
+ stack?: string
1350
+ moduleTrace: Array<JsStatsModuleTrace>
1351
+ }
1352
+
1353
+ export interface JsStatsGetAssets {
1354
+ assets: Array<JsStatsAsset>
1355
+ assetsByChunkName: Array<JsStatsAssetsByChunkName>
1356
+ }
1357
+
1358
+ export interface JsStatsLogging {
1359
+ name: string
1360
+ type: string
1361
+ args?: Array<string>
1362
+ trace?: Array<string>
1363
+ }
1364
+
1365
+ export interface JsStatsModule {
1366
+ commonAttributes: JsStatsModuleCommonAttributes
1367
+ dependent?: boolean
1368
+ issuerDescriptor?: JsModuleDescriptor
1369
+ issuerPath?: Array<JsStatsModuleIssuer>
1370
+ usedExports?: string | Array<string>
1371
+ modules?: Array<JsStatsModule>
1372
+ }
1373
+
1374
+ export interface JsStatsModuleCommonAttributes {
1375
+ type: string
1376
+ moduleType: string
1377
+ layer?: string
1378
+ size: number
1379
+ sizes: Array<JsStatsSize>
1380
+ built: boolean
1381
+ codeGenerated: boolean
1382
+ buildTimeExecuted: boolean
1383
+ cached: boolean
1384
+ moduleDescriptor?: JsModuleDescriptor
1385
+ nameForCondition?: string
1386
+ preOrderIndex?: number
1387
+ postOrderIndex?: number
1388
+ cacheable?: boolean
1389
+ optional?: boolean
1390
+ orphan?: boolean
1391
+ failed?: boolean
1392
+ errors?: number
1393
+ warnings?: number
1394
+ profile?: JsStatsModuleProfile
1395
+ chunks?: Array<string>
1396
+ assets?: Array<string>
1397
+ reasons?: Array<JsStatsModuleReason>
1398
+ providedExports?: Array<string>
1399
+ optimizationBailout?: Array<string>
1400
+ depth?: number
1401
+ source?: string | Buffer
1402
+ }
1403
+
1404
+ export interface JsStatsModuleIssuer {
1405
+ moduleDescriptor: JsModuleDescriptor
1406
+ }
1407
+
1408
+ export interface JsStatsModuleProfile {
1409
+ factory: number
1410
+ building: number
1411
+ }
1412
+
1413
+ export interface JsStatsModuleReason {
1414
+ moduleDescriptor?: JsModuleDescriptor
1415
+ resolvedModuleDescriptor?: JsModuleDescriptor
1416
+ moduleChunks?: number
1417
+ type?: string
1418
+ userRequest?: string
1419
+ explanation?: string
1420
+ active: boolean
1421
+ loc?: string
1422
+ }
1423
+
1424
+ export interface JsStatsModuleTrace {
1425
+ origin: JsStatsModuleTraceModule
1426
+ module: JsStatsModuleTraceModule
1427
+ dependencies: Array<JsStatsModuleTraceDependency>
1428
+ }
1429
+
1430
+ export interface JsStatsModuleTraceDependency {
1431
+ loc: string
1432
+ }
1433
+
1434
+ export interface JsStatsModuleTraceModule {
1435
+ moduleDescriptor: JsModuleDescriptor
1436
+ }
1437
+
1438
+ export interface JsStatsOptimizationBailout {
1439
+ inner: string
1440
+ }
1441
+
1442
+ export interface JsStatsOptions {
1443
+ assets: boolean
1444
+ cachedModules: boolean
1445
+ chunks: boolean
1446
+ chunkGroupAuxiliary: boolean
1447
+ chunkGroupChildren: boolean
1448
+ chunkGroups: boolean
1449
+ chunkModules: boolean
1450
+ chunkRelations: boolean
1451
+ depth: boolean
1452
+ entrypoints: boolean | string
1453
+ errors: boolean
1454
+ hash: boolean
1455
+ ids: boolean
1456
+ modules: boolean
1457
+ moduleAssets: boolean
1458
+ nestedModules: boolean
1459
+ optimizationBailout: boolean
1460
+ providedExports: boolean
1461
+ reasons: boolean
1462
+ source: boolean
1463
+ usedExports: boolean
1464
+ warnings: boolean
1465
+ }
1466
+
1467
+ export interface JsStatsSize {
1468
+ sourceType: string
1469
+ size: number
1470
+ }
1471
+
1472
+ export interface JsTap {
1473
+ function: (...args: any[]) => any
1474
+ stage: number
1475
+ }
1476
+
1477
+ export interface JsVirtualFile {
1478
+ path: string
1479
+ content: string
1480
+ }
1481
+
1482
+ export interface KnownAssetInfo {
1483
+ /** if the asset can be long term cached forever (contains a hash) */
1484
+ immutable?: boolean
1485
+ /** whether the asset is minimized */
1486
+ minimized?: boolean
1487
+ /** the value(s) of the full hash used for this asset */
1488
+ fullhash?: string | Array<string>
1489
+ /** the value(s) of the chunk hash used for this asset */
1490
+ chunkhash?: string | Array<string>
1491
+ /**
1492
+ * the value(s) of the module hash used for this asset
1493
+ * the value(s) of the content hash used for this asset
1494
+ */
1495
+ contenthash?: string | Array<string>
1496
+ /** when asset was created from a source file (potentially transformed), the original filename relative to compilation context */
1497
+ sourceFilename?: string
1498
+ /** when asset was created from a source file (potentially transformed), it should be flagged as copied */
1499
+ copied?: boolean
1500
+ /**
1501
+ * size in bytes, only set after asset has been emitted
1502
+ * when asset is only used for development and doesn't count towards user-facing assets
1503
+ */
1504
+ development?: boolean
1505
+ /** when asset ships data for updating an existing application (HMR) */
1506
+ hotModuleReplacement?: boolean
1507
+ /** when asset is javascript and an ESM */
1508
+ javascriptModule?: boolean
1509
+ /** related object to other assets, keyed by type of relation (only points from parent to child) */
1510
+ related?: AssetInfoRelated
1511
+ /** unused css local ident for the css chunk */
1512
+ cssUnusedIdents?: Array<string>
1513
+ /** whether this asset is over the size limit */
1514
+ isOverSizeLimit?: boolean
1515
+ }
1516
+
1517
+ export declare function loadBrowserslist(input: string | undefined | null, context: string): Array<string> | null
1518
+
1519
+ export declare function minify(source: string, options: string): Promise<TransformOutput>
1520
+
1521
+ export declare function minifySync(source: string, options: string): TransformOutput
1522
+
1523
+ /**
1524
+ * Module Resolution Options
1525
+ *
1526
+ * Options are directly ported from [enhanced-resolve](https://github.com/webpack/enhanced-resolve#resolver-options).
1527
+ *
1528
+ * See [rspack resolve](https://rspack.rs/config/resolve) for information and examples
1529
+ */
1530
+ export interface NapiResolveOptions {
1531
+ /**
1532
+ * Path to TypeScript configuration file.
1533
+ *
1534
+ * Default `None`
1535
+ */
1536
+ tsconfig?: TsconfigOptions
1537
+ /**
1538
+ * Alias for [ResolveOptions::alias] and [ResolveOptions::fallback].
1539
+ *
1540
+ * For the second value of the tuple, `None -> AliasValue::Ignore`, Some(String) ->
1541
+ * AliasValue::Path(String)`
1542
+ * Create aliases to import or require certain modules more easily.
1543
+ * A trailing $ can also be added to the given object's keys to signify an exact match.
1544
+ */
1545
+ alias?: Record<string, string | false | string[]>
1546
+ /**
1547
+ * A list of alias fields in description files.
1548
+ * Specify a field, such as `browser`, to be parsed according to [this specification](https://github.com/defunctzombie/package-browser-field-spec).
1549
+ * Can be a path to json object such as `["path", "to", "exports"]`.
1550
+ *
1551
+ * Default `[]`
1552
+ */
1553
+ aliasFields?: (string | string[])[]
1554
+ /**
1555
+ * Condition names for exports field which defines entry points of a package.
1556
+ * The key order in the exports field is significant. During condition matching, earlier entries have higher priority and take precedence over later entries.
1557
+ *
1558
+ * Default `[]`
1559
+ */
1560
+ conditionNames?: Array<string>
1561
+ /**
1562
+ * The JSON files to use for descriptions. (There was once a `bower.json`.)
1563
+ *
1564
+ * Default `["package.json"]`
1565
+ */
1566
+ descriptionFiles?: Array<string>
1567
+ /**
1568
+ * If true, it will not allow extension-less files.
1569
+ * So by default `require('./foo')` works if `./foo` has a `.js` extension,
1570
+ * but with this enabled only `require('./foo.js')` will work.
1571
+ *
1572
+ * Default to `true` when [ResolveOptions::extensions] contains an empty string.
1573
+ * Use `Some(false)` to disable the behavior.
1574
+ * See <https://github.com/webpack/enhanced-resolve/pull/285>
1575
+ *
1576
+ * Default None, which is the same as `Some(false)` when the above empty rule is not applied.
1577
+ */
1578
+ enforceExtension?: EnforceExtension
1579
+ /**
1580
+ * A list of exports fields in description files.
1581
+ * Can be a path to json object such as `["path", "to", "exports"]`.
1582
+ *
1583
+ * Default `[["exports"]]`.
1584
+ */
1585
+ exportsFields?: (string | string[])[]
1586
+ /**
1587
+ * Fields from `package.json` which are used to provide the internal requests of a package
1588
+ * (requests starting with # are considered internal).
1589
+ *
1590
+ * Can be a path to a JSON object such as `["path", "to", "imports"]`.
1591
+ *
1592
+ * Default `[["imports"]]`.
1593
+ */
1594
+ importsFields?: (string | string[])[]
1595
+ /**
1596
+ * An object which maps extension to extension aliases.
1597
+ *
1598
+ * Default `{}`
1599
+ */
1600
+ extensionAlias?: Record<string, Array<string>>
1601
+ /**
1602
+ * Attempt to resolve these extensions in order.
1603
+ * If multiple files share the same name but have different extensions,
1604
+ * will resolve the one with the extension listed first in the array and skip the rest.
1605
+ *
1606
+ * Default `[".js", ".json", ".node"]`
1607
+ */
1608
+ extensions?: Array<string>
1609
+ /**
1610
+ * Redirect module requests when normal resolving fails.
1611
+ *
1612
+ * Default `[]`
1613
+ */
1614
+ fallback?: Record<string, Array<string | undefined | null>>
1615
+ /**
1616
+ * Request passed to resolve is already fully specified and extensions or main files are not resolved for it (they are still resolved for internal requests).
1617
+ *
1618
+ * See also rspack configuration [resolve.fullySpecified](https://rspack.rs/config/resolve#resolvefullyspecified)
1619
+ *
1620
+ * Default `false`
1621
+ */
1622
+ fullySpecified?: boolean
1623
+ /**
1624
+ * A list of main fields in description files
1625
+ *
1626
+ * Default `["main"]`.
1627
+ */
1628
+ mainFields?: string | string[]
1629
+ /**
1630
+ * The filename to be used while resolving directories.
1631
+ *
1632
+ * Default `["index"]`
1633
+ */
1634
+ mainFiles?: Array<string>
1635
+ /**
1636
+ * A list of directories to resolve modules from, can be absolute path or folder name.
1637
+ *
1638
+ * Default `["node_modules"]`
1639
+ */
1640
+ modules?: string | string[]
1641
+ /**
1642
+ * Resolve to a context instead of a file.
1643
+ *
1644
+ * Default `false`
1645
+ */
1646
+ resolveToContext?: boolean
1647
+ /**
1648
+ * Prefer to resolve module requests as relative requests instead of using modules from node_modules directories.
1649
+ *
1650
+ * Default `false`
1651
+ */
1652
+ preferRelative?: boolean
1653
+ /**
1654
+ * Prefer to resolve server-relative urls as absolute paths before falling back to resolve in ResolveOptions::roots.
1655
+ *
1656
+ * Default `false`
1657
+ */
1658
+ preferAbsolute?: boolean
1659
+ /**
1660
+ * A list of resolve restrictions to restrict the paths that a request can be resolved on.
1661
+ *
1662
+ * Default `[]`
1663
+ */
1664
+ restrictions?: Array<Restriction>
1665
+ /**
1666
+ * A list of directories where requests of server-relative URLs (starting with '/') are resolved.
1667
+ * On non-Windows systems these requests are resolved as an absolute path first.
1668
+ *
1669
+ * Default `[]`
1670
+ */
1671
+ roots?: Array<string>
1672
+ /**
1673
+ * Whether to resolve symlinks to their symlinked location.
1674
+ * When enabled, symlinked resources are resolved to their real path, not their symlinked location.
1675
+ * Note that this may cause module resolution to fail when using tools that symlink packages (like npm link).
1676
+ *
1677
+ * Default `true`
1678
+ */
1679
+ symlinks?: boolean
1680
+ /**
1681
+ * Whether to parse [module.builtinModules](https://nodejs.org/api/module.html#modulebuiltinmodules) or not.
1682
+ * For example, "zlib" will throw [crate::ResolveError::Builtin] when set to true.
1683
+ *
1684
+ * Default `false`
1685
+ */
1686
+ builtinModules?: boolean
1687
+ /**
1688
+ * Whether to enable yarn Plug'n'Play
1689
+ *
1690
+ * Default `false`
1691
+ */
1692
+ enablePnp?: boolean
1693
+ }
1694
+
1695
+ export interface NativeWatcherOptions {
1696
+ followSymlinks?: boolean
1697
+ pollInterval?: number
1698
+ aggregateTimeout?: number
1699
+ /**
1700
+ * The ignored paths for the watcher.
1701
+ * It can be a single path, an array of paths, or a regular expression.
1702
+ */
1703
+ ignored?: string | string[] | RegExp
1704
+ }
1705
+
1706
+ export interface NodeFsStats {
1707
+ isFile: boolean
1708
+ isDirectory: boolean
1709
+ isSymlink: boolean
1710
+ atimeMs: number
1711
+ mtimeMs: number
1712
+ ctimeMs: number
1713
+ birthtimeMs: number
1714
+ size: number
1715
+ mode: number
1716
+ }
1717
+
1718
+ export interface PathWithInfo {
1719
+ path: string
1720
+ info: AssetInfo
1721
+ }
1722
+
1723
+ export interface RawAliasOptionItem {
1724
+ path: string
1725
+ redirect: Array<string | false>
1726
+ }
1727
+
1728
+ export interface RawAssetGeneratorDataUrlFnCtx {
1729
+ filename: string
1730
+ module: Module
1731
+ }
1732
+
1733
+ export interface RawAssetGeneratorDataUrlOptions {
1734
+ encoding?: "base64" | "false" | undefined
1735
+ mimetype?: string
1736
+ }
1737
+
1738
+ export interface RawAssetGeneratorOptions {
1739
+ emit?: boolean
1740
+ filename?: JsFilename
1741
+ outputPath?: JsFilename
1742
+ publicPath?: "auto" | JsFilename
1743
+ dataUrl?: RawAssetGeneratorDataUrlOptions | ((source: Buffer, context: RawAssetGeneratorDataUrlFnCtx) => string)
1744
+ importMode?: "url" | "preserve"
1745
+ binary?: boolean
1746
+ }
1747
+
1748
+ export interface RawAssetInlineGeneratorOptions {
1749
+ dataUrl?: RawAssetGeneratorDataUrlOptions | ((source: Buffer, context: RawAssetGeneratorDataUrlFnCtx) => string)
1750
+ binary?: boolean
1751
+ }
1752
+
1753
+ export interface RawAssetParserDataUrl {
1754
+ type: "options"
1755
+ options?: RawAssetParserDataUrlOptions
1756
+ }
1757
+
1758
+ export interface RawAssetParserDataUrlOptions {
1759
+ maxSize?: number
1760
+ }
1761
+
1762
+ export interface RawAssetParserOptions {
1763
+ dataUrlCondition?: RawAssetParserDataUrl
1764
+ }
1765
+
1766
+ export interface RawAssetResourceGeneratorOptions {
1767
+ emit?: boolean
1768
+ filename?: JsFilename
1769
+ outputPath?: JsFilename
1770
+ publicPath?: "auto" | JsFilename
1771
+ importMode?: "url" | "preserve"
1772
+ binary?: boolean
1773
+ }
1774
+
1775
+ export interface RawBannerPluginOptions {
1776
+ banner: string | ((args: { hash: string, chunk: Chunk, filename: string }) => string)
1777
+ entryOnly?: boolean
1778
+ footer?: boolean
1779
+ raw?: boolean
1780
+ stage?: number
1781
+ test?: string | RegExp | (string | RegExp)[]
1782
+ include?: string | RegExp | (string | RegExp)[]
1783
+ exclude?: string | RegExp | (string | RegExp)[]
1784
+ }
1785
+
1786
+ export interface RawBundlerInfoPluginOptions {
1787
+ version: string
1788
+ bundler: string
1789
+ force: boolean | string[]
1790
+ }
1791
+
1792
+ export interface RawCacheGroupOptions {
1793
+ key: string
1794
+ priority?: number
1795
+ test?: RegExp | string | Function
1796
+ filename?: JsFilename
1797
+ idHint?: string
1798
+ /** What kind of chunks should be selected. */
1799
+ chunks?: RegExp | 'async' | 'initial' | 'all'
1800
+ type?: RegExp | string
1801
+ layer?: RegExp | string | ((layer?: string) => boolean)
1802
+ automaticNameDelimiter?: string
1803
+ minChunks?: number
1804
+ minSize?: number | RawSplitChunkSizes
1805
+ minSizeReduction?: number | RawSplitChunkSizes
1806
+ maxSize?: number | RawSplitChunkSizes
1807
+ maxAsyncSize?: number | RawSplitChunkSizes
1808
+ maxInitialSize?: number | RawSplitChunkSizes
1809
+ maxAsyncRequests?: number
1810
+ maxInitialRequests?: number
1811
+ name?: string | false | Function
1812
+ reuseExistingChunk?: boolean
1813
+ enforce?: boolean
1814
+ usedExports?: boolean
1815
+ }
1816
+
1817
+ export interface RawCacheOptions {
1818
+ type: string
1819
+ maxGenerations?: number
1820
+ }
1821
+
1822
+ export interface RawCircularDependencyRspackPluginOptions {
1823
+ failOnError?: boolean
1824
+ allowAsyncCycles?: boolean
1825
+ exclude?: RegExp
1826
+ ignoredConnections?: Array<[string | RegExp, string | RegExp]>
1827
+ onDetected?: (entrypoint: Module, modules: string[]) => void
1828
+ onIgnored?: (entrypoint: Module, modules: string[]) => void
1829
+ onStart?: () => void
1830
+ onEnd?: () => void
1831
+ }
1832
+
1833
+ export interface RawConsumeOptions {
1834
+ key: string
1835
+ import?: string
1836
+ importResolved?: string
1837
+ shareKey: string
1838
+ shareScope: string
1839
+ requiredVersion?: string | false | undefined
1840
+ packageName?: string
1841
+ strictVersion: boolean
1842
+ singleton: boolean
1843
+ eager: boolean
1844
+ }
1845
+
1846
+ export interface RawConsumeSharedPluginOptions {
1847
+ consumes: Array<RawConsumeOptions>
1848
+ enhanced: boolean
1849
+ }
1850
+
1851
+ export interface RawContainerPluginOptions {
1852
+ name: string
1853
+ shareScope: string
1854
+ library: JsLibraryOptions
1855
+ runtime?: false | string
1856
+ filename?: string
1857
+ exposes: Array<RawExposeOptions>
1858
+ enhanced: boolean
1859
+ }
1860
+
1861
+ export interface RawContainerReferencePluginOptions {
1862
+ remoteType: string
1863
+ remotes: Array<RawRemoteOptions>
1864
+ shareScope?: string
1865
+ enhanced: boolean
1866
+ }
1867
+
1868
+ export interface RawContextReplacementPluginOptions {
1869
+ resourceRegExp: RegExp
1870
+ newContentResource?: string
1871
+ newContentRecursive?: boolean
1872
+ newContentRegExp?: RegExp
1873
+ newContentCreateContextMap?: Record<string, string>
1874
+ }
1875
+
1876
+ export interface RawCopyGlobOptions {
1877
+ /**
1878
+ * Whether the match is case sensitive
1879
+ * @default true
1880
+ */
1881
+ caseSensitiveMatch?: boolean
1882
+ /**
1883
+ * Whether to match files starting with `.`
1884
+ * @default true
1885
+ */
1886
+ dot?: boolean
1887
+ /**
1888
+ * An array of strings in glob format, which can be used to ignore specific paths
1889
+ * @default undefined
1890
+ */
1891
+ ignore?: Array<string>
1892
+ }
1893
+
1894
+ export interface RawCopyPattern {
1895
+ /**
1896
+ * The source path of the copy operation, which can be an absolute path, a relative
1897
+ * path, or a glob pattern. It can refer to a file or a directory. If a relative path
1898
+ * is passed, it is relative to the `context` option.
1899
+ * @default undefined
1900
+ */
1901
+ from: string
1902
+ /**
1903
+ * The destination path of the copy operation, which can be an absolute path, a
1904
+ * relative path, or a template string. If not specified, it is equal to Rspack's
1905
+ * `output.path`.
1906
+ * @default Rspack's `output.path`
1907
+ */
1908
+ to?: string | ((pathData: { context: string; absoluteFilename?: string }) => string | Promise<string>)
1909
+ /**
1910
+ * `context` is a path to be prepended to `from` and removed from the start of the
1911
+ * result paths. `context` can be an absolute path or a relative path. If it is a
1912
+ * relative path, then it will be converted to an absolute path based on Rspack's
1913
+ * `context`.
1914
+ * `context` should be explicitly set only when `from` contains a glob. Otherwise,
1915
+ * `context` is automatically set based on whether `from` is a file or a directory:
1916
+ * - If `from` is a file, then `context` is its directory. The result path will be
1917
+ * the filename alone.
1918
+ * - If `from` is a directory, then `context` equals `from`. The result paths will
1919
+ * be the paths of the directory's contents (including nested contents), relative
1920
+ * to the directory.
1921
+ * @default Rspack's `context`
1922
+ */
1923
+ context?: string
1924
+ /**
1925
+ * Specify the type of [to](#to), which can be a directory, a file, or a template
1926
+ * name in Rspack. If not specified, it will be automatically inferred.
1927
+ * The automatic inference rules are as follows:
1928
+ * - `dir`: If `to` has no extension, or ends on `/`.
1929
+ * - `file`: If `to` is not a directory and is not a template.
1930
+ * - `template`: If `to` contains a template pattern.
1931
+ * @default undefined
1932
+ */
1933
+ toType?: string
1934
+ /**
1935
+ * Whether to ignore the error if there are missing files or directories.
1936
+ * @default false
1937
+ */
1938
+ noErrorOnMissing: boolean
1939
+ /**
1940
+ * Whether to force the copy operation to overwrite the destination file if it
1941
+ * already exists.
1942
+ * @default false
1943
+ */
1944
+ force: boolean
1945
+ /**
1946
+ * The priority of the copy operation. The higher the priority, the earlier the copy
1947
+ * operation will be executed. When `force` is set to `true`, if a matching file is
1948
+ * found, the one with higher priority will overwrite the one with lower priority.
1949
+ * @default 0
1950
+ */
1951
+ priority: number
1952
+ /**
1953
+ * Set the glob options for the copy operation.
1954
+ * @default undefined
1955
+ */
1956
+ globOptions: RawCopyGlobOptions
1957
+ /**
1958
+ * Allows to add some assets info to the copied files, which may affect some behaviors
1959
+ * in the build process. For example, by default, the copied JS and CSS files will be
1960
+ * minified by Rspack's minimizer, if you want to skip minification for copied files,
1961
+ * you can set `info.minimized` to `true`.
1962
+ * @default undefined
1963
+ */
1964
+ info?: RawInfo
1965
+ /**
1966
+ * Determines whether to copy file permissions from the source to the destination.
1967
+ * When set to true, the plugin will preserve executable permissions and other file modes.
1968
+ * This is particularly useful when copying scripts or executable files.
1969
+ * @default false
1970
+ */
1971
+ copyPermissions?: boolean
1972
+ /**
1973
+ * Allows to modify the file contents.
1974
+ * @default undefined
1975
+ */
1976
+ transform?: { transformer: (input: Buffer, absoluteFilename: string) => string | Buffer | Promise<string> | Promise<Buffer> } | ((input: Buffer, absoluteFilename: string) => string | Buffer | Promise<string> | Promise<Buffer>)
1977
+ }
1978
+
1979
+ export interface RawCopyRspackPluginOptions {
1980
+ /** An array of objects that describe the copy operations to be performed. */
1981
+ patterns: Array<RawCopyPattern>
1982
+ }
1983
+
1984
+ export interface RawCssAutoGeneratorOptions {
1985
+ exportsConvention?: "as-is" | "camel-case" | "camel-case-only" | "dashes" | "dashes-only"
1986
+ exportsOnly?: boolean
1987
+ localIdentName?: string
1988
+ esModule?: boolean
1989
+ }
1990
+
1991
+ export interface RawCssAutoParserOptions {
1992
+ namedExports?: boolean
1993
+ url?: boolean
1994
+ }
1995
+
1996
+ export interface RawCssChunkingPluginOptions {
1997
+ strict?: boolean
1998
+ minSize?: number
1999
+ maxSize?: number
2000
+ exclude?: RegExp
2001
+ }
2002
+
2003
+ export interface RawCssExtractPluginOption {
2004
+ filename: JsFilename
2005
+ chunkFilename: JsFilename
2006
+ ignoreOrder: boolean
2007
+ insert?: string
2008
+ attributes: Record<string, string>
2009
+ linkType?: string
2010
+ runtime: boolean
2011
+ pathinfo: boolean
2012
+ enforceRelative: boolean
2013
+ }
2014
+
2015
+ export interface RawCssGeneratorOptions {
2016
+ exportsOnly?: boolean
2017
+ esModule?: boolean
2018
+ }
2019
+
2020
+ export interface RawCssModuleGeneratorOptions {
2021
+ exportsConvention?: "as-is" | "camel-case" | "camel-case-only" | "dashes" | "dashes-only"
2022
+ exportsOnly?: boolean
2023
+ localIdentName?: string
2024
+ esModule?: boolean
2025
+ }
2026
+
2027
+ export interface RawCssModuleParserOptions {
2028
+ namedExports?: boolean
2029
+ url?: boolean
2030
+ }
2031
+
2032
+ export interface RawCssParserOptions {
2033
+ namedExports?: boolean
2034
+ url?: boolean
2035
+ }
2036
+
2037
+ export interface RawDllEntryPluginOptions {
2038
+ context: string
2039
+ entries: Array<string>
2040
+ name: string
2041
+ }
2042
+
2043
+ export interface RawDllManifest {
2044
+ content: Record<string, RawDllManifestContentItem>
2045
+ name?: string
2046
+ type?: string
2047
+ }
2048
+
2049
+ export interface RawDllManifestContentItem {
2050
+ buildMeta?: JsBuildMeta
2051
+ exports?: string[] | true
2052
+ id?: number | string
2053
+ }
2054
+
2055
+ export interface RawDllReferenceAgencyPluginOptions {
2056
+ context?: string
2057
+ name?: string
2058
+ extensions: Array<string>
2059
+ scope?: string
2060
+ sourceType?: string
2061
+ type: string
2062
+ content?: Record<string, RawDllManifestContentItem>
2063
+ manifest?: RawDllManifest
2064
+ }
2065
+
2066
+ export interface RawDraft {
2067
+ customMedia: boolean
2068
+ }
2069
+
2070
+ export interface RawDynamicEntryPluginOptions {
2071
+ context: string
2072
+ entry: () => Promise<RawEntryDynamicResult[]>
2073
+ }
2074
+
2075
+ export interface RawEntryDynamicResult {
2076
+ import: Array<string>
2077
+ options: JsEntryOptions
2078
+ }
2079
+
2080
+ export interface RawEnvironment {
2081
+ const?: boolean
2082
+ arrowFunction?: boolean
2083
+ nodePrefixForCoreModules?: boolean
2084
+ asyncFunction?: boolean
2085
+ bigIntLiteral?: boolean
2086
+ destructuring?: boolean
2087
+ document?: boolean
2088
+ dynamicImport?: boolean
2089
+ forOf?: boolean
2090
+ globalThis?: boolean
2091
+ module?: boolean
2092
+ optionalChaining?: boolean
2093
+ templateLiteral?: boolean
2094
+ dynamicImportInWorker?: boolean
2095
+ }
2096
+
2097
+ export interface RawEsmLibraryPlugin {
2098
+ preserveModules?: string
2099
+ }
2100
+
2101
+ export interface RawEvalDevToolModulePluginOptions {
2102
+ namespace?: string
2103
+ moduleFilenameTemplate?: string | ((info: RawModuleFilenameTemplateFnCtx) => string)
2104
+ sourceUrlComment?: string
2105
+ }
2106
+
2107
+ export interface RawExperimentCacheOptionsPersistent {
2108
+ buildDependencies?: Array<string>
2109
+ version?: string
2110
+ snapshot?: RawExperimentSnapshotOptions
2111
+ storage?: RawStorageOptions
2112
+ }
2113
+
2114
+ export interface RawExperiments {
2115
+ topLevelAwait: boolean
2116
+ incremental?: false | { [key: string]: boolean }
2117
+ parallelCodeSplitting: boolean
2118
+ rspackFuture?: RawRspackFuture
2119
+ cache: boolean | { type: "persistent" } & RawExperimentCacheOptionsPersistent | { type: "memory" }
2120
+ useInputFileSystem?: false | Array<RegExp>
2121
+ css?: boolean
2122
+ inlineConst: boolean
2123
+ inlineEnum: boolean
2124
+ typeReexportsPresence: boolean
2125
+ lazyBarrel: boolean
2126
+ deferImport: boolean
2127
+ }
2128
+
2129
+ export interface RawExperimentSnapshotOptions {
2130
+ immutablePaths: Array<string|RegExp>
2131
+ unmanagedPaths: Array<string|RegExp>
2132
+ managedPaths: Array<string|RegExp>
2133
+ }
2134
+
2135
+ export interface RawExposeOptions {
2136
+ key: string
2137
+ name?: string
2138
+ import: Array<string>
2139
+ }
2140
+
2141
+ export interface RawExternalItemFnCtxData {
2142
+ request: string
2143
+ context: string
2144
+ dependencyType: string
2145
+ contextInfo: ContextInfo
2146
+ }
2147
+
2148
+ export interface RawExternalItemFnResult {
2149
+ externalType?: string
2150
+ result?: string | boolean | string[] | Record<string, string[]>
2151
+ }
2152
+
2153
+ export interface RawExternalsPluginOptions {
2154
+ type: string
2155
+ externals: (string | RegExp | Record<string, string | boolean | string[] | Record<string, string[]>> | ((...args: any[]) => any))[]
2156
+ placeInInitial: boolean
2157
+ }
2158
+
2159
+ export interface RawExternalsPresets {
2160
+ node: boolean
2161
+ web: boolean
2162
+ electron: boolean
2163
+ electronMain: boolean
2164
+ electronPreload: boolean
2165
+ electronRenderer: boolean
2166
+ }
2167
+
2168
+ export interface RawExtractComments {
2169
+ banner?: string | boolean
2170
+ condition?: string
2171
+ }
2172
+
2173
+ export interface RawFallbackCacheGroupOptions {
2174
+ chunks?: RegExp | 'async' | 'initial' | 'all'
2175
+ minSize?: number | RawSplitChunkSizes
2176
+ maxSize?: number | RawSplitChunkSizes
2177
+ maxAsyncSize?: number | RawSplitChunkSizes
2178
+ maxInitialSize?: number | RawSplitChunkSizes
2179
+ automaticNameDelimiter?: string
2180
+ }
2181
+
2182
+ export interface RawFlagAllModulesAsUsedPluginOptions {
2183
+ explanation: string
2184
+ }
2185
+
2186
+ export interface RawFuncUseCtx {
2187
+ resource?: string
2188
+ realResource?: string
2189
+ resourceQuery: string
2190
+ resourceFragment: string
2191
+ issuer: string
2192
+ issuerLayer: string
2193
+ }
2194
+
2195
+ export interface RawGeneratorOptions {
2196
+ type: "asset" | "asset/inline" | "asset/resource" | "css" | "css/auto" | "css/module" | "json"
2197
+ asset?: RawAssetGeneratorOptions
2198
+ assetInline?: RawAssetInlineGeneratorOptions
2199
+ assetResource?: RawAssetResourceGeneratorOptions
2200
+ css?: RawCssGeneratorOptions
2201
+ cssAuto?: RawCssAutoGeneratorOptions
2202
+ cssModule?: RawCssModuleGeneratorOptions
2203
+ json?: RawJsonGeneratorOptions
2204
+ }
2205
+
2206
+ export interface RawHtmlRspackPluginBaseOptions {
2207
+ href?: string
2208
+ target?: "_self" | "_blank" | "_parent" | "_top"
2209
+ }
2210
+
2211
+ export interface RawHtmlRspackPluginOptions {
2212
+ /** emitted file name in output path */
2213
+ filename?: string[]
2214
+ /** template html file */
2215
+ template?: string
2216
+ templateFn?: (data: string) => Promise<string>
2217
+ templateContent?: string
2218
+ templateParameters?: boolean | Record<string, any> | ((params: string) => Promise<string>)
2219
+ /** "head", "body" or "false" */
2220
+ inject: "head" | "body" | "false"
2221
+ /** path or `auto` */
2222
+ publicPath?: string
2223
+ /** `blocking`, `defer`, `module` or `systemjs-module` */
2224
+ scriptLoading: "blocking" | "defer" | "module" | "systemjs-module"
2225
+ /** entry_chunk_name (only entry chunks are supported) */
2226
+ chunks?: Array<string>
2227
+ excludeChunks?: Array<string>
2228
+ chunksSortMode: "auto" | "manual"
2229
+ sri?: "sha256" | "sha384" | "sha512"
2230
+ minify?: boolean
2231
+ title?: string
2232
+ favicon?: string
2233
+ meta?: Record<string, Record<string, string>>
2234
+ hash?: boolean
2235
+ base?: RawHtmlRspackPluginBaseOptions
2236
+ uid?: number
2237
+ }
2238
+
2239
+ export interface RawHttpExternalsRspackPluginOptions {
2240
+ css: boolean
2241
+ webAsync: boolean
2242
+ }
2243
+
2244
+ export interface RawHttpUriPluginOptions {
2245
+ allowedUris: (string | RegExp)[]
2246
+ lockfileLocation?: string
2247
+ cacheLocation?: string
2248
+ upgrade: boolean
2249
+ httpClient: (url: string, headers: Record<string, string>) => Promise<JsHttpResponseRaw>
2250
+ }
2251
+
2252
+ export interface RawIgnorePluginOptions {
2253
+ resourceRegExp?: RegExp
2254
+ contextRegExp?: RegExp
2255
+ checkResource?: (resource: string, context: string) => boolean
2256
+ }
2257
+
2258
+ export interface RawIncremental {
2259
+ silent: boolean
2260
+ make: boolean
2261
+ inferAsyncModules: boolean
2262
+ providedExports: boolean
2263
+ dependenciesDiagnostics: boolean
2264
+ sideEffects: boolean
2265
+ buildChunkGraph: boolean
2266
+ moduleIds: boolean
2267
+ chunkIds: boolean
2268
+ modulesHashes: boolean
2269
+ modulesCodegen: boolean
2270
+ modulesRuntimeRequirements: boolean
2271
+ chunksRuntimeRequirements: boolean
2272
+ chunksHashes: boolean
2273
+ chunksRender: boolean
2274
+ emitAssets: boolean
2275
+ }
2276
+
2277
+ export interface RawInfo {
2278
+ immutable?: boolean
2279
+ /**
2280
+ * Whether to skip minification for the copied files.
2281
+ * @default false
2282
+ */
2283
+ minimized?: boolean
2284
+ chunkHash?: Array<string>
2285
+ contentHash?: Array<string>
2286
+ development?: boolean
2287
+ hotModuleReplacement?: boolean
2288
+ related?: RawRelated
2289
+ version?: string
2290
+ }
2291
+
2292
+ export interface RawIntegrityData {
2293
+ integerities: Array<RawIntegrityItem>
2294
+ }
2295
+
2296
+ export interface RawIntegrityItem {
2297
+ asset: string
2298
+ integrity: string
2299
+ }
2300
+
2301
+ export declare enum RawJavascriptParserCommonjsExports {
2302
+ SkipInEsm = 'skipInEsm'
2303
+ }
2304
+
2305
+ export interface RawJavascriptParserCommonjsOptions {
2306
+ exports?: boolean | 'skipInEsm'
2307
+ }
2308
+
2309
+ export interface RawJavascriptParserOptions {
2310
+ dynamicImportMode?: string
2311
+ dynamicImportPreload?: string
2312
+ dynamicImportPrefetch?: string
2313
+ dynamicImportFetchPriority?: string
2314
+ url?: string
2315
+ exprContextCritical?: boolean
2316
+ unknownContextCritical?: boolean
2317
+ wrappedContextCritical?: boolean
2318
+ wrappedContextRegExp?: RegExp
2319
+ exportsPresence?: string
2320
+ importExportsPresence?: string
2321
+ reexportExportsPresence?: string
2322
+ strictExportPresence?: boolean
2323
+ worker?: Array<string>
2324
+ overrideStrict?: string
2325
+ importMeta?: boolean
2326
+ /**
2327
+ * This option is experimental in Rspack only and subject to change or be removed anytime.
2328
+ * @experimental
2329
+ */
2330
+ requireAsExpression?: boolean
2331
+ /**
2332
+ * This option is experimental in Rspack only and subject to change or be removed anytime.
2333
+ * @experimental
2334
+ */
2335
+ requireDynamic?: boolean
2336
+ /**
2337
+ * This option is experimental in Rspack only and subject to change or be removed anytime.
2338
+ * @experimental
2339
+ */
2340
+ requireResolve?: boolean
2341
+ commonjs?: boolean | { exports?: boolean | 'skipInEsm' }
2342
+ /**
2343
+ * This option is experimental in Rspack only and subject to change or be removed anytime.
2344
+ * @experimental
2345
+ */
2346
+ importDynamic?: boolean
2347
+ commonjsMagicComments?: boolean
2348
+ /**
2349
+ * This option is experimental in Rspack only and subject to change or be removed anytime.
2350
+ * @experimental
2351
+ */
2352
+ inlineConst?: boolean
2353
+ /**
2354
+ * This option is experimental in Rspack only and subject to change or be removed anytime.
2355
+ * @experimental
2356
+ */
2357
+ typeReexportsPresence?: string
2358
+ /**
2359
+ * This option is experimental in Rspack only and subject to change or be removed anytime.
2360
+ * @experimental
2361
+ */
2362
+ jsx?: boolean
2363
+ deferImport?: boolean
2364
+ }
2365
+
2366
+ export interface RawJsonGeneratorOptions {
2367
+ JSONParse?: boolean
2368
+ }
2369
+
2370
+ export interface RawJsonParserOptions {
2371
+ exportsDepth?: number
2372
+ parse?: (source: string) => string
2373
+ }
2374
+
2375
+ export interface RawLazyCompilationOption {
2376
+ currentActiveModules: ((err: Error | null, ) => Set<string>)
2377
+ test?: RawLazyCompilationTest
2378
+ entries: boolean
2379
+ imports: boolean
2380
+ client: string
2381
+ }
2382
+
2383
+ export interface RawLibManifestPluginOptions {
2384
+ context?: string
2385
+ entryOnly?: boolean
2386
+ name?: JsFilename
2387
+ path: JsFilename
2388
+ format?: boolean
2389
+ type?: string
2390
+ }
2391
+
2392
+ export interface RawLightningCssBrowsers {
2393
+ android?: number
2394
+ chrome?: number
2395
+ edge?: number
2396
+ firefox?: number
2397
+ ie?: number
2398
+ ios_saf?: number
2399
+ opera?: number
2400
+ safari?: number
2401
+ samsung?: number
2402
+ }
2403
+
2404
+ export interface RawLightningCssMinimizerOptions {
2405
+ errorRecovery: boolean
2406
+ targets?: Array<string>
2407
+ include?: number
2408
+ exclude?: number
2409
+ draft?: RawDraft
2410
+ drafts?: RawDraft
2411
+ nonStandard?: RawNonStandard
2412
+ pseudoClasses?: RawLightningCssPseudoClasses
2413
+ unusedSymbols: Array<string>
2414
+ }
2415
+
2416
+ export interface RawLightningCssMinimizerRspackPluginOptions {
2417
+ test?: string | RegExp | (string | RegExp)[]
2418
+ include?: string | RegExp | (string | RegExp)[]
2419
+ exclude?: string | RegExp | (string | RegExp)[]
2420
+ removeUnusedLocalIdents: boolean
2421
+ minimizerOptions: RawLightningCssMinimizerOptions
2422
+ }
2423
+
2424
+ export interface RawLightningCssPseudoClasses {
2425
+ hover?: string
2426
+ active?: string
2427
+ focus?: string
2428
+ focusVisible?: string
2429
+ focusWithin?: string
2430
+ }
2431
+
2432
+ export interface RawLimitChunkCountPluginOptions {
2433
+ chunkOverhead?: number
2434
+ entryChunkMultiplicator?: number
2435
+ maxChunks: number
2436
+ }
2437
+
2438
+ export interface RawManifestExposeOption {
2439
+ path: string
2440
+ name: string
2441
+ }
2442
+
2443
+ export interface RawManifestSharedOption {
2444
+ name: string
2445
+ version?: string
2446
+ requiredVersion?: string
2447
+ singleton?: boolean
2448
+ }
2449
+
2450
+ export interface RawModuleFederationManifestPluginOptions {
2451
+ name?: string
2452
+ globalName?: string
2453
+ fileName?: string
2454
+ filePath?: string
2455
+ statsFileName?: string
2456
+ manifestFileName?: string
2457
+ disableAssetsAnalyze?: boolean
2458
+ remoteAliasMap?: Record<string, RawRemoteAliasTarget>
2459
+ exposes?: Array<RawManifestExposeOption>
2460
+ shared?: Array<RawManifestSharedOption>
2461
+ buildInfo?: RawStatsBuildInfo
2462
+ }
2463
+
2464
+ export interface RawModuleFederationRuntimePluginOptions {
2465
+ entryRuntime?: string | undefined
2466
+ }
2467
+
2468
+ export interface RawModuleFilenameTemplateFnCtx {
2469
+ identifier: string
2470
+ shortIdentifier: string
2471
+ resource: string
2472
+ resourcePath: string
2473
+ absoluteResourcePath: string
2474
+ loaders: string
2475
+ allLoaders: string
2476
+ query: string
2477
+ moduleId: string
2478
+ hash: string
2479
+ namespace: string
2480
+ }
2481
+
2482
+ export interface RawModuleInfo {
2483
+ active: boolean
2484
+ client: string
2485
+ data: string
2486
+ }
2487
+
2488
+ export interface RawModuleOptions {
2489
+ rules: Array<RawModuleRule>
2490
+ parser?: Record<string, RawParserOptions>
2491
+ generator?: Record<string, RawGeneratorOptions>
2492
+ noParse?: string | RegExp | ((request: string) => boolean) | (string | RegExp | ((request: string) => boolean))[]
2493
+ unsafeCache?: boolean | RegExp
2494
+ }
2495
+
2496
+ export interface RawModuleRule {
2497
+ /**
2498
+ * A conditional match matching an absolute path + query + fragment.
2499
+ * Note:
2500
+ * This is a custom matching rule not initially designed by webpack.
2501
+ * Only for single-threaded environment interoperation purpose.
2502
+ */
2503
+ rspackResource?: RawRuleSetCondition
2504
+ /** A condition matcher matching an absolute path. */
2505
+ test?: RawRuleSetCondition
2506
+ include?: RawRuleSetCondition
2507
+ exclude?: RawRuleSetCondition
2508
+ /** A condition matcher matching an absolute path. */
2509
+ resource?: RawRuleSetCondition
2510
+ /** A condition matcher against the resource query. */
2511
+ resourceQuery?: RawRuleSetCondition
2512
+ resourceFragment?: RawRuleSetCondition
2513
+ descriptionData?: Record<string, RawRuleSetCondition>
2514
+ with?: Record<string, RawRuleSetCondition>
2515
+ sideEffects?: boolean
2516
+ use?: RawModuleRuleUse[] | ((arg: RawFuncUseCtx) => RawModuleRuleUse[])
2517
+ type?: string
2518
+ layer?: string
2519
+ parser?: RawParserOptions
2520
+ generator?: RawGeneratorOptions
2521
+ resolve?: RawResolveOptions
2522
+ issuer?: RawRuleSetCondition
2523
+ issuerLayer?: RawRuleSetCondition
2524
+ dependency?: RawRuleSetCondition
2525
+ scheme?: RawRuleSetCondition
2526
+ mimetype?: RawRuleSetCondition
2527
+ oneOf?: Array<RawModuleRule>
2528
+ rules?: Array<RawModuleRule>
2529
+ /** Specifies the category of the loader. No value means normal loader. */
2530
+ enforce?: 'pre' | 'post'
2531
+ /** Whether to extract source maps from the module. */
2532
+ extractSourceMap?: boolean
2533
+ }
2534
+
2535
+ /**
2536
+ * `loader` is for both JS and Rust loaders.
2537
+ * `options` is
2538
+ * - a `None` on rust side and handled by js side `getOptions` when
2539
+ * using with `loader`.
2540
+ * - a `Some(string)` on rust side, deserialized by `serde_json::from_str`
2541
+ * and passed to rust side loader in [get_builtin_loader] when using with
2542
+ * `builtin_loader`.
2543
+ */
2544
+ export interface RawModuleRuleUse {
2545
+ loader: string
2546
+ options?: string
2547
+ }
2548
+
2549
+ export interface RawNodeOption {
2550
+ dirname: string
2551
+ filename: string
2552
+ global: string
2553
+ }
2554
+
2555
+ export interface RawNonStandard {
2556
+ deepSelectorCombinator: boolean
2557
+ }
2558
+
2559
+ export interface RawNormalModuleReplacementPluginOptions {
2560
+ resourceRegExp: RegExp
2561
+ newResource: string | ((data: JsResolveData) => JsResolveData)
2562
+ }
2563
+
2564
+ export interface RawOccurrenceChunkIdsPluginOptions {
2565
+ prioritiseInitial?: boolean
2566
+ }
2567
+
2568
+ export interface RawOptimizationOptions {
2569
+ removeAvailableModules: boolean
2570
+ sideEffects: boolean | string
2571
+ usedExports: boolean | string
2572
+ providedExports: boolean
2573
+ innerGraph: boolean
2574
+ realContentHash: boolean
2575
+ mangleExports: boolean | string
2576
+ concatenateModules: boolean
2577
+ avoidEntryIife: boolean
2578
+ }
2579
+
2580
+ export interface RawOptions {
2581
+ name?: string
2582
+ mode?: undefined | 'production' | 'development' | 'none'
2583
+ context: string
2584
+ output: RawOutputOptions
2585
+ resolve: RawResolveOptions
2586
+ resolveLoader: RawResolveOptions
2587
+ module: RawModuleOptions
2588
+ optimization: RawOptimizationOptions
2589
+ stats: RawStatsOptions
2590
+ cache: RawCacheOptions
2591
+ experiments: RawExperiments
2592
+ node?: RawNodeOption
2593
+ profile: boolean
2594
+ amd?: string
2595
+ bail: boolean
2596
+ __references: Record<string, any>
2597
+ __virtual_files?: Array<JsVirtualFile>
2598
+ }
2599
+
2600
+ export interface RawOutputOptions {
2601
+ path: string
2602
+ pathinfo: boolean | "verbose"
2603
+ clean: boolean | JsCleanOptions
2604
+ publicPath: "auto" | JsFilename
2605
+ assetModuleFilename: JsFilename
2606
+ wasmLoading: string | false
2607
+ enabledWasmLoadingTypes: Array<string>
2608
+ webassemblyModuleFilename: string
2609
+ filename: JsFilename
2610
+ chunkFilename: JsFilename
2611
+ crossOriginLoading: string | false
2612
+ cssFilename: JsFilename
2613
+ cssChunkFilename: JsFilename
2614
+ hotUpdateMainFilename: string
2615
+ hotUpdateChunkFilename: string
2616
+ hotUpdateGlobal: string
2617
+ uniqueName: string
2618
+ chunkLoadingGlobal: string
2619
+ library?: JsLibraryOptions
2620
+ strictModuleErrorHandling: boolean
2621
+ enabledLibraryTypes?: Array<string>
2622
+ globalObject: string
2623
+ importFunctionName: string
2624
+ importMetaName: string
2625
+ iife: boolean
2626
+ module: boolean
2627
+ chunkLoading: string | false
2628
+ chunkLoadTimeout: number
2629
+ charset: boolean
2630
+ enabledChunkLoadingTypes?: Array<string>
2631
+ trustedTypes?: RawTrustedTypes
2632
+ sourceMapFilename: string
2633
+ hashFunction: string
2634
+ hashDigest: string
2635
+ hashDigestLength: number
2636
+ hashSalt?: string
2637
+ asyncChunks: boolean
2638
+ workerChunkLoading: string | false
2639
+ workerWasmLoading: string | false
2640
+ workerPublicPath: string
2641
+ scriptType: "module" | "text/javascript" | false
2642
+ environment: RawEnvironment
2643
+ compareBeforeEmit: boolean
2644
+ }
2645
+
2646
+ export interface RawParserOptions {
2647
+ type: "asset" | "css" | "css/auto" | "css/module" | "javascript" | "javascript/auto" | "javascript/dynamic" | "javascript/esm" | "json"
2648
+ asset?: RawAssetParserOptions
2649
+ css?: RawCssParserOptions
2650
+ cssAuto?: RawCssAutoParserOptions
2651
+ cssModule?: RawCssModuleParserOptions
2652
+ javascript?: RawJavascriptParserOptions
2653
+ json?: RawJsonParserOptions
2654
+ }
2655
+
2656
+ export interface RawPathData {
2657
+ filename?: string
2658
+ contentHash?: string
2659
+ url?: string
2660
+ }
2661
+
2662
+ export interface RawProgressPluginOptions {
2663
+ prefix?: string
2664
+ profile?: boolean
2665
+ template?: string
2666
+ tick?: string | Array<string>
2667
+ progressChars?: string
2668
+ handler?: (percent: number, msg: string, items: string[]) => void
2669
+ }
2670
+
2671
+ export interface RawProvideOptions {
2672
+ key: string
2673
+ shareKey: string
2674
+ shareScope: string
2675
+ version?: string | false | undefined
2676
+ eager: boolean
2677
+ singleton?: boolean
2678
+ requiredVersion?: string | false | undefined
2679
+ strictVersion?: boolean
2680
+ }
2681
+
2682
+ export interface RawRelated {
2683
+ sourceMap?: string
2684
+ }
2685
+
2686
+ export interface RawRemoteAliasTarget {
2687
+ name: string
2688
+ entry?: string
2689
+ }
2690
+
2691
+ export interface RawRemoteOptions {
2692
+ key: string
2693
+ external: Array<string>
2694
+ shareScope: string
2695
+ }
2696
+
2697
+ export interface RawResolveOptions {
2698
+ preferRelative?: boolean
2699
+ preferAbsolute?: boolean
2700
+ extensions?: Array<string>
2701
+ mainFiles?: Array<string>
2702
+ mainFields?: Array<string>
2703
+ conditionNames?: Array<string>
2704
+ alias?: Array<RawAliasOptionItem> | false
2705
+ fallback?: Array<RawAliasOptionItem> | false
2706
+ symlinks?: boolean
2707
+ tsconfig?: RawResolveTsconfigOptions
2708
+ modules?: Array<string>
2709
+ byDependency?: Record<string, RawResolveOptions>
2710
+ fullySpecified?: boolean
2711
+ exportsFields?: Array<string>
2712
+ descriptionFiles?: Array<string>
2713
+ enforceExtension?: boolean
2714
+ importsFields?: Array<string>
2715
+ extensionAlias?: Record<string, Array<string>>
2716
+ aliasFields?: Array<string>
2717
+ restrictions?: (string | RegExp)[]
2718
+ roots?: Array<string>
2719
+ pnp?: boolean
2720
+ }
2721
+
2722
+ export interface RawResolveOptionsWithDependencyType {
2723
+ preferRelative?: boolean
2724
+ preferAbsolute?: boolean
2725
+ extensions?: Array<string>
2726
+ mainFiles?: Array<string>
2727
+ mainFields?: Array<string>
2728
+ conditionNames?: Array<string>
2729
+ alias?: Array<RawAliasOptionItem> | false
2730
+ fallback?: Array<RawAliasOptionItem> | false
2731
+ symlinks?: boolean
2732
+ tsconfig?: RawResolveTsconfigOptions
2733
+ modules?: Array<string>
2734
+ byDependency?: Record<string, RawResolveOptions>
2735
+ fullySpecified?: boolean
2736
+ exportsFields?: Array<string>
2737
+ descriptionFiles?: Array<string>
2738
+ enforceExtension?: boolean
2739
+ importsFields?: Array<string>
2740
+ extensionAlias?: Record<string, Array<string>>
2741
+ aliasFields?: Array<string>
2742
+ restrictions?: (string | RegExp)[]
2743
+ roots?: Array<string>
2744
+ dependencyType?: string
2745
+ resolveToContext?: boolean
2746
+ pnp?: boolean
2747
+ }
2748
+
2749
+ export interface RawResolveTsconfigOptions {
2750
+ configFile: string
2751
+ referencesType: "auto" | "manual" | "disabled"
2752
+ references?: Array<string>
2753
+ }
2754
+
2755
+ export interface RawRsdoctorPluginOptions {
2756
+ moduleGraphFeatures: boolean | Array<'graph' | 'ids' | 'sources'>
2757
+ chunkGraphFeatures: boolean | Array<'graph' | 'assets'>
2758
+ sourceMapFeatures?: { module?: boolean; cheap?: boolean } | undefined
2759
+ }
2760
+
2761
+ export interface RawRslibPluginOptions {
2762
+ /**
2763
+ * Intercept partial parse hooks of APIPlugin, expect some statements not to be parsed as API.
2764
+ * @default `false`
2765
+ */
2766
+ interceptApiPlugin?: boolean
2767
+ /**
2768
+ * Add shims for javascript/esm modules
2769
+ * @default `false`
2770
+ */
2771
+ forceNodeShims?: boolean
2772
+ }
2773
+
2774
+ export interface RawRspackFuture {
2775
+
2776
+ }
2777
+
2778
+ export interface RawRstestPluginOptions {
2779
+ injectModulePathName: boolean
2780
+ importMetaPathName: boolean
2781
+ hoistMockModule: boolean
2782
+ manualMockRoot: string
2783
+ }
2784
+
2785
+ export interface RawRuleSetCondition {
2786
+ type: RawRuleSetConditionType
2787
+ string?: string
2788
+ regexp?: RegExp
2789
+ logical?: Array<RawRuleSetLogicalConditions>
2790
+ array?: Array<RawRuleSetCondition>
2791
+ func?: (value: string) => boolean
2792
+ }
2793
+
2794
+ export declare enum RawRuleSetConditionType {
2795
+ string = 'string',
2796
+ regexp = 'regexp',
2797
+ logical = 'logical',
2798
+ array = 'array',
2799
+ func = 'func'
2800
+ }
2801
+
2802
+ export interface RawRuleSetLogicalConditions {
2803
+ and?: Array<RawRuleSetCondition>
2804
+ or?: Array<RawRuleSetCondition>
2805
+ not?: RawRuleSetCondition
2806
+ }
2807
+
2808
+ export interface RawRuntimeChunkNameFnCtx {
2809
+ name: string
2810
+ }
2811
+
2812
+ export interface RawRuntimeChunkOptions {
2813
+ name: string | ((entrypoint: { name: string }) => string)
2814
+ }
2815
+
2816
+ export interface RawSizeLimitsPluginOptions {
2817
+ assetFilter?: (assetFilename: string) => boolean
2818
+ hints?: "error" | "warning"
2819
+ maxAssetSize?: number
2820
+ maxEntrypointSize?: number
2821
+ }
2822
+
2823
+ export interface RawSplitChunkSizes {
2824
+ sizes: Record<string, number>
2825
+ }
2826
+
2827
+ export interface RawSplitChunksOptions {
2828
+ fallbackCacheGroup?: RawFallbackCacheGroupOptions
2829
+ name?: string | false | Function
2830
+ filename?: JsFilename
2831
+ cacheGroups?: Array<RawCacheGroupOptions>
2832
+ /** What kind of chunks should be selected. */
2833
+ chunks?: RegExp | 'async' | 'initial' | 'all' | Function
2834
+ usedExports?: boolean
2835
+ automaticNameDelimiter?: string
2836
+ maxAsyncRequests?: number
2837
+ maxInitialRequests?: number
2838
+ defaultSizeTypes: Array<string>
2839
+ minChunks?: number
2840
+ hidePathInfo?: boolean
2841
+ minSize?: number | RawSplitChunkSizes
2842
+ minSizeReduction?: number | RawSplitChunkSizes
2843
+ enforceSizeThreshold?: number
2844
+ minRemainingSize?: number | RawSplitChunkSizes
2845
+ maxSize?: number | RawSplitChunkSizes
2846
+ maxAsyncSize?: number | RawSplitChunkSizes
2847
+ maxInitialSize?: number | RawSplitChunkSizes
2848
+ }
2849
+
2850
+ export interface RawStatsBuildInfo {
2851
+ buildVersion: string
2852
+ buildName?: string
2853
+ }
2854
+
2855
+ export interface RawStatsOptions {
2856
+ colors: boolean
2857
+ }
2858
+
2859
+ export interface RawStorageOptions {
2860
+ type: "filesystem"
2861
+ directory: string
2862
+ }
2863
+
2864
+ export interface RawSubresourceIntegrityPluginOptions {
2865
+ integrityCallback?: (data: RawIntegrityData) => void
2866
+ hashFuncNames: Array<string>
2867
+ htmlPlugin: "JavaScript" | "Native" | "Disabled"
2868
+ }
2869
+
2870
+ export interface RawSwcJsMinimizerOptions {
2871
+ ecma: any
2872
+ compress: any
2873
+ mangle: any
2874
+ format: any
2875
+ module?: boolean
2876
+ minify?: boolean
2877
+ }
2878
+
2879
+ export interface RawSwcJsMinimizerRspackPluginOptions {
2880
+ test?: string | RegExp | (string | RegExp)[]
2881
+ include?: string | RegExp | (string | RegExp)[]
2882
+ exclude?: string | RegExp | (string | RegExp)[]
2883
+ extractComments?: RawExtractComments
2884
+ minimizerOptions: RawSwcJsMinimizerOptions
2885
+ }
2886
+
2887
+ export interface RawToOptions {
2888
+ context: string
2889
+ absoluteFilename?: string
2890
+ }
2891
+
2892
+ export interface RawTraceEvent {
2893
+ name: string
2894
+ trackName?: string
2895
+ processName?: string
2896
+ args?: Record<string, string>
2897
+ uuid: number
2898
+ ts: bigint
2899
+ ph: string
2900
+ categories?: Array<string>
2901
+ }
2902
+
2903
+ export interface RawTrustedTypes {
2904
+ policyName?: string
2905
+ onPolicyCreationFailure?: string
2906
+ }
2907
+
2908
+ export interface RealDependencyLocation {
2909
+ start: SourcePosition
2910
+ end?: SourcePosition
2911
+ }
2912
+
2913
+ /**
2914
+ * this is a process level tracing, which means it would be shared by all compilers in the same process
2915
+ * only the first call would take effect, the following calls would be ignored
2916
+ * Some code is modified based on
2917
+ * https://github.com/swc-project/swc/blob/d1d0607158ab40463d1b123fed52cc526eba8385/bindings/binding_core_node/src/util.rs#L29-L58
2918
+ * Apache-2.0 licensed
2919
+ * Author Donny/강동윤
2920
+ * Copyright (c)
2921
+ */
2922
+ export declare function registerGlobalTrace(filter: string, layer: "logger" | "perfetto" , output: string): void
2923
+
2924
+ export declare enum RegisterJsTapKind {
2925
+ CompilerThisCompilation = 0,
2926
+ CompilerCompilation = 1,
2927
+ CompilerMake = 2,
2928
+ CompilerFinishMake = 3,
2929
+ CompilerShouldEmit = 4,
2930
+ CompilerEmit = 5,
2931
+ CompilerAfterEmit = 6,
2932
+ CompilerAssetEmitted = 7,
2933
+ CompilationBuildModule = 8,
2934
+ CompilationStillValidModule = 9,
2935
+ CompilationSucceedModule = 10,
2936
+ CompilationExecuteModule = 11,
2937
+ CompilationFinishModules = 12,
2938
+ CompilationOptimizeModules = 13,
2939
+ CompilationAfterOptimizeModules = 14,
2940
+ CompilationOptimizeTree = 15,
2941
+ CompilationOptimizeChunkModules = 16,
2942
+ CompilationAdditionalTreeRuntimeRequirements = 17,
2943
+ CompilationRuntimeRequirementInTree = 18,
2944
+ CompilationRuntimeModule = 19,
2945
+ CompilationChunkHash = 20,
2946
+ CompilationChunkAsset = 21,
2947
+ CompilationProcessAssets = 22,
2948
+ CompilationAfterProcessAssets = 23,
2949
+ CompilationSeal = 24,
2950
+ CompilationAfterSeal = 25,
2951
+ NormalModuleFactoryBeforeResolve = 26,
2952
+ NormalModuleFactoryFactorize = 27,
2953
+ NormalModuleFactoryResolve = 28,
2954
+ NormalModuleFactoryAfterResolve = 29,
2955
+ NormalModuleFactoryCreateModule = 30,
2956
+ NormalModuleFactoryResolveForScheme = 31,
2957
+ ContextModuleFactoryBeforeResolve = 32,
2958
+ ContextModuleFactoryAfterResolve = 33,
2959
+ JavascriptModulesChunkHash = 34,
2960
+ HtmlPluginBeforeAssetTagGeneration = 35,
2961
+ HtmlPluginAlterAssetTags = 36,
2962
+ HtmlPluginAlterAssetTagGroups = 37,
2963
+ HtmlPluginAfterTemplateExecution = 38,
2964
+ HtmlPluginBeforeEmit = 39,
2965
+ HtmlPluginAfterEmit = 40,
2966
+ RuntimePluginCreateScript = 41,
2967
+ RuntimePluginLinkPreload = 42,
2968
+ RuntimePluginLinkPrefetch = 43,
2969
+ RsdoctorPluginModuleGraph = 44,
2970
+ RsdoctorPluginChunkGraph = 45,
2971
+ RsdoctorPluginModuleIds = 46,
2972
+ RsdoctorPluginModuleSources = 47,
2973
+ RsdoctorPluginAssets = 48
2974
+ }
2975
+
2976
+ export interface RegisterJsTaps {
2977
+ registerCompilerThisCompilationTaps: (stages: Array<number>) => Array<{ function: ((arg: JsCompilation) => void); stage: number; }>
2978
+ registerCompilerCompilationTaps: (stages: Array<number>) => Array<{ function: ((arg: JsCompilation) => void); stage: number; }>
2979
+ registerCompilerMakeTaps: (stages: Array<number>) => Array<{ function: ((arg: JsCompilation) => Promise<void>); stage: number; }>
2980
+ registerCompilerFinishMakeTaps: (stages: Array<number>) => Array<{ function: ((arg: JsCompilation) => void); stage: number; }>
2981
+ registerCompilerShouldEmitTaps: (stages: Array<number>) => Array<{ function: ((arg: JsCompilation) => boolean | undefined); stage: number; }>
2982
+ registerCompilerEmitTaps: (stages: Array<number>) => Array<{ function: (() => Promise<void>); stage: number; }>
2983
+ registerCompilerAfterEmitTaps: (stages: Array<number>) => Array<{ function: (() => Promise<void>); stage: number; }>
2984
+ registerCompilerAssetEmittedTaps: (stages: Array<number>) => Array<{ function: ((arg: JsAssetEmittedArgs) => Promise<void>); stage: number; }>
2985
+ registerCompilationBuildModuleTaps: (stages: Array<number>) => Array<{ function: ((arg: Module) => void); stage: number; }>
2986
+ registerCompilationStillValidModuleTaps: (stages: Array<number>) => Array<{ function: ((arg: Module) => void); stage: number; }>
2987
+ registerCompilationSucceedModuleTaps: (stages: Array<number>) => Array<{ function: ((arg: Module) => void); stage: number; }>
2988
+ registerCompilationExecuteModuleTaps: (stages: Array<number>) => Array<{ function: ((arg: JsExecuteModuleArg) => void); stage: number; }>
2989
+ registerCompilationAdditionalTreeRuntimeRequirementsTaps: (stages: Array<number>) => Array<{ function: ((arg: JsAdditionalTreeRuntimeRequirementsArg) => JsAdditionalTreeRuntimeRequirementsResult | undefined); stage: number; }>
2990
+ registerCompilationRuntimeRequirementInTreeTaps: (stages: Array<number>) => Array<{ function: ((arg: JsRuntimeRequirementInTreeArg) => JsRuntimeRequirementInTreeResult | undefined); stage: number; }>
2991
+ registerCompilationRuntimeModuleTaps: (stages: Array<number>) => Array<{ function: ((arg: JsRuntimeModuleArg) => JsRuntimeModule | undefined); stage: number; }>
2992
+ registerCompilationFinishModulesTaps: (stages: Array<number>) => Array<{ function: ((arg: JsCompilation) => Promise<void>); stage: number; }>
2993
+ registerCompilationOptimizeModulesTaps: (stages: Array<number>) => Array<{ function: (() => boolean | undefined); stage: number; }>
2994
+ registerCompilationAfterOptimizeModulesTaps: (stages: Array<number>) => Array<{ function: (() => void); stage: number; }>
2995
+ registerCompilationOptimizeTreeTaps: (stages: Array<number>) => Array<{ function: (() => Promise<void>); stage: number; }>
2996
+ registerCompilationOptimizeChunkModulesTaps: (stages: Array<number>) => Array<{ function: (() => Promise<boolean | undefined>); stage: number; }>
2997
+ registerCompilationChunkHashTaps: (stages: Array<number>) => Array<{ function: ((arg: Chunk) => Buffer); stage: number; }>
2998
+ registerCompilationChunkAssetTaps: (stages: Array<number>) => Array<{ function: ((arg: JsChunkAssetArgs) => void); stage: number; }>
2999
+ registerCompilationProcessAssetsTaps: (stages: Array<number>) => Array<{ function: ((arg: JsCompilation) => Promise<void>); stage: number; }>
3000
+ registerCompilationAfterProcessAssetsTaps: (stages: Array<number>) => Array<{ function: ((arg: JsCompilation) => void); stage: number; }>
3001
+ registerCompilationSealTaps: (stages: Array<number>) => Array<{ function: (() => void); stage: number; }>
3002
+ registerCompilationAfterSealTaps: (stages: Array<number>) => Array<{ function: (() => Promise<void>); stage: number; }>
3003
+ registerNormalModuleFactoryBeforeResolveTaps: (stages: Array<number>) => Array<{ function: ((arg: JsResolveData) => Promise<[boolean | undefined, JsResolveData]>); stage: number; }>
3004
+ registerNormalModuleFactoryFactorizeTaps: (stages: Array<number>) => Array<{ function: ((arg: JsResolveData) => Promise<JsResolveData>); stage: number; }>
3005
+ registerNormalModuleFactoryResolveTaps: (stages: Array<number>) => Array<{ function: ((arg: JsResolveData) => Promise<JsResolveData>); stage: number; }>
3006
+ registerNormalModuleFactoryResolveForSchemeTaps: (stages: Array<number>) => Array<{ function: ((arg: JsResolveForSchemeArgs) => Promise<[boolean | undefined, JsResolveForSchemeArgs]>); stage: number; }>
3007
+ registerNormalModuleFactoryAfterResolveTaps: (stages: Array<number>) => Array<{ function: ((arg: JsResolveData) => Promise<[boolean | undefined, JsResolveData]>); stage: number; }>
3008
+ registerNormalModuleFactoryCreateModuleTaps: (stages: Array<number>) => Array<{ function: ((arg: JsNormalModuleFactoryCreateModuleArgs) => Promise<void>); stage: number; }>
3009
+ registerContextModuleFactoryBeforeResolveTaps: (stages: Array<number>) => Array<{ function: ((arg: false | JsContextModuleFactoryBeforeResolveData) => Promise<false | JsContextModuleFactoryBeforeResolveData>); stage: number; }>
3010
+ registerContextModuleFactoryAfterResolveTaps: (stages: Array<number>) => Array<{ function: ((arg: false | JsContextModuleFactoryAfterResolveData) => Promise<false | JsContextModuleFactoryAfterResolveData>); stage: number; }>
3011
+ registerJavascriptModulesChunkHashTaps: (stages: Array<number>) => Array<{ function: ((arg: Chunk) => Buffer); stage: number; }>
3012
+ registerHtmlPluginBeforeAssetTagGenerationTaps: (stages: Array<number>) => Array<{ function: ((arg: JsBeforeAssetTagGenerationData) => JsBeforeAssetTagGenerationData); stage: number; }>
3013
+ registerHtmlPluginAlterAssetTagsTaps: (stages: Array<number>) => Array<{ function: ((arg: JsAlterAssetTagsData) => JsAlterAssetTagsData); stage: number; }>
3014
+ registerHtmlPluginAlterAssetTagGroupsTaps: (stages: Array<number>) => Array<{ function: ((arg: JsAlterAssetTagGroupsData) => JsAlterAssetTagGroupsData); stage: number; }>
3015
+ registerHtmlPluginAfterTemplateExecutionTaps: (stages: Array<number>) => Array<{ function: ((arg: JsAfterTemplateExecutionData) => JsAfterTemplateExecutionData); stage: number; }>
3016
+ registerHtmlPluginBeforeEmitTaps: (stages: Array<number>) => Array<{ function: ((arg: JsBeforeEmitData) => JsBeforeEmitData); stage: number; }>
3017
+ registerHtmlPluginAfterEmitTaps: (stages: Array<number>) => Array<{ function: ((arg: JsAfterEmitData) => JsAfterEmitData); stage: number; }>
3018
+ registerRuntimePluginCreateScriptTaps: (stages: Array<number>) => Array<{ function: ((arg: JsCreateScriptData) => String); stage: number; }>
3019
+ registerRuntimePluginLinkPreloadTaps: (stages: Array<number>) => Array<{ function: ((arg: JsLinkPreloadData) => String); stage: number; }>
3020
+ registerRuntimePluginLinkPrefetchTaps: (stages: Array<number>) => Array<{ function: ((arg: JsLinkPrefetchData) => String); stage: number; }>
3021
+ registerRsdoctorPluginModuleGraphTaps: (stages: Array<number>) => Array<{ function: ((arg: JsRsdoctorModuleGraph) => Promise<boolean | undefined>); stage: number; }>
3022
+ registerRsdoctorPluginChunkGraphTaps: (stages: Array<number>) => Array<{ function: ((arg: JsRsdoctorChunkGraph) => Promise<boolean | undefined>); stage: number; }>
3023
+ registerRsdoctorPluginModuleIdsTaps: (stages: Array<number>) => Array<{ function: ((arg: JsRsdoctorModuleIdsPatch) => Promise<boolean | undefined>); stage: number; }>
3024
+ registerRsdoctorPluginModuleSourcesTaps: (stages: Array<number>) => Array<{ function: ((arg: JsRsdoctorModuleSourcesPatch) => Promise<boolean | undefined>); stage: number; }>
3025
+ registerRsdoctorPluginAssetsTaps: (stages: Array<number>) => Array<{ function: ((arg: JsRsdoctorAssetPatch) => Promise<boolean | undefined>); stage: number; }>
3026
+ }
3027
+
3028
+ export interface ResolveResult {
3029
+ path?: string
3030
+ error?: string
3031
+ /** "type" field in the package.json file */
3032
+ moduleType?: string
3033
+ }
3034
+
3035
+ /**
3036
+ * Alias Value for [ResolveOptions::alias] and [ResolveOptions::fallback].
3037
+ * Use struct because napi don't support structured union now
3038
+ */
3039
+ export interface Restriction {
3040
+ path?: string
3041
+ regex?: string
3042
+ }
3043
+
3044
+ export interface SourceMapDevToolPluginOptions {
3045
+ append?: (false | null) | string | Function
3046
+ columns?: boolean
3047
+ fallbackModuleFilenameTemplate?: string | ((info: RawModuleFilenameTemplateFnCtx) => string)
3048
+ fileContext?: string
3049
+ filename?: (false | null) | string
3050
+ ignoreList?: string | RegExp | (string | RegExp)[]
3051
+ module?: boolean
3052
+ moduleFilenameTemplate?: string | ((info: RawModuleFilenameTemplateFnCtx) => string)
3053
+ namespace?: string
3054
+ noSources?: boolean
3055
+ publicPath?: string
3056
+ sourceRoot?: string
3057
+ test?: string | RegExp | (string | RegExp)[]
3058
+ include?: string | RegExp | (string | RegExp)[]
3059
+ exclude?: string | RegExp | (string | RegExp)[]
3060
+ debugIds?: boolean
3061
+ }
3062
+
3063
+ export interface SourcePosition {
3064
+ line: number
3065
+ column?: number
3066
+ }
3067
+
3068
+ export declare function sync(path: string, request: string): ResolveResult
3069
+
3070
+ export declare function syncTraceEvent(events: Array<RawTraceEvent>): void
3071
+
3072
+ export interface SyntheticDependencyLocation {
3073
+ name: string
3074
+ }
3075
+
3076
+ export interface ThreadsafeNodeFS {
3077
+ writeFile: (name: string, content: Buffer) => Promise<void>
3078
+ removeFile: (name: string) => Promise<void>
3079
+ mkdir: (name: string) => Promise<void>
3080
+ mkdirp: (name: string) => Promise<string | void>
3081
+ removeDirAll: (name: string) => Promise<string | void>
3082
+ readDir: (name: string) => Promise<string[] | void>
3083
+ readFile: (name: string) => Promise<Buffer | string | void>
3084
+ stat: (name: string) => Promise<NodeFsStats | void>
3085
+ lstat: (name: string) => Promise<NodeFsStats | void>
3086
+ realpath: (name: string) => Promise<string | void>
3087
+ open: (name: string, flags: string) => Promise<number | void>
3088
+ rename: (from: string, to: string) => Promise<void>
3089
+ close: (fd: number) => Promise<void>
3090
+ write: (fd: number, content: Buffer, position: number) => Promise<number | void>
3091
+ writeAll: (fd: number, content: Buffer) => Promise<number | void>
3092
+ read: (fd: number, length: number, position: number) => Promise<Buffer | void>
3093
+ readUntil: (fd: number, code: number, position: number) => Promise<Buffer | void>
3094
+ readToEnd: (fd: number, position: number) => Promise<Buffer | void>
3095
+ chmod?: (name: string, mode: number) => Promise<void>
3096
+ }
3097
+
3098
+ export declare function transform(source: string, options: string): Promise<TransformOutput>
3099
+
3100
+ export interface TransformOutput {
3101
+ code: string
3102
+ map?: string
3103
+ diagnostics: Array<string>
3104
+ }
3105
+
3106
+ export declare function transformSync(source: string, options: string): TransformOutput
3107
+
3108
+ /**
3109
+ * Tsconfig Options
3110
+ *
3111
+ * Derived from [tsconfig-paths-webpack-plugin](https://github.com/dividab/tsconfig-paths-webpack-plugin#options)
3112
+ */
3113
+ export interface TsconfigOptions {
3114
+ /**
3115
+ * Allows you to specify where to find the TypeScript configuration file.
3116
+ * You may provide
3117
+ * * a relative path to the configuration file. It will be resolved relative to cwd.
3118
+ * * an absolute path to the configuration file.
3119
+ */
3120
+ configFile: string
3121
+ /**
3122
+ * Support for Typescript Project References.
3123
+ *
3124
+ * * `'auto'`: use the `references` field from tsconfig of `config_file`.
3125
+ * * `string[]`: manually provided relative or absolute path.
3126
+ */
3127
+ references?: 'auto' | string[]
3128
+ }