@rspack-canary/browser 1.4.12-canary-1a94ade3-20250814141828 → 1.4.12-canary-51b82a4d-20250815075104

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