@ohos-ports/rspack-binding 1.1.8-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +26 -0
- package/binding.d.ts +2147 -0
- package/binding.js +240 -0
- package/package.json +26 -0
- package/rspack.openharmony-arm64.node +4 -0
package/binding.d.ts
ADDED
|
@@ -0,0 +1,2147 @@
|
|
|
1
|
+
/* auto-generated by NAPI-RS */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
/* -- banner.d.ts -- */
|
|
5
|
+
export type JsFilename =
|
|
6
|
+
| string
|
|
7
|
+
| ((pathData: JsPathData, assetInfo?: JsAssetInfo) => string);
|
|
8
|
+
|
|
9
|
+
export type LocalJsFilename = JsFilename;
|
|
10
|
+
|
|
11
|
+
export type RawLazyCompilationTest = RegExp | ((m: JsModule) => boolean);
|
|
12
|
+
/* -- banner.d.ts end -- */
|
|
13
|
+
|
|
14
|
+
/* -- napi-rs generated below -- */
|
|
15
|
+
|
|
16
|
+
export declare class ExternalObject<T> {
|
|
17
|
+
readonly '': {
|
|
18
|
+
readonly '': unique symbol
|
|
19
|
+
[K: symbol]: T
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export declare class EntryDataDto {
|
|
23
|
+
get dependencies(): JsDependency[]
|
|
24
|
+
get includeDependencies(): JsDependency[]
|
|
25
|
+
get options(): EntryOptionsDto
|
|
26
|
+
}
|
|
27
|
+
export type EntryDataDTO = EntryDataDto
|
|
28
|
+
|
|
29
|
+
export declare class EntryOptionsDto {
|
|
30
|
+
get name(): string | undefined
|
|
31
|
+
set name(name: string | undefined)
|
|
32
|
+
get runtime(): false | string | undefined
|
|
33
|
+
set runtime(chunkLoading: boolean | string | undefined)
|
|
34
|
+
get chunkLoading(): string | undefined
|
|
35
|
+
set chunkLoading(chunkLoading: string | undefined)
|
|
36
|
+
get asyncChunks(): boolean | undefined
|
|
37
|
+
set asyncChunks(asyncChunks: boolean | undefined)
|
|
38
|
+
get baseUri(): string | undefined
|
|
39
|
+
set baseUri(baseUri: string | undefined)
|
|
40
|
+
get library(): JsLibraryOptions | undefined
|
|
41
|
+
set library(library: JsLibraryOptions | undefined)
|
|
42
|
+
get dependOn(): Array<string> | undefined
|
|
43
|
+
set dependOn(dependOn: Array<string> | undefined)
|
|
44
|
+
get layer(): string | undefined
|
|
45
|
+
set layer(layer: string | undefined)
|
|
46
|
+
}
|
|
47
|
+
export type EntryOptionsDTO = EntryOptionsDto
|
|
48
|
+
|
|
49
|
+
export declare class JsCompilation {
|
|
50
|
+
updateAsset(filename: string, newSourceOrFunction: JsCompatSource | ((source: JsCompatSourceOwned) => JsCompatSourceOwned), assetInfoUpdateOrFunction?: JsAssetInfo | ((assetInfo: JsAssetInfo) => JsAssetInfo)): void
|
|
51
|
+
getAssets(): Readonly<JsAsset>[]
|
|
52
|
+
getAsset(name: string): JsAsset | null
|
|
53
|
+
getAssetSource(name: string): JsCompatSource | null
|
|
54
|
+
get modules(): Array<JsModule>
|
|
55
|
+
get builtModules(): Array<JsModule>
|
|
56
|
+
getOptimizationBailout(): Array<JsStatsOptimizationBailout>
|
|
57
|
+
getChunks(): Array<JsChunk>
|
|
58
|
+
getNamedChunkKeys(): Array<string>
|
|
59
|
+
getNamedChunk(name: string): JsChunk | null
|
|
60
|
+
getNamedChunkGroupKeys(): Array<string>
|
|
61
|
+
getNamedChunkGroup(name: string): JsChunkGroup | null
|
|
62
|
+
setAssetSource(name: string, source: JsCompatSource): void
|
|
63
|
+
deleteAssetSource(name: string): void
|
|
64
|
+
getAssetFilenames(): Array<string>
|
|
65
|
+
hasAsset(name: string): boolean
|
|
66
|
+
emitAssetFromLoader(filename: string, source: JsCompatSource, assetInfo: JsAssetInfo, module: string): void
|
|
67
|
+
emitAsset(filename: string, source: JsCompatSource, assetInfo: JsAssetInfo): void
|
|
68
|
+
deleteAsset(filename: string): void
|
|
69
|
+
renameAsset(filename: string, newName: string): void
|
|
70
|
+
get entrypoints(): Record<string, JsChunkGroup>
|
|
71
|
+
get chunkGroups(): Array<JsChunkGroup>
|
|
72
|
+
get hash(): string | null
|
|
73
|
+
dependencies(): JsDependencies
|
|
74
|
+
pushDiagnostic(diagnostic: JsRspackDiagnostic): void
|
|
75
|
+
spliceDiagnostic(start: number, end: number, replaceWith: Array<JsRspackDiagnostic>): void
|
|
76
|
+
pushNativeDiagnostic(diagnostic: ExternalObject<'Diagnostic'>): void
|
|
77
|
+
pushNativeDiagnostics(diagnostics: ExternalObject<'Diagnostic[]'>): void
|
|
78
|
+
getErrors(): Array<JsRspackError>
|
|
79
|
+
getWarnings(): Array<JsRspackError>
|
|
80
|
+
getStats(): JsStats
|
|
81
|
+
getAssetPath(filename: LocalJsFilename, data: JsPathData): string
|
|
82
|
+
getAssetPathWithInfo(filename: LocalJsFilename, data: JsPathData): PathWithInfo
|
|
83
|
+
getPath(filename: LocalJsFilename, data: JsPathData): string
|
|
84
|
+
getPathWithInfo(filename: LocalJsFilename, data: JsPathData): PathWithInfo
|
|
85
|
+
addFileDependencies(deps: Array<string>): void
|
|
86
|
+
addContextDependencies(deps: Array<string>): void
|
|
87
|
+
addMissingDependencies(deps: Array<string>): void
|
|
88
|
+
addBuildDependencies(deps: Array<string>): void
|
|
89
|
+
/**
|
|
90
|
+
* This is a very unsafe function.
|
|
91
|
+
* Please don't use this at the moment.
|
|
92
|
+
* Using async and mutable reference to `Compilation` at the same time would likely to cause data races.
|
|
93
|
+
*/
|
|
94
|
+
rebuildModule(moduleIdentifiers: Array<string>, f: any): void
|
|
95
|
+
importModule(request: string, layer: string | undefined | null, publicPath: JsFilename | undefined | null, baseUri: string | undefined | null, originalModule: string | undefined | null, originalModuleContext: string | undefined | null, callback: any): void
|
|
96
|
+
get entries(): JsEntries
|
|
97
|
+
addRuntimeModule(chunkUkey: number, runtimeModule: JsAddingRuntimeModule): void
|
|
98
|
+
get moduleGraph(): JsModuleGraph
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export declare class JsContextModuleFactoryAfterResolveData {
|
|
102
|
+
get resource(): string
|
|
103
|
+
set resource(resource: string)
|
|
104
|
+
get context(): string
|
|
105
|
+
set context(context: string)
|
|
106
|
+
get request(): string
|
|
107
|
+
set request(request: string)
|
|
108
|
+
get regExp(): RegExp | undefined
|
|
109
|
+
set regExp(rawRegExp: RegExp | undefined)
|
|
110
|
+
get recursive(): boolean
|
|
111
|
+
set recursive(recursive: boolean)
|
|
112
|
+
get dependencies(): JsDependency[]
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export declare class JsContextModuleFactoryBeforeResolveData {
|
|
116
|
+
get context(): string
|
|
117
|
+
set context(context: string)
|
|
118
|
+
get request(): string
|
|
119
|
+
set request(request: string)
|
|
120
|
+
get regExp(): RegExp | undefined
|
|
121
|
+
set regExp(rawRegExp: RegExp | undefined)
|
|
122
|
+
get recursive(): boolean
|
|
123
|
+
set recursive(recursive: boolean)
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export declare class JsDependencies {
|
|
127
|
+
get fileDependencies(): Array<string>
|
|
128
|
+
get addedFileDependencies(): Array<string>
|
|
129
|
+
get removedFileDependencies(): Array<string>
|
|
130
|
+
get contextDependencies(): Array<string>
|
|
131
|
+
get addedContextDependencies(): Array<string>
|
|
132
|
+
get removedContextDependencies(): Array<string>
|
|
133
|
+
get missingDependencies(): Array<string>
|
|
134
|
+
get addedMissingDependencies(): Array<string>
|
|
135
|
+
get removedMissingDependencies(): Array<string>
|
|
136
|
+
get buildDependencies(): Array<string>
|
|
137
|
+
get addedBuildDependencies(): Array<string>
|
|
138
|
+
get removedBuildDependencies(): Array<string>
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export declare class JsDependenciesBlock {
|
|
142
|
+
get dependencies(): JsDependency[]
|
|
143
|
+
get blocks(): JsDependenciesBlock[]
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export declare class JsDependency {
|
|
147
|
+
get type(): string
|
|
148
|
+
get category(): string
|
|
149
|
+
get request(): string | undefined
|
|
150
|
+
get critical(): boolean
|
|
151
|
+
set critical(val: boolean)
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export declare class JsEntries {
|
|
155
|
+
clear(): void
|
|
156
|
+
get size(): number
|
|
157
|
+
has(key: string): boolean
|
|
158
|
+
set(key: string, value: JsEntryData | EntryDataDto): void
|
|
159
|
+
delete(key: string): boolean
|
|
160
|
+
get(key: string): EntryDataDto | undefined
|
|
161
|
+
keys(): Array<string>
|
|
162
|
+
values(): Array<EntryDataDto>
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export declare class JsModule {
|
|
166
|
+
get context(): string | undefined
|
|
167
|
+
get originalSource(): JsCompatSource | undefined
|
|
168
|
+
get resource(): string | undefined
|
|
169
|
+
get moduleIdentifier(): string
|
|
170
|
+
get nameForCondition(): string | undefined
|
|
171
|
+
get request(): string | undefined
|
|
172
|
+
get userRequest(): string | undefined
|
|
173
|
+
set userRequest(val: string)
|
|
174
|
+
get rawRequest(): string | undefined
|
|
175
|
+
get factoryMeta(): JsFactoryMeta | undefined
|
|
176
|
+
get type(): string
|
|
177
|
+
get layer(): string | undefined
|
|
178
|
+
get blocks(): JsDependenciesBlock[]
|
|
179
|
+
get dependencies(): JsDependency[]
|
|
180
|
+
size(ty?: string | undefined | null): number
|
|
181
|
+
get modules(): JsModule[] | undefined
|
|
182
|
+
get useSourceMap(): boolean
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export declare class JsModuleGraph {
|
|
186
|
+
getModule(jsDependency: JsDependency): JsModule | null
|
|
187
|
+
getUsedExports(jsModule: JsModule, jsRuntime: string | Array<string>): boolean | Array<string> | null
|
|
188
|
+
getIssuer(module: JsModule): JsModule | null
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export declare class JsResolver {
|
|
192
|
+
resolveSync(path: string, request: string): string | false
|
|
193
|
+
withOptions(raw?: RawResolveOptionsWithDependencyType | undefined | null): JsResolver
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export declare class JsResolverFactory {
|
|
197
|
+
constructor()
|
|
198
|
+
get(type: string, options?: RawResolveOptionsWithDependencyType): JsResolver
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export declare class JsStats {
|
|
202
|
+
toJson(jsOptions: JsStatsOptions): JsStatsCompilation
|
|
203
|
+
hasWarnings(): boolean
|
|
204
|
+
hasErrors(): boolean
|
|
205
|
+
getLogging(acceptedTypes: number): Array<JsStatsLogging>
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export declare class RawExternalItemFnCtx {
|
|
209
|
+
data(): RawExternalItemFnCtxData
|
|
210
|
+
getResolver(): JsResolver
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export declare class Rspack {
|
|
214
|
+
constructor(options: RawOptions, builtinPlugins: Array<BuiltinPlugin>, registerJsTaps: RegisterJsTaps, outputFilesystem: ThreadsafeNodeFS, intermediateFilesystem: ThreadsafeNodeFS, resolverFactoryReference: JsResolverFactory)
|
|
215
|
+
setNonSkippableRegisters(kinds: Array<RegisterJsTapKind>): void
|
|
216
|
+
/** Build with the given option passed to the constructor */
|
|
217
|
+
build(callback: (err: null | Error) => void): void
|
|
218
|
+
/** Rebuild with the given option passed to the constructor */
|
|
219
|
+
rebuild(changed_files: string[], removed_files: string[], callback: (err: null | Error) => void): void
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export declare function __chunk_graph_inner_get_chunk_entry_dependent_chunks_iterable(jsChunkUkey: number, jsCompilation: JsCompilation): Array<JsChunk>
|
|
223
|
+
|
|
224
|
+
export declare function __chunk_graph_inner_get_chunk_entry_modules(jsChunkUkey: number, jsCompilation: JsCompilation): JsModule[]
|
|
225
|
+
|
|
226
|
+
export declare function __chunk_graph_inner_get_chunk_modules(jsChunkUkey: number, jsCompilation: JsCompilation): JsModule[]
|
|
227
|
+
|
|
228
|
+
export declare function __chunk_graph_inner_get_chunk_modules_iterable_by_source_type(jsChunkUkey: number, sourceType: string, jsCompilation: JsCompilation): JsModule[]
|
|
229
|
+
|
|
230
|
+
export declare function __chunk_group_inner_get_chunk_group(ukey: number, jsCompilation: JsCompilation): JsChunkGroup
|
|
231
|
+
|
|
232
|
+
export declare function __chunk_inner_can_be_initial(jsChunkUkey: number, jsCompilation: JsCompilation): boolean
|
|
233
|
+
|
|
234
|
+
export declare function __chunk_inner_get_all_async_chunks(jsChunkUkey: number, jsCompilation: JsCompilation): Array<JsChunk>
|
|
235
|
+
|
|
236
|
+
export declare function __chunk_inner_get_all_initial_chunks(jsChunkUkey: number, jsCompilation: JsCompilation): Array<JsChunk>
|
|
237
|
+
|
|
238
|
+
export declare function __chunk_inner_get_all_referenced_chunks(jsChunkUkey: number, jsCompilation: JsCompilation): Array<JsChunk>
|
|
239
|
+
|
|
240
|
+
export declare function __chunk_inner_has_runtime(jsChunkUkey: number, jsCompilation: JsCompilation): boolean
|
|
241
|
+
|
|
242
|
+
export declare function __chunk_inner_is_only_initial(jsChunkUkey: number, jsCompilation: JsCompilation): boolean
|
|
243
|
+
|
|
244
|
+
export declare function __entrypoint_inner_get_runtime_chunk(ukey: number, jsCompilation: JsCompilation): JsChunk
|
|
245
|
+
|
|
246
|
+
export interface BuiltinPlugin {
|
|
247
|
+
name: BuiltinPluginName
|
|
248
|
+
options: unknown
|
|
249
|
+
canInherentFromParent?: boolean
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export declare enum BuiltinPluginName {
|
|
253
|
+
DefinePlugin = 'DefinePlugin',
|
|
254
|
+
ProvidePlugin = 'ProvidePlugin',
|
|
255
|
+
BannerPlugin = 'BannerPlugin',
|
|
256
|
+
IgnorePlugin = 'IgnorePlugin',
|
|
257
|
+
ProgressPlugin = 'ProgressPlugin',
|
|
258
|
+
EntryPlugin = 'EntryPlugin',
|
|
259
|
+
DynamicEntryPlugin = 'DynamicEntryPlugin',
|
|
260
|
+
ExternalsPlugin = 'ExternalsPlugin',
|
|
261
|
+
NodeTargetPlugin = 'NodeTargetPlugin',
|
|
262
|
+
ElectronTargetPlugin = 'ElectronTargetPlugin',
|
|
263
|
+
EnableChunkLoadingPlugin = 'EnableChunkLoadingPlugin',
|
|
264
|
+
EnableLibraryPlugin = 'EnableLibraryPlugin',
|
|
265
|
+
EnableWasmLoadingPlugin = 'EnableWasmLoadingPlugin',
|
|
266
|
+
FetchCompileAsyncWasmPlugin = 'FetchCompileAsyncWasmPlugin',
|
|
267
|
+
ChunkPrefetchPreloadPlugin = 'ChunkPrefetchPreloadPlugin',
|
|
268
|
+
CommonJsChunkFormatPlugin = 'CommonJsChunkFormatPlugin',
|
|
269
|
+
ArrayPushCallbackChunkFormatPlugin = 'ArrayPushCallbackChunkFormatPlugin',
|
|
270
|
+
ModuleChunkFormatPlugin = 'ModuleChunkFormatPlugin',
|
|
271
|
+
HotModuleReplacementPlugin = 'HotModuleReplacementPlugin',
|
|
272
|
+
LimitChunkCountPlugin = 'LimitChunkCountPlugin',
|
|
273
|
+
WorkerPlugin = 'WorkerPlugin',
|
|
274
|
+
WebWorkerTemplatePlugin = 'WebWorkerTemplatePlugin',
|
|
275
|
+
MergeDuplicateChunksPlugin = 'MergeDuplicateChunksPlugin',
|
|
276
|
+
SplitChunksPlugin = 'SplitChunksPlugin',
|
|
277
|
+
RemoveDuplicateModulesPlugin = 'RemoveDuplicateModulesPlugin',
|
|
278
|
+
ShareRuntimePlugin = 'ShareRuntimePlugin',
|
|
279
|
+
ContainerPlugin = 'ContainerPlugin',
|
|
280
|
+
ContainerReferencePlugin = 'ContainerReferencePlugin',
|
|
281
|
+
ProvideSharedPlugin = 'ProvideSharedPlugin',
|
|
282
|
+
ConsumeSharedPlugin = 'ConsumeSharedPlugin',
|
|
283
|
+
ModuleFederationRuntimePlugin = 'ModuleFederationRuntimePlugin',
|
|
284
|
+
NamedModuleIdsPlugin = 'NamedModuleIdsPlugin',
|
|
285
|
+
NaturalModuleIdsPlugin = 'NaturalModuleIdsPlugin',
|
|
286
|
+
DeterministicModuleIdsPlugin = 'DeterministicModuleIdsPlugin',
|
|
287
|
+
NaturalChunkIdsPlugin = 'NaturalChunkIdsPlugin',
|
|
288
|
+
NamedChunkIdsPlugin = 'NamedChunkIdsPlugin',
|
|
289
|
+
DeterministicChunkIdsPlugin = 'DeterministicChunkIdsPlugin',
|
|
290
|
+
RealContentHashPlugin = 'RealContentHashPlugin',
|
|
291
|
+
RemoveEmptyChunksPlugin = 'RemoveEmptyChunksPlugin',
|
|
292
|
+
EnsureChunkConditionsPlugin = 'EnsureChunkConditionsPlugin',
|
|
293
|
+
WarnCaseSensitiveModulesPlugin = 'WarnCaseSensitiveModulesPlugin',
|
|
294
|
+
DataUriPlugin = 'DataUriPlugin',
|
|
295
|
+
FileUriPlugin = 'FileUriPlugin',
|
|
296
|
+
RuntimePlugin = 'RuntimePlugin',
|
|
297
|
+
JsonModulesPlugin = 'JsonModulesPlugin',
|
|
298
|
+
InferAsyncModulesPlugin = 'InferAsyncModulesPlugin',
|
|
299
|
+
JavascriptModulesPlugin = 'JavascriptModulesPlugin',
|
|
300
|
+
AsyncWebAssemblyModulesPlugin = 'AsyncWebAssemblyModulesPlugin',
|
|
301
|
+
AssetModulesPlugin = 'AssetModulesPlugin',
|
|
302
|
+
SourceMapDevToolPlugin = 'SourceMapDevToolPlugin',
|
|
303
|
+
EvalSourceMapDevToolPlugin = 'EvalSourceMapDevToolPlugin',
|
|
304
|
+
EvalDevToolModulePlugin = 'EvalDevToolModulePlugin',
|
|
305
|
+
SideEffectsFlagPlugin = 'SideEffectsFlagPlugin',
|
|
306
|
+
FlagDependencyExportsPlugin = 'FlagDependencyExportsPlugin',
|
|
307
|
+
FlagDependencyUsagePlugin = 'FlagDependencyUsagePlugin',
|
|
308
|
+
MangleExportsPlugin = 'MangleExportsPlugin',
|
|
309
|
+
ModuleConcatenationPlugin = 'ModuleConcatenationPlugin',
|
|
310
|
+
CssModulesPlugin = 'CssModulesPlugin',
|
|
311
|
+
APIPlugin = 'APIPlugin',
|
|
312
|
+
RuntimeChunkPlugin = 'RuntimeChunkPlugin',
|
|
313
|
+
SizeLimitsPlugin = 'SizeLimitsPlugin',
|
|
314
|
+
NoEmitOnErrorsPlugin = 'NoEmitOnErrorsPlugin',
|
|
315
|
+
ContextReplacementPlugin = 'ContextReplacementPlugin',
|
|
316
|
+
DllEntryPlugin = 'DllEntryPlugin',
|
|
317
|
+
DllReferenceAgencyPlugin = 'DllReferenceAgencyPlugin',
|
|
318
|
+
LibManifestPlugin = 'LibManifestPlugin',
|
|
319
|
+
FlagAllModulesAsUsedPlugin = 'FlagAllModulesAsUsedPlugin',
|
|
320
|
+
HttpExternalsRspackPlugin = 'HttpExternalsRspackPlugin',
|
|
321
|
+
CopyRspackPlugin = 'CopyRspackPlugin',
|
|
322
|
+
HtmlRspackPlugin = 'HtmlRspackPlugin',
|
|
323
|
+
SwcJsMinimizerRspackPlugin = 'SwcJsMinimizerRspackPlugin',
|
|
324
|
+
LightningCssMinimizerRspackPlugin = 'LightningCssMinimizerRspackPlugin',
|
|
325
|
+
BundlerInfoRspackPlugin = 'BundlerInfoRspackPlugin',
|
|
326
|
+
CssExtractRspackPlugin = 'CssExtractRspackPlugin',
|
|
327
|
+
JsLoaderRspackPlugin = 'JsLoaderRspackPlugin',
|
|
328
|
+
LazyCompilationPlugin = 'LazyCompilationPlugin'
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export declare function cleanupGlobalTrace(): void
|
|
332
|
+
|
|
333
|
+
export interface ContextInfo {
|
|
334
|
+
issuer: string
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export declare function formatDiagnostic(diagnostic: JsDiagnostic): ExternalObject<'Diagnostic'>
|
|
338
|
+
|
|
339
|
+
export interface JsAddingRuntimeModule {
|
|
340
|
+
name: string
|
|
341
|
+
generator: () => String
|
|
342
|
+
dependentHash: boolean
|
|
343
|
+
fullHash: boolean
|
|
344
|
+
isolate: boolean
|
|
345
|
+
stage: number
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
export interface JsAdditionalTreeRuntimeRequirementsArg {
|
|
349
|
+
chunk: JsChunk
|
|
350
|
+
runtimeRequirements: JsRuntimeGlobals
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
export interface JsAdditionalTreeRuntimeRequirementsResult {
|
|
354
|
+
runtimeRequirements: JsRuntimeGlobals
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
export interface JsAfterEmitData {
|
|
358
|
+
outputName: string
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
export interface JsAfterResolveData {
|
|
362
|
+
request: string
|
|
363
|
+
context: string
|
|
364
|
+
issuer: string
|
|
365
|
+
fileDependencies: Array<string>
|
|
366
|
+
contextDependencies: Array<string>
|
|
367
|
+
missingDependencies: Array<string>
|
|
368
|
+
createData?: JsCreateData
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
export interface JsAfterTemplateExecutionData {
|
|
372
|
+
html: string
|
|
373
|
+
headTags: Array<JsHtmlPluginTag>
|
|
374
|
+
bodyTags: Array<JsHtmlPluginTag>
|
|
375
|
+
outputName: string
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
export interface JsAlterAssetTagGroupsData {
|
|
379
|
+
headTags: Array<JsHtmlPluginTag>
|
|
380
|
+
bodyTags: Array<JsHtmlPluginTag>
|
|
381
|
+
publicPath: string
|
|
382
|
+
outputName: string
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
export interface JsAlterAssetTagsData {
|
|
386
|
+
assetTags: JsHtmlPluginAssetTags
|
|
387
|
+
outputName: string
|
|
388
|
+
publicPath: string
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
export interface JsAsset {
|
|
392
|
+
name: string
|
|
393
|
+
info: JsAssetInfo
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
export interface JsAssetEmittedArgs {
|
|
397
|
+
filename: string
|
|
398
|
+
outputPath: string
|
|
399
|
+
targetPath: string
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
export interface JsAssetInfo {
|
|
403
|
+
/** if the asset can be long term cached forever (contains a hash) */
|
|
404
|
+
immutable?: boolean
|
|
405
|
+
/** whether the asset is minimized */
|
|
406
|
+
minimized?: boolean
|
|
407
|
+
/** the value(s) of the full hash used for this asset */
|
|
408
|
+
fullhash: Array<string>
|
|
409
|
+
/** the value(s) of the chunk hash used for this asset */
|
|
410
|
+
chunkhash: Array<string>
|
|
411
|
+
/**
|
|
412
|
+
* the value(s) of the module hash used for this asset
|
|
413
|
+
* the value(s) of the content hash used for this asset
|
|
414
|
+
*/
|
|
415
|
+
contenthash: Array<string>
|
|
416
|
+
sourceFilename?: string
|
|
417
|
+
/** when asset was created from a source file (potentially transformed), it should be flagged as copied */
|
|
418
|
+
copied?: boolean
|
|
419
|
+
/**
|
|
420
|
+
* size in bytes, only set after asset has been emitted
|
|
421
|
+
* when asset is only used for development and doesn't count towards user-facing assets
|
|
422
|
+
*/
|
|
423
|
+
development?: boolean
|
|
424
|
+
/** when asset ships data for updating an existing application (HMR) */
|
|
425
|
+
hotModuleReplacement?: boolean
|
|
426
|
+
/** when asset is javascript and an ESM */
|
|
427
|
+
javascriptModule?: boolean
|
|
428
|
+
/** related object to other assets, keyed by type of relation (only points from parent to child) */
|
|
429
|
+
related: JsAssetInfoRelated
|
|
430
|
+
/** unused css local ident for the css chunk */
|
|
431
|
+
cssUnusedIdents?: Array<string>
|
|
432
|
+
/**
|
|
433
|
+
* Webpack: AssetInfo = KnownAssetInfo & Record<string, any>
|
|
434
|
+
* But Napi.rs does not support Intersectiont types. This is a hack to store the additional fields
|
|
435
|
+
* in the rust struct and have the Js side to reshape and align with webpack
|
|
436
|
+
* Related: packages/rspack/src/Compilation.ts
|
|
437
|
+
*/
|
|
438
|
+
extras: Record<string, any>
|
|
439
|
+
/** whether this asset is over the size limit */
|
|
440
|
+
isOverSizeLimit?: boolean
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
export interface JsAssetInfoRelated {
|
|
444
|
+
sourceMap?: string
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
export interface JsBeforeAssetTagGenerationData {
|
|
448
|
+
assets: JsHtmlPluginAssets
|
|
449
|
+
outputName: string
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
export interface JsBeforeEmitData {
|
|
453
|
+
html: string
|
|
454
|
+
outputName: string
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
export interface JsBeforeResolveArgs {
|
|
458
|
+
request: string
|
|
459
|
+
context: string
|
|
460
|
+
issuer: string
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
export interface JsBuildMeta {
|
|
464
|
+
strictEsmModule: boolean
|
|
465
|
+
hasTopLevelAwait: boolean
|
|
466
|
+
esm: boolean
|
|
467
|
+
exportsType: 'unset' | 'default' | 'namespace' | 'flagged' | 'dynamic'
|
|
468
|
+
defaultObject: 'false' | 'redirect' | JsBuildMetaDefaultObjectRedirectWarn
|
|
469
|
+
moduleArgument: 'module' | 'webpackModule'
|
|
470
|
+
exportsArgument: 'exports' | 'webpackExports'
|
|
471
|
+
sideEffectFree?: boolean
|
|
472
|
+
exportsFinalName?: Array<[string, string]> | undefined
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
export interface JsBuildMetaDefaultObjectRedirectWarn {
|
|
476
|
+
redirectWarn: JsDefaultObjectRedirectWarnObject
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
export interface JsBuildTimeExecutionOption {
|
|
480
|
+
publicPath?: string
|
|
481
|
+
baseUri?: string
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
export interface JsCacheGroupTestCtx {
|
|
485
|
+
module: JsModule
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
export interface JsChunk {
|
|
489
|
+
__inner_ukey: number
|
|
490
|
+
__inner_groups: Array<number>
|
|
491
|
+
name?: string
|
|
492
|
+
id?: string
|
|
493
|
+
ids: Array<string>
|
|
494
|
+
idNameHints: Array<string>
|
|
495
|
+
filenameTemplate?: string
|
|
496
|
+
cssFilenameTemplate?: string
|
|
497
|
+
files: Array<string>
|
|
498
|
+
runtime: Array<string>
|
|
499
|
+
hash?: string
|
|
500
|
+
contentHash: Record<string, string>
|
|
501
|
+
renderedHash?: string
|
|
502
|
+
chunkReason?: string
|
|
503
|
+
auxiliaryFiles: Array<string>
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
export interface JsChunkAssetArgs {
|
|
507
|
+
chunk: JsChunk
|
|
508
|
+
filename: string
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
export interface JsChunkGroup {
|
|
512
|
+
__inner_parents: Array<number>
|
|
513
|
+
__inner_ukey: number
|
|
514
|
+
chunks: Array<JsChunk>
|
|
515
|
+
index?: number
|
|
516
|
+
name?: string
|
|
517
|
+
isInitial: boolean
|
|
518
|
+
origins: Array<JsChunkGroupOrigin>
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
export interface JsChunkGroupOrigin {
|
|
522
|
+
module?: JsModule | undefined
|
|
523
|
+
request?: string
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* File clean options
|
|
528
|
+
*
|
|
529
|
+
* This matches with:
|
|
530
|
+
* - keep:
|
|
531
|
+
* - If a string, keep the files under this path
|
|
532
|
+
*/
|
|
533
|
+
export interface JsCleanOptions {
|
|
534
|
+
keep?: string
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
export interface JsCodegenerationResult {
|
|
538
|
+
sources: Record<string, string>
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
export interface JsCodegenerationResults {
|
|
542
|
+
map: Record<string, Record<string, JsCodegenerationResult>>
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* Zero copy `JsCompatSource` slice shared between Rust and Node.js if buffer is used.
|
|
547
|
+
*
|
|
548
|
+
* It can only be used in non-async context and the lifetime is bound to the fn closure.
|
|
549
|
+
*
|
|
550
|
+
* If you want to use Node.js Buffer in async context or want to extend the lifetime, use `JsCompatSourceOwned` instead.
|
|
551
|
+
*/
|
|
552
|
+
export interface JsCompatSource {
|
|
553
|
+
source: string | Buffer
|
|
554
|
+
map?: string
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
export interface JsCompatSourceOwned {
|
|
558
|
+
source: string | Buffer
|
|
559
|
+
map?: string
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
export interface JsCreateData {
|
|
563
|
+
request: string
|
|
564
|
+
userRequest: string
|
|
565
|
+
resource: string
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
export interface JsDefaultObjectRedirectWarnObject {
|
|
569
|
+
ignore: boolean
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
export interface JsDiagnostic {
|
|
573
|
+
message: string
|
|
574
|
+
help?: string
|
|
575
|
+
sourceCode?: string
|
|
576
|
+
location?: JsDiagnosticLocation
|
|
577
|
+
file?: string
|
|
578
|
+
severity: "error" | "warning"
|
|
579
|
+
moduleIdentifier?: string
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
export interface JsDiagnosticLocation {
|
|
583
|
+
text?: string
|
|
584
|
+
/** 1-based */
|
|
585
|
+
line: number
|
|
586
|
+
/** 0-based in bytes */
|
|
587
|
+
column: number
|
|
588
|
+
/** Length in bytes */
|
|
589
|
+
length: number
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
export interface JsEntryData {
|
|
593
|
+
dependencies: Array<JsDependency>
|
|
594
|
+
includeDependencies: Array<JsDependency>
|
|
595
|
+
options: JsEntryOptions
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
export interface JsEntryOptions {
|
|
599
|
+
name?: string
|
|
600
|
+
runtime?: false | string
|
|
601
|
+
chunkLoading?: string
|
|
602
|
+
asyncChunks?: boolean
|
|
603
|
+
publicPath?: "auto" | JsFilename
|
|
604
|
+
baseUri?: string
|
|
605
|
+
filename?: JsFilename
|
|
606
|
+
library?: JsLibraryOptions
|
|
607
|
+
dependOn?: Array<string>
|
|
608
|
+
layer?: string
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
export interface JsEntryPluginOptions {
|
|
612
|
+
context: string
|
|
613
|
+
entry: string
|
|
614
|
+
options: JsEntryOptions
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
export interface JsExecuteModuleArg {
|
|
618
|
+
entry: string
|
|
619
|
+
runtimeModules: Array<string>
|
|
620
|
+
codegenResults: JsCodegenerationResults
|
|
621
|
+
id: number
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
export interface JsExecuteModuleResult {
|
|
625
|
+
fileDependencies: Array<string>
|
|
626
|
+
contextDependencies: Array<string>
|
|
627
|
+
buildDependencies: Array<string>
|
|
628
|
+
missingDependencies: Array<string>
|
|
629
|
+
cacheable: boolean
|
|
630
|
+
assets: Array<string>
|
|
631
|
+
id: number
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
export interface JsFactorizeArgs {
|
|
635
|
+
request: string
|
|
636
|
+
context: string
|
|
637
|
+
issuer: string
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
export interface JsFactoryMeta {
|
|
641
|
+
sideEffectFree?: boolean
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
export interface JsHtmlPluginAssets {
|
|
645
|
+
publicPath: string
|
|
646
|
+
js: Array<string>
|
|
647
|
+
css: Array<string>
|
|
648
|
+
favicon?: string
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
export interface JsHtmlPluginAssetTags {
|
|
652
|
+
scripts: Array<JsHtmlPluginTag>
|
|
653
|
+
styles: Array<JsHtmlPluginTag>
|
|
654
|
+
meta: Array<JsHtmlPluginTag>
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
export interface JsHtmlPluginTag {
|
|
658
|
+
tagName: string
|
|
659
|
+
attributes: Record<string, string | boolean | undefined | null>
|
|
660
|
+
voidTag: boolean
|
|
661
|
+
innerHTML?: string
|
|
662
|
+
asset?: string
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
export interface JsLibraryAuxiliaryComment {
|
|
666
|
+
root?: string
|
|
667
|
+
commonjs?: string
|
|
668
|
+
commonjs2?: string
|
|
669
|
+
amd?: string
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
export interface JsLibraryCustomUmdObject {
|
|
673
|
+
amd?: string
|
|
674
|
+
commonjs?: string
|
|
675
|
+
root?: Array<string>
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
export interface JsLibraryName {
|
|
679
|
+
type: "string" | "array" | "umdObject"
|
|
680
|
+
stringPayload?: string
|
|
681
|
+
arrayPayload?: Array<string>
|
|
682
|
+
umdObjectPayload?: JsLibraryCustomUmdObject
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
export interface JsLibraryOptions {
|
|
686
|
+
name?: JsLibraryName
|
|
687
|
+
export?: Array<string>
|
|
688
|
+
libraryType: string
|
|
689
|
+
umdNamedDefine?: boolean
|
|
690
|
+
auxiliaryComment?: JsLibraryAuxiliaryComment
|
|
691
|
+
amdContainer?: string
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
export interface JsLoaderContext {
|
|
695
|
+
resourceData: Readonly<JsResourceData>
|
|
696
|
+
/** Will be deprecated. Use module.module_identifier instead */
|
|
697
|
+
_moduleIdentifier: Readonly<string>
|
|
698
|
+
_module: JsModule
|
|
699
|
+
hot: Readonly<boolean>
|
|
700
|
+
/** Content maybe empty in pitching stage */
|
|
701
|
+
content: null | Buffer
|
|
702
|
+
additionalData?: any
|
|
703
|
+
__internal__parseMeta: Record<string, string>
|
|
704
|
+
sourceMap?: Buffer
|
|
705
|
+
cacheable: boolean
|
|
706
|
+
fileDependencies: Array<string>
|
|
707
|
+
contextDependencies: Array<string>
|
|
708
|
+
missingDependencies: Array<string>
|
|
709
|
+
buildDependencies: Array<string>
|
|
710
|
+
loaderItems: Array<JsLoaderItem>
|
|
711
|
+
loaderIndex: number
|
|
712
|
+
loaderState: Readonly<JsLoaderState>
|
|
713
|
+
__internal__error?: JsRspackError
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
export interface JsLoaderItem {
|
|
717
|
+
request: string
|
|
718
|
+
type: string
|
|
719
|
+
data: any
|
|
720
|
+
normalExecuted: boolean
|
|
721
|
+
pitchExecuted: boolean
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
export declare enum JsLoaderState {
|
|
725
|
+
Pitching = 'Pitching',
|
|
726
|
+
Normal = 'Normal'
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
export interface JsModuleDescriptor {
|
|
730
|
+
identifier: string
|
|
731
|
+
name: string
|
|
732
|
+
id?: string
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
export interface JsNormalModuleFactoryCreateModuleArgs {
|
|
736
|
+
dependencyType: string
|
|
737
|
+
rawRequest: string
|
|
738
|
+
resourceResolveData: JsResourceData
|
|
739
|
+
context: string
|
|
740
|
+
matchResource?: string
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
export interface JsOriginRecord {
|
|
744
|
+
moduleDescriptor?: JsModuleDescriptor
|
|
745
|
+
loc: string
|
|
746
|
+
request: string
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
export interface JsPathData {
|
|
750
|
+
filename?: string
|
|
751
|
+
hash?: string
|
|
752
|
+
contentHash?: string
|
|
753
|
+
runtime?: string
|
|
754
|
+
url?: string
|
|
755
|
+
id?: string
|
|
756
|
+
chunk?: JsPathDataChunkLike
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
export interface JsPathDataChunkLike {
|
|
760
|
+
name?: string
|
|
761
|
+
hash?: string
|
|
762
|
+
id?: string
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
export interface JsResolveArgs {
|
|
766
|
+
request: string
|
|
767
|
+
context: string
|
|
768
|
+
issuer: string
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
export interface JsResolveForSchemeArgs {
|
|
772
|
+
resourceData: JsResourceData
|
|
773
|
+
scheme: string
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
export interface JsResourceData {
|
|
777
|
+
/** Resource with absolute path, query and fragment */
|
|
778
|
+
resource: string
|
|
779
|
+
/** Absolute resource path only */
|
|
780
|
+
path?: string
|
|
781
|
+
/** Resource query with `?` prefix */
|
|
782
|
+
query?: string
|
|
783
|
+
/** Resource fragment with `#` prefix */
|
|
784
|
+
fragment?: string
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
export interface JsRspackDiagnostic {
|
|
788
|
+
severity: JsRspackSeverity
|
|
789
|
+
error: JsRspackError
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
export interface JsRspackError {
|
|
793
|
+
name: string
|
|
794
|
+
message: string
|
|
795
|
+
moduleIdentifier?: string
|
|
796
|
+
loc?: string
|
|
797
|
+
file?: string
|
|
798
|
+
stack?: string
|
|
799
|
+
hideStack?: boolean
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
export declare enum JsRspackSeverity {
|
|
803
|
+
Error = 'Error',
|
|
804
|
+
Warn = 'Warn'
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
export interface JsRuntimeGlobals {
|
|
808
|
+
value: Array<string>
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
export interface JsRuntimeModule {
|
|
812
|
+
source?: JsCompatSourceOwned
|
|
813
|
+
moduleIdentifier: string
|
|
814
|
+
constructorName: string
|
|
815
|
+
name: string
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
export interface JsRuntimeModuleArg {
|
|
819
|
+
module: JsRuntimeModule
|
|
820
|
+
chunk: JsChunk
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
export interface JsRuntimeRequirementInTreeArg {
|
|
824
|
+
chunk: JsChunk
|
|
825
|
+
runtimeRequirements: JsRuntimeGlobals
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
export interface JsRuntimeRequirementInTreeResult {
|
|
829
|
+
runtimeRequirements: JsRuntimeGlobals
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
export interface JsStatsAsset {
|
|
833
|
+
type: string
|
|
834
|
+
name: string
|
|
835
|
+
info: JsStatsAssetInfo
|
|
836
|
+
size: number
|
|
837
|
+
emitted: boolean
|
|
838
|
+
chunkNames: Array<string>
|
|
839
|
+
chunkIdHints: Array<string>
|
|
840
|
+
chunks: Array<string | undefined | null>
|
|
841
|
+
auxiliaryChunkNames: Array<string>
|
|
842
|
+
auxiliaryChunkIdHints: Array<string>
|
|
843
|
+
auxiliaryChunks: Array<string | undefined | null>
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
export interface JsStatsAssetInfo {
|
|
847
|
+
minimized?: boolean
|
|
848
|
+
development?: boolean
|
|
849
|
+
hotModuleReplacement?: boolean
|
|
850
|
+
sourceFilename?: string
|
|
851
|
+
copied?: boolean
|
|
852
|
+
immutable?: boolean
|
|
853
|
+
javascriptModule?: boolean
|
|
854
|
+
chunkhash: Array<string>
|
|
855
|
+
contenthash: Array<string>
|
|
856
|
+
fullhash: Array<string>
|
|
857
|
+
related: Array<JsStatsAssetInfoRelated>
|
|
858
|
+
isOverSizeLimit?: boolean
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
export interface JsStatsAssetInfoRelated {
|
|
862
|
+
name: string
|
|
863
|
+
value: Array<string>
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
export interface JsStatsAssetsByChunkName {
|
|
867
|
+
name: string
|
|
868
|
+
files: Array<string>
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
export interface JsStatsChildGroupChildAssets {
|
|
872
|
+
preload?: Array<string>
|
|
873
|
+
prefetch?: Array<string>
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
export interface JsStatsChunk {
|
|
877
|
+
type: string
|
|
878
|
+
files: Array<string>
|
|
879
|
+
auxiliaryFiles: Array<string>
|
|
880
|
+
id?: string
|
|
881
|
+
idHints: Array<string>
|
|
882
|
+
hash?: string
|
|
883
|
+
entry: boolean
|
|
884
|
+
initial: boolean
|
|
885
|
+
names: Array<string>
|
|
886
|
+
size: number
|
|
887
|
+
parents?: Array<string>
|
|
888
|
+
children?: Array<string>
|
|
889
|
+
siblings?: Array<string>
|
|
890
|
+
childrenByOrder: Record<string, Array<string>>
|
|
891
|
+
runtime: Array<string>
|
|
892
|
+
reason?: string
|
|
893
|
+
rendered: boolean
|
|
894
|
+
sizes: Array<JsStatsSize>
|
|
895
|
+
origins: Array<JsOriginRecord>
|
|
896
|
+
modules?: Array<JsStatsModule>
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
export interface JsStatsChunkGroup {
|
|
900
|
+
name: string
|
|
901
|
+
chunks: Array<string>
|
|
902
|
+
assets: Array<JsStatsChunkGroupAsset>
|
|
903
|
+
assetsSize: number
|
|
904
|
+
auxiliaryAssets?: Array<JsStatsChunkGroupAsset>
|
|
905
|
+
auxiliaryAssetsSize?: number
|
|
906
|
+
isOverSizeLimit?: boolean
|
|
907
|
+
children?: JsStatsChunkGroupChildren
|
|
908
|
+
childAssets?: JsStatsChildGroupChildAssets
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
export interface JsStatsChunkGroupAsset {
|
|
912
|
+
name: string
|
|
913
|
+
size: number
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
export interface JsStatsChunkGroupChildren {
|
|
917
|
+
preload?: Array<JsStatsChunkGroup>
|
|
918
|
+
prefetch?: Array<JsStatsChunkGroup>
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
export interface JsStatsCompilation {
|
|
922
|
+
assets?: Array<JsStatsAsset>
|
|
923
|
+
assetsByChunkName?: Array<JsStatsAssetsByChunkName>
|
|
924
|
+
chunks?: Array<JsStatsChunk>
|
|
925
|
+
entrypoints?: Array<JsStatsChunkGroup>
|
|
926
|
+
errors: Array<JsStatsError>
|
|
927
|
+
hash?: string
|
|
928
|
+
modules?: Array<JsStatsModule>
|
|
929
|
+
namedChunkGroups?: Array<JsStatsChunkGroup>
|
|
930
|
+
warnings: Array<JsStatsWarning>
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
export interface JsStatsError {
|
|
934
|
+
moduleDescriptor?: JsModuleDescriptor
|
|
935
|
+
message: string
|
|
936
|
+
chunkName?: string
|
|
937
|
+
chunkEntry?: boolean
|
|
938
|
+
chunkInitial?: boolean
|
|
939
|
+
loc?: string
|
|
940
|
+
file?: string
|
|
941
|
+
chunkId?: string
|
|
942
|
+
details?: string
|
|
943
|
+
stack?: string
|
|
944
|
+
moduleTrace: Array<JsStatsModuleTrace>
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
export interface JsStatsGetAssets {
|
|
948
|
+
assets: Array<JsStatsAsset>
|
|
949
|
+
assetsByChunkName: Array<JsStatsAssetsByChunkName>
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
export interface JsStatsLogging {
|
|
953
|
+
name: string
|
|
954
|
+
type: string
|
|
955
|
+
args?: Array<string>
|
|
956
|
+
trace?: Array<string>
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
export interface JsStatsMillisecond {
|
|
960
|
+
secs: number
|
|
961
|
+
subsecMillis: number
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
export interface JsStatsModule {
|
|
965
|
+
commonAttributes: JsStatsModuleCommonAttributes
|
|
966
|
+
dependent?: boolean
|
|
967
|
+
issuerDescriptor?: JsModuleDescriptor
|
|
968
|
+
issuerPath?: Array<JsStatsModuleIssuer>
|
|
969
|
+
usedExports?: string | Array<string>
|
|
970
|
+
modules?: Array<JsStatsModule>
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
export interface JsStatsModuleCommonAttributes {
|
|
974
|
+
type: string
|
|
975
|
+
moduleType: string
|
|
976
|
+
layer?: string
|
|
977
|
+
size: number
|
|
978
|
+
sizes: Array<JsStatsSize>
|
|
979
|
+
built: boolean
|
|
980
|
+
codeGenerated: boolean
|
|
981
|
+
buildTimeExecuted: boolean
|
|
982
|
+
cached: boolean
|
|
983
|
+
moduleDescriptor?: JsModuleDescriptor
|
|
984
|
+
nameForCondition?: string
|
|
985
|
+
preOrderIndex?: number
|
|
986
|
+
postOrderIndex?: number
|
|
987
|
+
cacheable?: boolean
|
|
988
|
+
optional?: boolean
|
|
989
|
+
orphan?: boolean
|
|
990
|
+
failed?: boolean
|
|
991
|
+
errors?: number
|
|
992
|
+
warnings?: number
|
|
993
|
+
profile?: JsStatsModuleProfile
|
|
994
|
+
chunks?: Array<string>
|
|
995
|
+
assets?: Array<string>
|
|
996
|
+
reasons?: Array<JsStatsModuleReason>
|
|
997
|
+
providedExports?: Array<string>
|
|
998
|
+
optimizationBailout?: Array<string>
|
|
999
|
+
depth?: number
|
|
1000
|
+
source?: string | Buffer
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
export interface JsStatsModuleIssuer {
|
|
1004
|
+
moduleDescriptor: JsModuleDescriptor
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
export interface JsStatsModuleProfile {
|
|
1008
|
+
factory: JsStatsMillisecond
|
|
1009
|
+
building: JsStatsMillisecond
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
export interface JsStatsModuleReason {
|
|
1013
|
+
moduleDescriptor?: JsModuleDescriptor
|
|
1014
|
+
resolvedModuleDescriptor?: JsModuleDescriptor
|
|
1015
|
+
moduleChunks?: number
|
|
1016
|
+
type?: string
|
|
1017
|
+
userRequest?: string
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
export interface JsStatsModuleTrace {
|
|
1021
|
+
origin: JsStatsModuleTraceModule
|
|
1022
|
+
module: JsStatsModuleTraceModule
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
export interface JsStatsModuleTraceModule {
|
|
1026
|
+
moduleDescriptor: JsModuleDescriptor
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
export interface JsStatsOptimizationBailout {
|
|
1030
|
+
inner: string
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
export interface JsStatsOptions {
|
|
1034
|
+
assets: boolean
|
|
1035
|
+
cachedModules: boolean
|
|
1036
|
+
chunks: boolean
|
|
1037
|
+
chunkGroupAuxiliary: boolean
|
|
1038
|
+
chunkGroupChildren: boolean
|
|
1039
|
+
chunkGroups: boolean
|
|
1040
|
+
chunkModules: boolean
|
|
1041
|
+
chunkRelations: boolean
|
|
1042
|
+
depth: boolean
|
|
1043
|
+
entrypoints: boolean | string
|
|
1044
|
+
errors: boolean
|
|
1045
|
+
hash: boolean
|
|
1046
|
+
ids: boolean
|
|
1047
|
+
modules: boolean
|
|
1048
|
+
moduleAssets: boolean
|
|
1049
|
+
nestedModules: boolean
|
|
1050
|
+
optimizationBailout: boolean
|
|
1051
|
+
providedExports: boolean
|
|
1052
|
+
reasons: boolean
|
|
1053
|
+
source: boolean
|
|
1054
|
+
usedExports: boolean
|
|
1055
|
+
warnings: boolean
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
export interface JsStatsSize {
|
|
1059
|
+
sourceType: string
|
|
1060
|
+
size: number
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
export interface JsStatsWarning {
|
|
1064
|
+
moduleDescriptor?: JsModuleDescriptor
|
|
1065
|
+
message: string
|
|
1066
|
+
chunkName?: string
|
|
1067
|
+
chunkEntry?: boolean
|
|
1068
|
+
chunkInitial?: boolean
|
|
1069
|
+
file?: string
|
|
1070
|
+
chunkId?: string
|
|
1071
|
+
details?: string
|
|
1072
|
+
stack?: string
|
|
1073
|
+
moduleTrace: Array<JsStatsModuleTrace>
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
export interface JsTap {
|
|
1077
|
+
function: any
|
|
1078
|
+
stage: number
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
export interface NodeFsStats {
|
|
1082
|
+
isFile: boolean
|
|
1083
|
+
isDirectory: boolean
|
|
1084
|
+
atimeMs: number
|
|
1085
|
+
mtimeMs: number
|
|
1086
|
+
ctimeMs: number
|
|
1087
|
+
birthtimeMs: number
|
|
1088
|
+
size: number
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
export interface PathWithInfo {
|
|
1092
|
+
path: string
|
|
1093
|
+
info: JsAssetInfo
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
export interface RawAliasOptionItem {
|
|
1097
|
+
path: string
|
|
1098
|
+
redirect: Array<string | false>
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
export interface RawAssetGeneratorDataUrlFnArgs {
|
|
1102
|
+
filename: string
|
|
1103
|
+
content: string
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
export interface RawAssetGeneratorDataUrlOptions {
|
|
1107
|
+
encoding?: "base64" | "false" | undefined
|
|
1108
|
+
mimetype?: string
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
export interface RawAssetGeneratorOptions {
|
|
1112
|
+
emit?: boolean
|
|
1113
|
+
filename?: JsFilename
|
|
1114
|
+
publicPath?: "auto" | JsFilename
|
|
1115
|
+
dataUrl?: RawAssetGeneratorDataUrlOptions | ((arg: RawAssetGeneratorDataUrlFnArgs) => string)
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
export interface RawAssetInlineGeneratorOptions {
|
|
1119
|
+
dataUrl?: RawAssetGeneratorDataUrlOptions | ((arg: RawAssetGeneratorDataUrlFnArgs) => string)
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
export interface RawAssetParserDataUrl {
|
|
1123
|
+
type: "options"
|
|
1124
|
+
options?: RawAssetParserDataUrlOptions
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
export interface RawAssetParserDataUrlOptions {
|
|
1128
|
+
maxSize?: number
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
export interface RawAssetParserOptions {
|
|
1132
|
+
dataUrlCondition?: RawAssetParserDataUrl
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
export interface RawAssetResourceGeneratorOptions {
|
|
1136
|
+
emit?: boolean
|
|
1137
|
+
filename?: JsFilename
|
|
1138
|
+
publicPath?: "auto" | JsFilename
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
export interface RawBannerContentFnCtx {
|
|
1142
|
+
hash: string
|
|
1143
|
+
chunk: JsChunk
|
|
1144
|
+
filename: string
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
export interface RawBannerPluginOptions {
|
|
1148
|
+
banner: string | ((...args: any[]) => any)
|
|
1149
|
+
entryOnly?: boolean
|
|
1150
|
+
footer?: boolean
|
|
1151
|
+
raw?: boolean
|
|
1152
|
+
stage?: number
|
|
1153
|
+
test?: string | RegExp | (string | RegExp)[]
|
|
1154
|
+
include?: string | RegExp | (string | RegExp)[]
|
|
1155
|
+
exclude?: string | RegExp | (string | RegExp)[]
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
export interface RawBundlerInfoPluginOptions {
|
|
1159
|
+
version: string
|
|
1160
|
+
bundler: string
|
|
1161
|
+
force: boolean | string[]
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
export interface RawCacheGroupOptions {
|
|
1165
|
+
key: string
|
|
1166
|
+
priority?: number
|
|
1167
|
+
test?: RegExp | string | Function
|
|
1168
|
+
filename?: string
|
|
1169
|
+
idHint?: string
|
|
1170
|
+
/** What kind of chunks should be selected. */
|
|
1171
|
+
chunks?: RegExp | 'async' | 'initial' | 'all'
|
|
1172
|
+
type?: RegExp | string
|
|
1173
|
+
layer?: RegExp | string
|
|
1174
|
+
automaticNameDelimiter?: string
|
|
1175
|
+
minChunks?: number
|
|
1176
|
+
minSize?: number | RawSplitChunkSizes
|
|
1177
|
+
maxSize?: number | RawSplitChunkSizes
|
|
1178
|
+
maxAsyncSize?: number | RawSplitChunkSizes
|
|
1179
|
+
maxInitialSize?: number | RawSplitChunkSizes
|
|
1180
|
+
maxAsyncRequests?: number
|
|
1181
|
+
maxInitialRequests?: number
|
|
1182
|
+
name?: string | false | Function
|
|
1183
|
+
reuseExistingChunk?: boolean
|
|
1184
|
+
enforce?: boolean
|
|
1185
|
+
usedExports?: boolean
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
export interface RawCacheOptions {
|
|
1189
|
+
type: string
|
|
1190
|
+
maxGenerations: number
|
|
1191
|
+
maxAge: number
|
|
1192
|
+
profile: boolean
|
|
1193
|
+
buildDependencies: Array<string>
|
|
1194
|
+
cacheDirectory: string
|
|
1195
|
+
cacheLocation: string
|
|
1196
|
+
name: string
|
|
1197
|
+
version: string
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
export interface RawChunkOptionNameCtx {
|
|
1201
|
+
module: JsModule
|
|
1202
|
+
chunks: Array<JsChunk>
|
|
1203
|
+
cacheGroupKey: string
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
export interface RawConsumeOptions {
|
|
1207
|
+
key: string
|
|
1208
|
+
import?: string
|
|
1209
|
+
importResolved?: string
|
|
1210
|
+
shareKey: string
|
|
1211
|
+
shareScope: string
|
|
1212
|
+
requiredVersion?: string | false | undefined
|
|
1213
|
+
packageName?: string
|
|
1214
|
+
strictVersion: boolean
|
|
1215
|
+
singleton: boolean
|
|
1216
|
+
eager: boolean
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
export interface RawConsumeSharedPluginOptions {
|
|
1220
|
+
consumes: Array<RawConsumeOptions>
|
|
1221
|
+
enhanced: boolean
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
export interface RawContainerPluginOptions {
|
|
1225
|
+
name: string
|
|
1226
|
+
shareScope: string
|
|
1227
|
+
library: JsLibraryOptions
|
|
1228
|
+
runtime?: false | string
|
|
1229
|
+
filename?: string
|
|
1230
|
+
exposes: Array<RawExposeOptions>
|
|
1231
|
+
enhanced: boolean
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
export interface RawContainerReferencePluginOptions {
|
|
1235
|
+
remoteType: string
|
|
1236
|
+
remotes: Array<RawRemoteOptions>
|
|
1237
|
+
shareScope?: string
|
|
1238
|
+
enhanced: boolean
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
export interface RawContextReplacementPluginOptions {
|
|
1242
|
+
resourceRegExp: RegExp
|
|
1243
|
+
newContentResource?: string
|
|
1244
|
+
newContentRecursive?: boolean
|
|
1245
|
+
newContentRegExp?: RegExp
|
|
1246
|
+
newContentCreateContextMap?: Record<string, string>
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
export interface RawCopyGlobOptions {
|
|
1250
|
+
caseSensitiveMatch?: boolean
|
|
1251
|
+
dot?: boolean
|
|
1252
|
+
ignore?: Array<string>
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
export interface RawCopyPattern {
|
|
1256
|
+
from: string
|
|
1257
|
+
to?: string | ((pathData: { context: string; absoluteFilename?: string }) => string | Promise<string>)
|
|
1258
|
+
context?: string
|
|
1259
|
+
toType?: string
|
|
1260
|
+
noErrorOnMissing: boolean
|
|
1261
|
+
force: boolean
|
|
1262
|
+
priority: number
|
|
1263
|
+
globOptions: RawCopyGlobOptions
|
|
1264
|
+
info?: RawInfo
|
|
1265
|
+
transform?: (input: Buffer, absoluteFilename: string) => string | Buffer | Promise<string> | Promise<Buffer>
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
export interface RawCopyRspackPluginOptions {
|
|
1269
|
+
patterns: Array<RawCopyPattern>
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
export interface RawCrossOriginLoading {
|
|
1273
|
+
type: "bool" | "string"
|
|
1274
|
+
stringPayload?: string
|
|
1275
|
+
boolPayload?: boolean
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
export interface RawCssAutoGeneratorOptions {
|
|
1279
|
+
exportsConvention?: "as-is" | "camel-case" | "camel-case-only" | "dashes" | "dashes-only"
|
|
1280
|
+
exportsOnly?: boolean
|
|
1281
|
+
localIdentName?: string
|
|
1282
|
+
esModule?: boolean
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
export interface RawCssAutoParserOptions {
|
|
1286
|
+
namedExports?: boolean
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
export interface RawCssExtractPluginOption {
|
|
1290
|
+
filename: JsFilename
|
|
1291
|
+
chunkFilename: JsFilename
|
|
1292
|
+
ignoreOrder: boolean
|
|
1293
|
+
insert?: string
|
|
1294
|
+
attributes: Record<string, string>
|
|
1295
|
+
linkType?: string
|
|
1296
|
+
runtime: boolean
|
|
1297
|
+
pathinfo: boolean
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
export interface RawCssGeneratorOptions {
|
|
1301
|
+
exportsOnly?: boolean
|
|
1302
|
+
esModule?: boolean
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
export interface RawCssModuleGeneratorOptions {
|
|
1306
|
+
exportsConvention?: "as-is" | "camel-case" | "camel-case-only" | "dashes" | "dashes-only"
|
|
1307
|
+
exportsOnly?: boolean
|
|
1308
|
+
localIdentName?: string
|
|
1309
|
+
esModule?: boolean
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
export interface RawCssModuleParserOptions {
|
|
1313
|
+
namedExports?: boolean
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
export interface RawCssParserOptions {
|
|
1317
|
+
namedExports?: boolean
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
export interface RawDllEntryPluginOptions {
|
|
1321
|
+
context: string
|
|
1322
|
+
entries: Array<string>
|
|
1323
|
+
name: string
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
export interface RawDllManifest {
|
|
1327
|
+
content: Record<string, RawDllManifestContentItem>
|
|
1328
|
+
name?: string
|
|
1329
|
+
type?: string
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
export interface RawDllManifestContentItem {
|
|
1333
|
+
buildMeta?: JsBuildMeta
|
|
1334
|
+
exports?: string[] | true
|
|
1335
|
+
id?: string
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
export interface RawDllReferenceAgencyPluginOptions {
|
|
1339
|
+
context?: string
|
|
1340
|
+
name?: string
|
|
1341
|
+
extensions: Array<string>
|
|
1342
|
+
scope?: string
|
|
1343
|
+
sourceType?: string
|
|
1344
|
+
type: string
|
|
1345
|
+
content?: Record<string, RawDllManifestContentItem>
|
|
1346
|
+
manifest?: RawDllManifest
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
export interface RawDraft {
|
|
1350
|
+
customMedia: boolean
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
export interface RawDynamicEntryPluginOptions {
|
|
1354
|
+
context: string
|
|
1355
|
+
entry: () => Promise<RawEntryDynamicResult[]>
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
export interface RawEntryDynamicResult {
|
|
1359
|
+
import: Array<string>
|
|
1360
|
+
options: JsEntryOptions
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
export interface RawEnvironment {
|
|
1364
|
+
const?: boolean
|
|
1365
|
+
arrowFunction?: boolean
|
|
1366
|
+
nodePrefixForCoreModules?: boolean
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
export interface RawEvalDevToolModulePluginOptions {
|
|
1370
|
+
namespace?: string
|
|
1371
|
+
moduleFilenameTemplate?: string | ((info: RawModuleFilenameTemplateFnCtx) => string)
|
|
1372
|
+
sourceUrlComment?: string
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
export interface RawExperimentCacheOptionsCommon {
|
|
1376
|
+
type: "disable"|"memory"
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1379
|
+
export interface RawExperimentCacheOptionsPersistent {
|
|
1380
|
+
type: "persistent"
|
|
1381
|
+
snapshot: RawExperimentSnapshotOptions
|
|
1382
|
+
storage: Array<RawStorageOptions>
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
export interface RawExperiments {
|
|
1386
|
+
layers: boolean
|
|
1387
|
+
topLevelAwait: boolean
|
|
1388
|
+
incremental?: RawIncremental
|
|
1389
|
+
rspackFuture: RawRspackFuture
|
|
1390
|
+
cache: RawExperimentCacheOptionsPersistent | RawExperimentCacheOptionsCommon
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
export interface RawExperimentSnapshotOptions {
|
|
1394
|
+
immutablePaths: Array<string|RegExp>
|
|
1395
|
+
unmanagedPaths: Array<string|RegExp>
|
|
1396
|
+
managedPaths: Array<string|RegExp>
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
export interface RawExposeOptions {
|
|
1400
|
+
key: string
|
|
1401
|
+
name?: string
|
|
1402
|
+
import: Array<string>
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
export interface RawExternalItemFnCtxData {
|
|
1406
|
+
request: string
|
|
1407
|
+
context: string
|
|
1408
|
+
dependencyType: string
|
|
1409
|
+
contextInfo: ContextInfo
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
export interface RawExternalItemFnResult {
|
|
1413
|
+
externalType?: string
|
|
1414
|
+
result?: string | boolean | string[] | Record<string, string[]>
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
export interface RawExternalsPluginOptions {
|
|
1418
|
+
type: string
|
|
1419
|
+
externals: (string | RegExp | Record<string, string | boolean | string[] | Record<string, string[]>> | ((...args: any[]) => any))[]
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
export interface RawExternalsPresets {
|
|
1423
|
+
node: boolean
|
|
1424
|
+
web: boolean
|
|
1425
|
+
electron: boolean
|
|
1426
|
+
electronMain: boolean
|
|
1427
|
+
electronPreload: boolean
|
|
1428
|
+
electronRenderer: boolean
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
export interface RawExtractComments {
|
|
1432
|
+
banner?: string | boolean
|
|
1433
|
+
condition?: string
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
export interface RawFallbackCacheGroupOptions {
|
|
1437
|
+
chunks?: RegExp | 'async' | 'initial' | 'all'
|
|
1438
|
+
minSize?: number | RawSplitChunkSizes
|
|
1439
|
+
maxSize?: number | RawSplitChunkSizes
|
|
1440
|
+
maxAsyncSize?: number | RawSplitChunkSizes
|
|
1441
|
+
maxInitialSize?: number | RawSplitChunkSizes
|
|
1442
|
+
automaticNameDelimiter?: string
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
export interface RawFlagAllModulesAsUsedPluginOptions {
|
|
1446
|
+
explanation: string
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
export interface RawFuncUseCtx {
|
|
1450
|
+
resource?: string
|
|
1451
|
+
realResource?: string
|
|
1452
|
+
resourceQuery?: string
|
|
1453
|
+
issuer?: string
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
export interface RawGeneratorOptions {
|
|
1457
|
+
type: "asset" | "asset/inline" | "asset/resource" | "css" | "css/auto" | "css/module"
|
|
1458
|
+
asset?: RawAssetGeneratorOptions
|
|
1459
|
+
assetInline?: RawAssetInlineGeneratorOptions
|
|
1460
|
+
assetResource?: RawAssetResourceGeneratorOptions
|
|
1461
|
+
css?: RawCssGeneratorOptions
|
|
1462
|
+
cssAuto?: RawCssAutoGeneratorOptions
|
|
1463
|
+
cssModule?: RawCssModuleGeneratorOptions
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
export interface RawHtmlRspackPluginBaseOptions {
|
|
1467
|
+
href?: string
|
|
1468
|
+
target?: "_self" | "_blank" | "_parent" | "_top"
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
export interface RawHtmlRspackPluginOptions {
|
|
1472
|
+
/** emitted file name in output path */
|
|
1473
|
+
filename?: string[]
|
|
1474
|
+
/** template html file */
|
|
1475
|
+
template?: string
|
|
1476
|
+
templateFn?: (data: string) => Promise<string>
|
|
1477
|
+
templateContent?: string
|
|
1478
|
+
templateParameters?: boolean | Record<string, any> | ((params: string) => Promise<string>)
|
|
1479
|
+
/** "head", "body" or "false" */
|
|
1480
|
+
inject: "head" | "body" | "false"
|
|
1481
|
+
/** path or `auto` */
|
|
1482
|
+
publicPath?: string
|
|
1483
|
+
/** `blocking`, `defer`, `module` or `systemjs-module` */
|
|
1484
|
+
scriptLoading: "blocking" | "defer" | "module" | "systemjs-module"
|
|
1485
|
+
/** entry_chunk_name (only entry chunks are supported) */
|
|
1486
|
+
chunks?: Array<string>
|
|
1487
|
+
excludeChunks?: Array<string>
|
|
1488
|
+
chunksSortMode: "auto" | "manual"
|
|
1489
|
+
sri?: "sha256" | "sha384" | "sha512"
|
|
1490
|
+
minify?: boolean
|
|
1491
|
+
title?: string
|
|
1492
|
+
favicon?: string
|
|
1493
|
+
meta?: Record<string, Record<string, string>>
|
|
1494
|
+
hash?: boolean
|
|
1495
|
+
base?: RawHtmlRspackPluginBaseOptions
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
export interface RawHttpExternalsRspackPluginOptions {
|
|
1499
|
+
css: boolean
|
|
1500
|
+
webAsync: boolean
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
export interface RawIgnorePluginOptions {
|
|
1504
|
+
resourceRegExp?: RegExp
|
|
1505
|
+
contextRegExp?: RegExp
|
|
1506
|
+
checkResource?: (resource: string, context: string) => boolean
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
export interface RawIncremental {
|
|
1510
|
+
make: boolean
|
|
1511
|
+
inferAsyncModules: boolean
|
|
1512
|
+
providedExports: boolean
|
|
1513
|
+
dependenciesDiagnostics: boolean
|
|
1514
|
+
buildChunkGraph: boolean
|
|
1515
|
+
moduleIds: boolean
|
|
1516
|
+
chunkIds: boolean
|
|
1517
|
+
modulesHashes: boolean
|
|
1518
|
+
modulesCodegen: boolean
|
|
1519
|
+
modulesRuntimeRequirements: boolean
|
|
1520
|
+
chunksRuntimeRequirements: boolean
|
|
1521
|
+
chunksHashes: boolean
|
|
1522
|
+
chunksRender: boolean
|
|
1523
|
+
emitAssets: boolean
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
export interface RawInfo {
|
|
1527
|
+
immutable?: boolean
|
|
1528
|
+
minimized?: boolean
|
|
1529
|
+
chunkHash?: Array<string>
|
|
1530
|
+
contentHash?: Array<string>
|
|
1531
|
+
development?: boolean
|
|
1532
|
+
hotModuleReplacement?: boolean
|
|
1533
|
+
related?: RawRelated
|
|
1534
|
+
version?: string
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
export interface RawJavascriptParserOptions {
|
|
1538
|
+
dynamicImportMode?: string
|
|
1539
|
+
dynamicImportPreload?: string
|
|
1540
|
+
dynamicImportPrefetch?: string
|
|
1541
|
+
dynamicImportFetchPriority?: string
|
|
1542
|
+
url?: string
|
|
1543
|
+
exprContextCritical?: boolean
|
|
1544
|
+
wrappedContextCritical?: boolean
|
|
1545
|
+
wrappedContextRegExp?: RegExp
|
|
1546
|
+
exportsPresence?: string
|
|
1547
|
+
importExportsPresence?: string
|
|
1548
|
+
reexportExportsPresence?: string
|
|
1549
|
+
strictExportPresence?: boolean
|
|
1550
|
+
worker?: Array<string>
|
|
1551
|
+
overrideStrict?: string
|
|
1552
|
+
importMeta?: boolean
|
|
1553
|
+
/**
|
|
1554
|
+
* This option is experimental in Rspack only and subject to change or be removed anytime.
|
|
1555
|
+
* @experimental
|
|
1556
|
+
*/
|
|
1557
|
+
requireAsExpression?: boolean
|
|
1558
|
+
/**
|
|
1559
|
+
* This option is experimental in Rspack only and subject to change or be removed anytime.
|
|
1560
|
+
* @experimental
|
|
1561
|
+
*/
|
|
1562
|
+
requireDynamic?: boolean
|
|
1563
|
+
/**
|
|
1564
|
+
* This option is experimental in Rspack only and subject to change or be removed anytime.
|
|
1565
|
+
* @experimental
|
|
1566
|
+
*/
|
|
1567
|
+
requireResolve?: boolean
|
|
1568
|
+
/**
|
|
1569
|
+
* This option is experimental in Rspack only and subject to change or be removed anytime.
|
|
1570
|
+
* @experimental
|
|
1571
|
+
*/
|
|
1572
|
+
importDynamic?: boolean
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
export interface RawLazyCompilationOption {
|
|
1576
|
+
module: ((err: Error | null, arg: RawModuleArg) => RawModuleInfo)
|
|
1577
|
+
test?: RawLazyCompilationTest
|
|
1578
|
+
entries: boolean
|
|
1579
|
+
imports: boolean
|
|
1580
|
+
cacheable: boolean
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
export interface RawLibManifestPluginOptions {
|
|
1584
|
+
context?: string
|
|
1585
|
+
entryOnly?: boolean
|
|
1586
|
+
name?: JsFilename
|
|
1587
|
+
path: JsFilename
|
|
1588
|
+
format?: boolean
|
|
1589
|
+
type?: string
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
export interface RawLightningCssBrowsers {
|
|
1593
|
+
android?: number
|
|
1594
|
+
chrome?: number
|
|
1595
|
+
edge?: number
|
|
1596
|
+
firefox?: number
|
|
1597
|
+
ie?: number
|
|
1598
|
+
ios_saf?: number
|
|
1599
|
+
opera?: number
|
|
1600
|
+
safari?: number
|
|
1601
|
+
samsung?: number
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
export interface RawLightningCssMinimizerOptions {
|
|
1605
|
+
errorRecovery: boolean
|
|
1606
|
+
targets?: Array<string>
|
|
1607
|
+
include?: number
|
|
1608
|
+
exclude?: number
|
|
1609
|
+
draft?: RawDraft
|
|
1610
|
+
drafts?: RawDraft
|
|
1611
|
+
nonStandard?: RawNonStandard
|
|
1612
|
+
pseudoClasses?: RawLightningCssPseudoClasses
|
|
1613
|
+
unusedSymbols: Array<string>
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
export interface RawLightningCssMinimizerRspackPluginOptions {
|
|
1617
|
+
test?: string | RegExp | (string | RegExp)[]
|
|
1618
|
+
include?: string | RegExp | (string | RegExp)[]
|
|
1619
|
+
exclude?: string | RegExp | (string | RegExp)[]
|
|
1620
|
+
removeUnusedLocalIdents: boolean
|
|
1621
|
+
minimizerOptions: RawLightningCssMinimizerOptions
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
export interface RawLightningCssPseudoClasses {
|
|
1625
|
+
hover?: string
|
|
1626
|
+
active?: string
|
|
1627
|
+
focus?: string
|
|
1628
|
+
focusVisible?: string
|
|
1629
|
+
focusWithin?: string
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
export interface RawLimitChunkCountPluginOptions {
|
|
1633
|
+
chunkOverhead?: number
|
|
1634
|
+
entryChunkMultiplicator?: number
|
|
1635
|
+
maxChunks: number
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
export interface RawModuleArg {
|
|
1639
|
+
module: string
|
|
1640
|
+
path: string
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
export interface RawModuleFilenameTemplateFnCtx {
|
|
1644
|
+
identifier: string
|
|
1645
|
+
shortIdentifier: string
|
|
1646
|
+
resource: string
|
|
1647
|
+
resourcePath: string
|
|
1648
|
+
absoluteResourcePath: string
|
|
1649
|
+
loaders: string
|
|
1650
|
+
allLoaders: string
|
|
1651
|
+
query: string
|
|
1652
|
+
moduleId: string
|
|
1653
|
+
hash: string
|
|
1654
|
+
namespace: string
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
export interface RawModuleInfo {
|
|
1658
|
+
active: boolean
|
|
1659
|
+
client: string
|
|
1660
|
+
data: string
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
export interface RawModuleOptions {
|
|
1664
|
+
rules: Array<RawModuleRule>
|
|
1665
|
+
parser?: Record<string, RawParserOptions>
|
|
1666
|
+
generator?: Record<string, RawGeneratorOptions>
|
|
1667
|
+
noParse?: string | RegExp | ((request: string) => boolean) | (string | RegExp | ((request: string) => boolean))[]
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
export interface RawModuleRule {
|
|
1671
|
+
/**
|
|
1672
|
+
* A conditional match matching an absolute path + query + fragment.
|
|
1673
|
+
* Note:
|
|
1674
|
+
* This is a custom matching rule not initially designed by webpack.
|
|
1675
|
+
* Only for single-threaded environment interoperation purpose.
|
|
1676
|
+
*/
|
|
1677
|
+
rspackResource?: RawRuleSetCondition
|
|
1678
|
+
/** A condition matcher matching an absolute path. */
|
|
1679
|
+
test?: RawRuleSetCondition
|
|
1680
|
+
include?: RawRuleSetCondition
|
|
1681
|
+
exclude?: RawRuleSetCondition
|
|
1682
|
+
/** A condition matcher matching an absolute path. */
|
|
1683
|
+
resource?: RawRuleSetCondition
|
|
1684
|
+
/** A condition matcher against the resource query. */
|
|
1685
|
+
resourceQuery?: RawRuleSetCondition
|
|
1686
|
+
resourceFragment?: RawRuleSetCondition
|
|
1687
|
+
descriptionData?: Record<string, RawRuleSetCondition>
|
|
1688
|
+
with?: Record<string, RawRuleSetCondition>
|
|
1689
|
+
sideEffects?: boolean
|
|
1690
|
+
use?: RawModuleRuleUse[] | ((arg: RawFuncUseCtx) => RawModuleRuleUse[])
|
|
1691
|
+
type?: string
|
|
1692
|
+
layer?: string
|
|
1693
|
+
parser?: RawParserOptions
|
|
1694
|
+
generator?: RawGeneratorOptions
|
|
1695
|
+
resolve?: RawResolveOptions
|
|
1696
|
+
issuer?: RawRuleSetCondition
|
|
1697
|
+
issuerLayer?: RawRuleSetCondition
|
|
1698
|
+
dependency?: RawRuleSetCondition
|
|
1699
|
+
scheme?: RawRuleSetCondition
|
|
1700
|
+
mimetype?: RawRuleSetCondition
|
|
1701
|
+
oneOf?: Array<RawModuleRule>
|
|
1702
|
+
rules?: Array<RawModuleRule>
|
|
1703
|
+
/** Specifies the category of the loader. No value means normal loader. */
|
|
1704
|
+
enforce?: 'pre' | 'post'
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
/**
|
|
1708
|
+
* `loader` is for both JS and Rust loaders.
|
|
1709
|
+
* `options` is
|
|
1710
|
+
* - a `None` on rust side and handled by js side `getOptions` when
|
|
1711
|
+
* using with `loader`.
|
|
1712
|
+
* - a `Some(string)` on rust side, deserialized by `serde_json::from_str`
|
|
1713
|
+
* and passed to rust side loader in [get_builtin_loader] when using with
|
|
1714
|
+
* `builtin_loader`.
|
|
1715
|
+
*/
|
|
1716
|
+
export interface RawModuleRuleUse {
|
|
1717
|
+
loader: string
|
|
1718
|
+
options?: string
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
export interface RawNodeOption {
|
|
1722
|
+
dirname: string
|
|
1723
|
+
filename: string
|
|
1724
|
+
global: string
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
export interface RawNonStandard {
|
|
1728
|
+
deepSelectorCombinator: boolean
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
export interface RawOptimizationOptions {
|
|
1732
|
+
removeAvailableModules: boolean
|
|
1733
|
+
sideEffects: string
|
|
1734
|
+
usedExports: string
|
|
1735
|
+
providedExports: boolean
|
|
1736
|
+
innerGraph: boolean
|
|
1737
|
+
mangleExports: string
|
|
1738
|
+
concatenateModules: boolean
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
export interface RawOptions {
|
|
1742
|
+
mode?: undefined | 'production' | 'development' | 'none'
|
|
1743
|
+
target: Array<string>
|
|
1744
|
+
context: string
|
|
1745
|
+
output: RawOutputOptions
|
|
1746
|
+
resolve: RawResolveOptions
|
|
1747
|
+
resolveLoader: RawResolveOptions
|
|
1748
|
+
module: RawModuleOptions
|
|
1749
|
+
devtool: string
|
|
1750
|
+
optimization: RawOptimizationOptions
|
|
1751
|
+
stats: RawStatsOptions
|
|
1752
|
+
snapshot: RawSnapshotOptions
|
|
1753
|
+
cache: RawCacheOptions
|
|
1754
|
+
experiments: RawExperiments
|
|
1755
|
+
node?: RawNodeOption
|
|
1756
|
+
profile: boolean
|
|
1757
|
+
amd?: string
|
|
1758
|
+
bail: boolean
|
|
1759
|
+
__references: Record<string, any>
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
export interface RawOutputOptions {
|
|
1763
|
+
path: string
|
|
1764
|
+
pathinfo: boolean | "verbose"
|
|
1765
|
+
clean: boolean | JsCleanOptions
|
|
1766
|
+
publicPath: "auto" | JsFilename
|
|
1767
|
+
assetModuleFilename: JsFilename
|
|
1768
|
+
wasmLoading: string
|
|
1769
|
+
enabledWasmLoadingTypes: Array<string>
|
|
1770
|
+
webassemblyModuleFilename: string
|
|
1771
|
+
filename: JsFilename
|
|
1772
|
+
chunkFilename: JsFilename
|
|
1773
|
+
crossOriginLoading: RawCrossOriginLoading
|
|
1774
|
+
cssFilename: JsFilename
|
|
1775
|
+
cssChunkFilename: JsFilename
|
|
1776
|
+
hotUpdateMainFilename: string
|
|
1777
|
+
hotUpdateChunkFilename: string
|
|
1778
|
+
hotUpdateGlobal: string
|
|
1779
|
+
uniqueName: string
|
|
1780
|
+
chunkLoadingGlobal: string
|
|
1781
|
+
library?: JsLibraryOptions
|
|
1782
|
+
strictModuleErrorHandling: boolean
|
|
1783
|
+
enabledLibraryTypes?: Array<string>
|
|
1784
|
+
globalObject: string
|
|
1785
|
+
importFunctionName: string
|
|
1786
|
+
importMetaName: string
|
|
1787
|
+
iife: boolean
|
|
1788
|
+
module: boolean
|
|
1789
|
+
chunkLoading: string
|
|
1790
|
+
chunkLoadTimeout: number
|
|
1791
|
+
charset: boolean
|
|
1792
|
+
enabledChunkLoadingTypes?: Array<string>
|
|
1793
|
+
trustedTypes?: RawTrustedTypes
|
|
1794
|
+
sourceMapFilename: string
|
|
1795
|
+
hashFunction: string
|
|
1796
|
+
hashDigest: string
|
|
1797
|
+
hashDigestLength: number
|
|
1798
|
+
hashSalt?: string
|
|
1799
|
+
asyncChunks: boolean
|
|
1800
|
+
workerChunkLoading: string
|
|
1801
|
+
workerWasmLoading: string
|
|
1802
|
+
workerPublicPath: string
|
|
1803
|
+
scriptType: "module" | "text/javascript" | "false"
|
|
1804
|
+
environment: RawEnvironment
|
|
1805
|
+
compareBeforeEmit: boolean
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
export interface RawParserOptions {
|
|
1809
|
+
type: "asset" | "css" | "css/auto" | "css/module" | "javascript" | "javascript/auto" | "javascript/dynamic" | "javascript/esm"
|
|
1810
|
+
asset?: RawAssetParserOptions
|
|
1811
|
+
css?: RawCssParserOptions
|
|
1812
|
+
cssAuto?: RawCssAutoParserOptions
|
|
1813
|
+
cssModule?: RawCssModuleParserOptions
|
|
1814
|
+
javascript?: RawJavascriptParserOptions
|
|
1815
|
+
}
|
|
1816
|
+
|
|
1817
|
+
export interface RawPathData {
|
|
1818
|
+
filename?: string
|
|
1819
|
+
contentHash?: string
|
|
1820
|
+
url?: string
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
export interface RawProgressPluginOptions {
|
|
1824
|
+
prefix?: string
|
|
1825
|
+
profile?: boolean
|
|
1826
|
+
template?: string
|
|
1827
|
+
tick?: string | Array<string>
|
|
1828
|
+
progressChars?: string
|
|
1829
|
+
handler?: (percent: number, msg: string, items: string[]) => void
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
export interface RawProvideOptions {
|
|
1833
|
+
key: string
|
|
1834
|
+
shareKey: string
|
|
1835
|
+
shareScope: string
|
|
1836
|
+
version?: string | false | undefined
|
|
1837
|
+
eager: boolean
|
|
1838
|
+
singleton?: boolean
|
|
1839
|
+
requiredVersion?: string | false | undefined
|
|
1840
|
+
strictVersion?: boolean
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1843
|
+
export interface RawRelated {
|
|
1844
|
+
sourceMap?: string
|
|
1845
|
+
}
|
|
1846
|
+
|
|
1847
|
+
export interface RawRemoteOptions {
|
|
1848
|
+
key: string
|
|
1849
|
+
external: Array<string>
|
|
1850
|
+
shareScope: string
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
export interface RawResolveOptions {
|
|
1854
|
+
preferRelative?: boolean
|
|
1855
|
+
preferAbsolute?: boolean
|
|
1856
|
+
extensions?: Array<string>
|
|
1857
|
+
mainFiles?: Array<string>
|
|
1858
|
+
mainFields?: Array<string>
|
|
1859
|
+
conditionNames?: Array<string>
|
|
1860
|
+
alias?: Array<RawAliasOptionItem>
|
|
1861
|
+
fallback?: Array<RawAliasOptionItem>
|
|
1862
|
+
symlinks?: boolean
|
|
1863
|
+
tsconfig?: RawResolveTsconfigOptions
|
|
1864
|
+
modules?: Array<string>
|
|
1865
|
+
byDependency?: Record<string, RawResolveOptions>
|
|
1866
|
+
fullySpecified?: boolean
|
|
1867
|
+
exportsFields?: Array<string>
|
|
1868
|
+
descriptionFiles?: Array<string>
|
|
1869
|
+
enforceExtension?: boolean
|
|
1870
|
+
importsFields?: Array<string>
|
|
1871
|
+
extensionAlias?: Record<string, Array<string>>
|
|
1872
|
+
aliasFields?: Array<string>
|
|
1873
|
+
restrictions?: Array<string>
|
|
1874
|
+
roots?: Array<string>
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
export interface RawResolveOptionsWithDependencyType {
|
|
1878
|
+
preferRelative?: boolean
|
|
1879
|
+
preferAbsolute?: boolean
|
|
1880
|
+
extensions?: Array<string>
|
|
1881
|
+
mainFiles?: Array<string>
|
|
1882
|
+
mainFields?: Array<string>
|
|
1883
|
+
conditionNames?: Array<string>
|
|
1884
|
+
alias?: Array<RawAliasOptionItem>
|
|
1885
|
+
fallback?: Array<RawAliasOptionItem>
|
|
1886
|
+
symlinks?: boolean
|
|
1887
|
+
tsconfig?: RawResolveTsconfigOptions
|
|
1888
|
+
modules?: Array<string>
|
|
1889
|
+
byDependency?: Record<string, RawResolveOptions>
|
|
1890
|
+
fullySpecified?: boolean
|
|
1891
|
+
exportsFields?: Array<string>
|
|
1892
|
+
descriptionFiles?: Array<string>
|
|
1893
|
+
enforceExtension?: boolean
|
|
1894
|
+
importsFields?: Array<string>
|
|
1895
|
+
extensionAlias?: Record<string, Array<string>>
|
|
1896
|
+
aliasFields?: Array<string>
|
|
1897
|
+
restrictions?: Array<string>
|
|
1898
|
+
roots?: Array<string>
|
|
1899
|
+
dependencyCategory?: string
|
|
1900
|
+
resolveToContext?: boolean
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
export interface RawResolveTsconfigOptions {
|
|
1904
|
+
configFile: string
|
|
1905
|
+
referencesType: "auto" | "manual" | "disabled"
|
|
1906
|
+
references?: Array<string>
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
export interface RawRspackFuture {
|
|
1910
|
+
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1913
|
+
export interface RawRuleSetCondition {
|
|
1914
|
+
type: RawRuleSetConditionType
|
|
1915
|
+
string?: string
|
|
1916
|
+
regexp?: RegExp
|
|
1917
|
+
logical?: Array<RawRuleSetLogicalConditions>
|
|
1918
|
+
array?: Array<RawRuleSetCondition>
|
|
1919
|
+
func?: (value: string) => boolean
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
export declare enum RawRuleSetConditionType {
|
|
1923
|
+
string = 'string',
|
|
1924
|
+
regexp = 'regexp',
|
|
1925
|
+
logical = 'logical',
|
|
1926
|
+
array = 'array',
|
|
1927
|
+
func = 'func'
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1930
|
+
export interface RawRuleSetLogicalConditions {
|
|
1931
|
+
and?: Array<RawRuleSetCondition>
|
|
1932
|
+
or?: Array<RawRuleSetCondition>
|
|
1933
|
+
not?: RawRuleSetCondition
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1936
|
+
export interface RawRuntimeChunkNameFnCtx {
|
|
1937
|
+
name: string
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
export interface RawRuntimeChunkOptions {
|
|
1941
|
+
name: string | ((entrypoint: { name: string }) => string)
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1944
|
+
export interface RawSizeLimitsPluginOptions {
|
|
1945
|
+
assetFilter?: (assetFilename: string) => boolean
|
|
1946
|
+
hints?: "error" | "warning"
|
|
1947
|
+
maxAssetSize?: number
|
|
1948
|
+
maxEntrypointSize?: number
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
export interface RawSnapshotOptions {
|
|
1952
|
+
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
|
+
export interface RawSourceMapDevToolPluginOptions {
|
|
1956
|
+
append?: (false | null) | string | Function
|
|
1957
|
+
columns?: boolean
|
|
1958
|
+
fallbackModuleFilenameTemplate?: string | ((info: RawModuleFilenameTemplateFnCtx) => string)
|
|
1959
|
+
fileContext?: string
|
|
1960
|
+
filename?: (false | null) | string
|
|
1961
|
+
module?: boolean
|
|
1962
|
+
moduleFilenameTemplate?: string | ((info: RawModuleFilenameTemplateFnCtx) => string)
|
|
1963
|
+
namespace?: string
|
|
1964
|
+
noSources?: boolean
|
|
1965
|
+
publicPath?: string
|
|
1966
|
+
sourceRoot?: string
|
|
1967
|
+
test?: string | RegExp | (string | RegExp)[]
|
|
1968
|
+
include?: string | RegExp | (string | RegExp)[]
|
|
1969
|
+
exclude?: string | RegExp | (string | RegExp)[]
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
export interface RawSplitChunkSizes {
|
|
1973
|
+
sizes: Record<string, number>
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
export interface RawSplitChunksOptions {
|
|
1977
|
+
fallbackCacheGroup?: RawFallbackCacheGroupOptions
|
|
1978
|
+
name?: string | false | Function
|
|
1979
|
+
cacheGroups?: Array<RawCacheGroupOptions>
|
|
1980
|
+
/** What kind of chunks should be selected. */
|
|
1981
|
+
chunks?: RegExp | 'async' | 'initial' | 'all' | Function
|
|
1982
|
+
usedExports?: boolean
|
|
1983
|
+
automaticNameDelimiter?: string
|
|
1984
|
+
maxAsyncRequests?: number
|
|
1985
|
+
maxInitialRequests?: number
|
|
1986
|
+
defaultSizeTypes: Array<string>
|
|
1987
|
+
minChunks?: number
|
|
1988
|
+
hidePathInfo?: boolean
|
|
1989
|
+
minSize?: number | RawSplitChunkSizes
|
|
1990
|
+
enforceSizeThreshold?: number
|
|
1991
|
+
minRemainingSize?: number | RawSplitChunkSizes
|
|
1992
|
+
maxSize?: number | RawSplitChunkSizes
|
|
1993
|
+
maxAsyncSize?: number | RawSplitChunkSizes
|
|
1994
|
+
maxInitialSize?: number | RawSplitChunkSizes
|
|
1995
|
+
}
|
|
1996
|
+
|
|
1997
|
+
export interface RawStatsOptions {
|
|
1998
|
+
colors: boolean
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
export interface RawStorageOptions {
|
|
2002
|
+
type: "filesystem"
|
|
2003
|
+
directory: string
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
export interface RawSwcJsMinimizerOptions {
|
|
2007
|
+
compress: any
|
|
2008
|
+
mangle: any
|
|
2009
|
+
format: any
|
|
2010
|
+
module?: boolean
|
|
2011
|
+
minify?: boolean
|
|
2012
|
+
}
|
|
2013
|
+
|
|
2014
|
+
export interface RawSwcJsMinimizerRspackPluginOptions {
|
|
2015
|
+
test?: string | RegExp | (string | RegExp)[]
|
|
2016
|
+
include?: string | RegExp | (string | RegExp)[]
|
|
2017
|
+
exclude?: string | RegExp | (string | RegExp)[]
|
|
2018
|
+
extractComments?: RawExtractComments
|
|
2019
|
+
minimizerOptions: RawSwcJsMinimizerOptions
|
|
2020
|
+
}
|
|
2021
|
+
|
|
2022
|
+
export interface RawToOptions {
|
|
2023
|
+
context: string
|
|
2024
|
+
absoluteFilename: string
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
export interface RawTrustedTypes {
|
|
2028
|
+
policyName?: string
|
|
2029
|
+
onPolicyCreationFailure?: string
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
/**
|
|
2033
|
+
* Some code is modified based on
|
|
2034
|
+
* https://github.com/swc-project/swc/blob/d1d0607158ab40463d1b123fed52cc526eba8385/bindings/binding_core_node/src/util.rs#L29-L58
|
|
2035
|
+
* Apache-2.0 licensed
|
|
2036
|
+
* Author Donny/강동윤
|
|
2037
|
+
* Copyright (c)
|
|
2038
|
+
*/
|
|
2039
|
+
export declare function registerGlobalTrace(filter: string, layer: "chrome" | "logger"| "console", output: string): void
|
|
2040
|
+
|
|
2041
|
+
export declare enum RegisterJsTapKind {
|
|
2042
|
+
CompilerThisCompilation = 0,
|
|
2043
|
+
CompilerCompilation = 1,
|
|
2044
|
+
CompilerMake = 2,
|
|
2045
|
+
CompilerFinishMake = 3,
|
|
2046
|
+
CompilerShouldEmit = 4,
|
|
2047
|
+
CompilerEmit = 5,
|
|
2048
|
+
CompilerAfterEmit = 6,
|
|
2049
|
+
CompilerAssetEmitted = 7,
|
|
2050
|
+
CompilationBuildModule = 8,
|
|
2051
|
+
CompilationStillValidModule = 9,
|
|
2052
|
+
CompilationSucceedModule = 10,
|
|
2053
|
+
CompilationExecuteModule = 11,
|
|
2054
|
+
CompilationFinishModules = 12,
|
|
2055
|
+
CompilationOptimizeModules = 13,
|
|
2056
|
+
CompilationAfterOptimizeModules = 14,
|
|
2057
|
+
CompilationOptimizeTree = 15,
|
|
2058
|
+
CompilationOptimizeChunkModules = 16,
|
|
2059
|
+
CompilationAdditionalTreeRuntimeRequirements = 17,
|
|
2060
|
+
CompilationRuntimeRequirementInTree = 18,
|
|
2061
|
+
CompilationRuntimeModule = 19,
|
|
2062
|
+
CompilationChunkHash = 20,
|
|
2063
|
+
CompilationChunkAsset = 21,
|
|
2064
|
+
CompilationProcessAssets = 22,
|
|
2065
|
+
CompilationAfterProcessAssets = 23,
|
|
2066
|
+
CompilationSeal = 24,
|
|
2067
|
+
CompilationAfterSeal = 25,
|
|
2068
|
+
NormalModuleFactoryBeforeResolve = 26,
|
|
2069
|
+
NormalModuleFactoryFactorize = 27,
|
|
2070
|
+
NormalModuleFactoryResolve = 28,
|
|
2071
|
+
NormalModuleFactoryAfterResolve = 29,
|
|
2072
|
+
NormalModuleFactoryCreateModule = 30,
|
|
2073
|
+
NormalModuleFactoryResolveForScheme = 31,
|
|
2074
|
+
ContextModuleFactoryBeforeResolve = 32,
|
|
2075
|
+
ContextModuleFactoryAfterResolve = 33,
|
|
2076
|
+
JavascriptModulesChunkHash = 34,
|
|
2077
|
+
HtmlPluginBeforeAssetTagGeneration = 35,
|
|
2078
|
+
HtmlPluginAlterAssetTags = 36,
|
|
2079
|
+
HtmlPluginAlterAssetTagGroups = 37,
|
|
2080
|
+
HtmlPluginAfterTemplateExecution = 38,
|
|
2081
|
+
HtmlPluginBeforeEmit = 39,
|
|
2082
|
+
HtmlPluginAfterEmit = 40
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
export interface RegisterJsTaps {
|
|
2086
|
+
registerCompilerThisCompilationTaps: (stages: Array<number>) => Array<{ function: ((arg: JsCompilation) => void); stage: number; }>
|
|
2087
|
+
registerCompilerCompilationTaps: (stages: Array<number>) => Array<{ function: ((arg: JsCompilation) => void); stage: number; }>
|
|
2088
|
+
registerCompilerMakeTaps: (stages: Array<number>) => Array<{ function: ((arg: JsCompilation) => Promise<void>); stage: number; }>
|
|
2089
|
+
registerCompilerFinishMakeTaps: (stages: Array<number>) => Array<{ function: ((arg: JsCompilation) => void); stage: number; }>
|
|
2090
|
+
registerCompilerShouldEmitTaps: (stages: Array<number>) => Array<{ function: ((arg: JsCompilation) => boolean | undefined); stage: number; }>
|
|
2091
|
+
registerCompilerEmitTaps: (stages: Array<number>) => Array<{ function: (() => Promise<void>); stage: number; }>
|
|
2092
|
+
registerCompilerAfterEmitTaps: (stages: Array<number>) => Array<{ function: (() => Promise<void>); stage: number; }>
|
|
2093
|
+
registerCompilerAssetEmittedTaps: (stages: Array<number>) => Array<{ function: ((arg: JsAssetEmittedArgs) => Promise<void>); stage: number; }>
|
|
2094
|
+
registerCompilationBuildModuleTaps: (stages: Array<number>) => Array<{ function: ((arg: JsModule) => void); stage: number; }>
|
|
2095
|
+
registerCompilationStillValidModuleTaps: (stages: Array<number>) => Array<{ function: ((arg: JsModule) => void); stage: number; }>
|
|
2096
|
+
registerCompilationSucceedModuleTaps: (stages: Array<number>) => Array<{ function: ((arg: JsModule) => void); stage: number; }>
|
|
2097
|
+
registerCompilationExecuteModuleTaps: (stages: Array<number>) => Array<{ function: ((arg: JsExecuteModuleArg) => void); stage: number; }>
|
|
2098
|
+
registerCompilationAdditionalTreeRuntimeRequirements: (stages: Array<number>) => Array<{ function: ((arg: JsAdditionalTreeRuntimeRequirementsArg) => JsAdditionalTreeRuntimeRequirementsResult | undefined); stage: number; }>
|
|
2099
|
+
registerCompilationRuntimeRequirementInTree: (stages: Array<number>) => Array<{ function: ((arg: JsRuntimeRequirementInTreeArg) => JsRuntimeRequirementInTreeResult | undefined); stage: number; }>
|
|
2100
|
+
registerCompilationRuntimeModuleTaps: (stages: Array<number>) => Array<{ function: ((arg: JsRuntimeModuleArg) => JsRuntimeModule | undefined); stage: number; }>
|
|
2101
|
+
registerCompilationFinishModulesTaps: (stages: Array<number>) => Array<{ function: ((arg: JsCompilation) => Promise<void>); stage: number; }>
|
|
2102
|
+
registerCompilationOptimizeModulesTaps: (stages: Array<number>) => Array<{ function: (() => boolean | undefined); stage: number; }>
|
|
2103
|
+
registerCompilationAfterOptimizeModulesTaps: (stages: Array<number>) => Array<{ function: (() => void); stage: number; }>
|
|
2104
|
+
registerCompilationOptimizeTreeTaps: (stages: Array<number>) => Array<{ function: (() => Promise<void>); stage: number; }>
|
|
2105
|
+
registerCompilationOptimizeChunkModulesTaps: (stages: Array<number>) => Array<{ function: (() => Promise<boolean | undefined>); stage: number; }>
|
|
2106
|
+
registerCompilationChunkHashTaps: (stages: Array<number>) => Array<{ function: ((arg: JsChunk) => Buffer); stage: number; }>
|
|
2107
|
+
registerCompilationChunkAssetTaps: (stages: Array<number>) => Array<{ function: ((arg: JsChunkAssetArgs) => void); stage: number; }>
|
|
2108
|
+
registerCompilationProcessAssetsTaps: (stages: Array<number>) => Array<{ function: ((arg: JsCompilation) => Promise<void>); stage: number; }>
|
|
2109
|
+
registerCompilationAfterProcessAssetsTaps: (stages: Array<number>) => Array<{ function: ((arg: JsCompilation) => void); stage: number; }>
|
|
2110
|
+
registerCompilationSealTaps: (stages: Array<number>) => Array<{ function: (() => void); stage: number; }>
|
|
2111
|
+
registerCompilationAfterSealTaps: (stages: Array<number>) => Array<{ function: (() => Promise<void>); stage: number; }>
|
|
2112
|
+
registerNormalModuleFactoryBeforeResolveTaps: (stages: Array<number>) => Array<{ function: ((arg: JsBeforeResolveArgs) => Promise<[boolean | undefined, JsBeforeResolveArgs]>); stage: number; }>
|
|
2113
|
+
registerNormalModuleFactoryFactorizeTaps: (stages: Array<number>) => Array<{ function: ((arg: JsFactorizeArgs) => Promise<JsFactorizeArgs>); stage: number; }>
|
|
2114
|
+
registerNormalModuleFactoryResolveTaps: (stages: Array<number>) => Array<{ function: ((arg: JsResolveArgs) => Promise<JsResolveArgs>); stage: number; }>
|
|
2115
|
+
registerNormalModuleFactoryResolveForSchemeTaps: (stages: Array<number>) => Array<{ function: ((arg: JsResolveForSchemeArgs) => Promise<[boolean | undefined, JsResolveForSchemeArgs]>); stage: number; }>
|
|
2116
|
+
registerNormalModuleFactoryAfterResolveTaps: (stages: Array<number>) => Array<{ function: ((arg: JsAfterResolveData) => Promise<[boolean | undefined, JsCreateData | undefined]>); stage: number; }>
|
|
2117
|
+
registerNormalModuleFactoryCreateModuleTaps: (stages: Array<number>) => Array<{ function: ((arg: JsNormalModuleFactoryCreateModuleArgs) => Promise<void>); stage: number; }>
|
|
2118
|
+
registerContextModuleFactoryBeforeResolveTaps: (stages: Array<number>) => Array<{ function: ((arg: false | JsContextModuleFactoryBeforeResolveData) => Promise<false | JsContextModuleFactoryBeforeResolveData>); stage: number; }>
|
|
2119
|
+
registerContextModuleFactoryAfterResolveTaps: (stages: Array<number>) => Array<{ function: ((arg: false | JsContextModuleFactoryAfterResolveData) => Promise<false | JsContextModuleFactoryAfterResolveData>); stage: number; }>
|
|
2120
|
+
registerJavascriptModulesChunkHashTaps: (stages: Array<number>) => Array<{ function: ((arg: JsChunk) => Buffer); stage: number; }>
|
|
2121
|
+
registerHtmlPluginBeforeAssetTagGenerationTaps: (stages: Array<number>) => Array<{ function: ((arg: JsBeforeAssetTagGenerationData) => JsBeforeAssetTagGenerationData); stage: number; }>
|
|
2122
|
+
registerHtmlPluginAlterAssetTagsTaps: (stages: Array<number>) => Array<{ function: ((arg: JsAlterAssetTagsData) => JsAlterAssetTagsData); stage: number; }>
|
|
2123
|
+
registerHtmlPluginAlterAssetTagGroupsTaps: (stages: Array<number>) => Array<{ function: ((arg: JsAlterAssetTagGroupsData) => JsAlterAssetTagGroupsData); stage: number; }>
|
|
2124
|
+
registerHtmlPluginAfterTemplateExecutionTaps: (stages: Array<number>) => Array<{ function: ((arg: JsAfterTemplateExecutionData) => JsAfterTemplateExecutionData); stage: number; }>
|
|
2125
|
+
registerHtmlPluginBeforeEmitTaps: (stages: Array<number>) => Array<{ function: ((arg: JsBeforeEmitData) => JsBeforeEmitData); stage: number; }>
|
|
2126
|
+
registerHtmlPluginAfterEmitTaps: (stages: Array<number>) => Array<{ function: ((arg: JsAfterEmitData) => JsAfterEmitData); stage: number; }>
|
|
2127
|
+
}
|
|
2128
|
+
|
|
2129
|
+
export interface ThreadsafeNodeFS {
|
|
2130
|
+
writeFile: (name: string, content: Buffer) => Promise<void> | void
|
|
2131
|
+
removeFile: (name: string) => Promise<void> | void
|
|
2132
|
+
mkdir: (name: string) => Promise<void> | void
|
|
2133
|
+
mkdirp: (name: string) => Promise<string | void> | string | void
|
|
2134
|
+
removeDirAll: (name: string) => Promise<string | void> | string | void
|
|
2135
|
+
readDir: (name: string) => Promise<string[] | void> | string[] | void
|
|
2136
|
+
readFile: (name: string) => Promise<Buffer | string | void> | Buffer | string | void
|
|
2137
|
+
stat: (name: string) => Promise<NodeFsStats | void> | NodeFsStats | void
|
|
2138
|
+
lstat: (name: string) => Promise<NodeFsStats | void> | NodeFsStats | void
|
|
2139
|
+
open: (name: string, flags: string) => Promise<number | void> | number | void
|
|
2140
|
+
rename: (from: string, to: string) => Promise<void> | void
|
|
2141
|
+
close: (fd: number) => Promise<void> | void
|
|
2142
|
+
write: (fd: number, content: Buffer, position: number) => Promise<number | void> | number | void
|
|
2143
|
+
writeAll: (fd: number, content: Buffer) => Promise<number | void> | number | void
|
|
2144
|
+
read: (fd: number, length: number, position: number) => Promise<Buffer | void> | Buffer | void
|
|
2145
|
+
readUntil: (fd: number, code: number, position: number) => Promise<Buffer | void> | Buffer | void
|
|
2146
|
+
readToEnd: (fd: number, position: number) => Promise<Buffer | void> | Buffer | void
|
|
2147
|
+
}
|