@rspack-debug/core 1.6.6 → 1.7.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Compilation.d.ts +25 -5
- package/dist/Resolver.d.ts +2 -2
- package/dist/RuntimeGlobals.d.ts +106 -78
- package/dist/builtin-plugin/css-extract/loader.d.ts +4 -4
- package/dist/builtin-plugin/lazy-compilation/middleware.d.ts +8 -0
- package/dist/config/normalization.d.ts +10 -1
- package/dist/config/types.d.ts +23 -3
- package/dist/cssExtractHmr.js +2 -2
- package/dist/cssExtractLoader.js +4 -4
- package/dist/exports.d.ts +9 -1
- package/dist/index.js +371 -218
- package/dist/lib/EntryOptionPlugin.d.ts +1 -1
- package/dist/util/fake.d.ts +6 -1
- package/dist/worker.js +11 -11
- package/package.json +6 -6
package/dist/Compilation.d.ts
CHANGED
|
@@ -83,7 +83,7 @@ export interface ExecuteModuleArgument {
|
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
export interface ExecuteModuleContext {
|
|
86
|
-
|
|
86
|
+
[key: string]: (id: string) => any;
|
|
87
87
|
}
|
|
88
88
|
export interface KnownNormalizedStatsOptions {
|
|
89
89
|
context: string;
|
|
@@ -289,9 +289,14 @@ export declare class Compilation {
|
|
|
289
289
|
getLogger(name: string | (() => string)): Logger;
|
|
290
290
|
fileDependencies: {
|
|
291
291
|
[Symbol.iterator](): Generator<string, void, unknown>;
|
|
292
|
-
has(dep: string)
|
|
292
|
+
has: (dep: string) => boolean;
|
|
293
293
|
add: (dep: string) => void;
|
|
294
294
|
addAll: (deps: Iterable<string>) => void;
|
|
295
|
+
delete: (dep: string) => boolean;
|
|
296
|
+
keys(): SetIterator<string>;
|
|
297
|
+
values(): SetIterator<string>;
|
|
298
|
+
entries(): SetIterator<[string, string]>;
|
|
299
|
+
readonly size: number;
|
|
295
300
|
};
|
|
296
301
|
get __internal__addedFileDependencies(): string[];
|
|
297
302
|
get __internal__removedFileDependencies(): string[];
|
|
@@ -301,21 +306,36 @@ export declare class Compilation {
|
|
|
301
306
|
get __internal__removedMissingDependencies(): string[];
|
|
302
307
|
contextDependencies: {
|
|
303
308
|
[Symbol.iterator](): Generator<string, void, unknown>;
|
|
304
|
-
has(dep: string)
|
|
309
|
+
has: (dep: string) => boolean;
|
|
305
310
|
add: (dep: string) => void;
|
|
306
311
|
addAll: (deps: Iterable<string>) => void;
|
|
312
|
+
delete: (dep: string) => boolean;
|
|
313
|
+
keys(): SetIterator<string>;
|
|
314
|
+
values(): SetIterator<string>;
|
|
315
|
+
entries(): SetIterator<[string, string]>;
|
|
316
|
+
readonly size: number;
|
|
307
317
|
};
|
|
308
318
|
missingDependencies: {
|
|
309
319
|
[Symbol.iterator](): Generator<string, void, unknown>;
|
|
310
|
-
has(dep: string)
|
|
320
|
+
has: (dep: string) => boolean;
|
|
311
321
|
add: (dep: string) => void;
|
|
312
322
|
addAll: (deps: Iterable<string>) => void;
|
|
323
|
+
delete: (dep: string) => boolean;
|
|
324
|
+
keys(): SetIterator<string>;
|
|
325
|
+
values(): SetIterator<string>;
|
|
326
|
+
entries(): SetIterator<[string, string]>;
|
|
327
|
+
readonly size: number;
|
|
313
328
|
};
|
|
314
329
|
buildDependencies: {
|
|
315
330
|
[Symbol.iterator](): Generator<string, void, unknown>;
|
|
316
|
-
has(dep: string)
|
|
331
|
+
has: (dep: string) => boolean;
|
|
317
332
|
add: (dep: string) => void;
|
|
318
333
|
addAll: (deps: Iterable<string>) => void;
|
|
334
|
+
delete: (dep: string) => boolean;
|
|
335
|
+
keys(): SetIterator<string>;
|
|
336
|
+
values(): SetIterator<string>;
|
|
337
|
+
entries(): SetIterator<[string, string]>;
|
|
338
|
+
readonly size: number;
|
|
319
339
|
};
|
|
320
340
|
getStats(): Stats;
|
|
321
341
|
createChildCompiler(name: string, outputOptions: OutputNormalized, plugins: RspackPluginInstance[]): Compiler;
|
package/dist/Resolver.d.ts
CHANGED
|
@@ -25,6 +25,6 @@ export interface ResolveRequest {
|
|
|
25
25
|
export declare class Resolver {
|
|
26
26
|
#private;
|
|
27
27
|
constructor(binding: binding.JsResolver);
|
|
28
|
-
resolveSync(
|
|
29
|
-
resolve(
|
|
28
|
+
resolveSync(_context: object, path: string, request: string): string | false;
|
|
29
|
+
resolve(_context: object, path: string, request: string, resolveContext: ResolveContext, callback: ResolveCallback): void;
|
|
30
30
|
}
|
package/dist/RuntimeGlobals.d.ts
CHANGED
|
@@ -8,217 +8,232 @@
|
|
|
8
8
|
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
9
|
*/
|
|
10
10
|
import type { JsRuntimeGlobals } from "@rspack/binding";
|
|
11
|
-
|
|
12
|
-
export declare function
|
|
13
|
-
export declare
|
|
11
|
+
import type { RspackOptionsNormalized } from "./config";
|
|
12
|
+
export declare function __from_binding_runtime_globals(runtimeRequirements: JsRuntimeGlobals, compilerRuntimeGlobals: Record<string, string>): Set<string>;
|
|
13
|
+
export declare function __to_binding_runtime_globals(runtimeRequirements: Set<string>, compilerRuntimeGlobals: Record<string, string>): JsRuntimeGlobals;
|
|
14
|
+
declare enum RuntimeGlobals {
|
|
14
15
|
/**
|
|
15
16
|
* the internal require function
|
|
16
17
|
*/
|
|
17
|
-
|
|
18
|
+
require = 0,
|
|
18
19
|
/**
|
|
19
20
|
* access to properties of the internal require function/object
|
|
20
21
|
*/
|
|
21
|
-
|
|
22
|
+
requireScope = 1,
|
|
22
23
|
/**
|
|
23
24
|
* the internal exports object
|
|
24
25
|
*/
|
|
25
|
-
|
|
26
|
+
exports = 2,
|
|
26
27
|
/**
|
|
27
28
|
* top-level this need to be the exports object
|
|
28
29
|
*/
|
|
29
|
-
|
|
30
|
+
thisAsExports = 3,
|
|
30
31
|
/**
|
|
31
32
|
* runtime need to return the exports of the last entry module
|
|
32
33
|
*/
|
|
33
|
-
|
|
34
|
+
returnExportsFromRuntime = 4,
|
|
34
35
|
/**
|
|
35
36
|
* the internal module object
|
|
36
37
|
*/
|
|
37
|
-
|
|
38
|
+
module = 5,
|
|
38
39
|
/**
|
|
39
40
|
* the internal module object
|
|
40
41
|
*/
|
|
41
|
-
|
|
42
|
+
moduleId = 6,
|
|
42
43
|
/**
|
|
43
44
|
* the internal module object
|
|
44
45
|
*/
|
|
45
|
-
|
|
46
|
+
moduleLoaded = 7,
|
|
46
47
|
/**
|
|
47
48
|
* the bundle public path
|
|
48
49
|
*/
|
|
49
|
-
|
|
50
|
+
publicPath = 8,
|
|
50
51
|
/**
|
|
51
52
|
* the module id of the entry point
|
|
52
53
|
*/
|
|
53
|
-
|
|
54
|
+
entryModuleId = 9,
|
|
54
55
|
/**
|
|
55
56
|
* the module cache
|
|
56
57
|
*/
|
|
57
|
-
|
|
58
|
+
moduleCache = 10,
|
|
58
59
|
/**
|
|
59
60
|
* the module functions
|
|
60
61
|
*/
|
|
61
|
-
|
|
62
|
+
moduleFactories = 11,
|
|
62
63
|
/**
|
|
63
64
|
* the module functions, with only write access
|
|
64
65
|
*/
|
|
65
|
-
|
|
66
|
+
moduleFactoriesAddOnly = 12,
|
|
66
67
|
/**
|
|
67
68
|
* the chunk ensure function
|
|
68
69
|
*/
|
|
69
|
-
|
|
70
|
+
ensureChunk = 13,
|
|
70
71
|
/**
|
|
71
72
|
* an object with handlers to ensure a chunk
|
|
72
73
|
*/
|
|
73
|
-
|
|
74
|
+
ensureChunkHandlers = 14,
|
|
74
75
|
/**
|
|
75
76
|
* a runtime requirement if ensureChunkHandlers should include loading of chunk needed for entries
|
|
76
77
|
*/
|
|
77
|
-
|
|
78
|
+
ensureChunkIncludeEntries = 15,
|
|
78
79
|
/**
|
|
79
80
|
* the chunk prefetch function
|
|
80
81
|
*/
|
|
81
|
-
|
|
82
|
+
prefetchChunk = 16,
|
|
82
83
|
/**
|
|
83
84
|
* an object with handlers to prefetch a chunk
|
|
84
85
|
*/
|
|
85
|
-
|
|
86
|
+
prefetchChunkHandlers = 17,
|
|
86
87
|
/**
|
|
87
88
|
* the chunk preload function
|
|
88
89
|
*/
|
|
89
|
-
|
|
90
|
+
preloadChunk = 18,
|
|
90
91
|
/**
|
|
91
92
|
* an object with handlers to preload a chunk
|
|
92
93
|
*/
|
|
93
|
-
|
|
94
|
+
preloadChunkHandlers = 19,
|
|
94
95
|
/**
|
|
95
96
|
* the exported property define getters function
|
|
96
97
|
*/
|
|
97
|
-
|
|
98
|
+
definePropertyGetters = 20,
|
|
98
99
|
/**
|
|
99
100
|
* define compatibility on export
|
|
100
101
|
*/
|
|
101
|
-
|
|
102
|
+
makeNamespaceObject = 21,
|
|
102
103
|
/**
|
|
103
104
|
* create a fake namespace object
|
|
104
105
|
*/
|
|
105
|
-
|
|
106
|
+
createFakeNamespaceObject = 22,
|
|
106
107
|
/**
|
|
107
108
|
* compatibility get default export
|
|
108
109
|
*/
|
|
109
|
-
|
|
110
|
+
compatGetDefaultExport = 23,
|
|
110
111
|
/**
|
|
111
112
|
* ES modules decorator
|
|
112
113
|
*/
|
|
113
|
-
|
|
114
|
+
harmonyModuleDecorator = 24,
|
|
114
115
|
/**
|
|
115
116
|
* node.js module decorator
|
|
116
117
|
*/
|
|
117
|
-
|
|
118
|
+
nodeModuleDecorator = 25,
|
|
118
119
|
/**
|
|
119
120
|
* the webpack hash
|
|
120
121
|
*/
|
|
121
|
-
|
|
122
|
+
getFullHash = 26,
|
|
122
123
|
/**
|
|
123
124
|
* an object containing all installed WebAssembly.Instance export objects keyed by module id
|
|
124
125
|
*/
|
|
125
|
-
|
|
126
|
+
wasmInstances = 27,
|
|
126
127
|
/**
|
|
127
128
|
* instantiate a wasm instance from module exports object, id, hash and importsObject
|
|
128
129
|
*/
|
|
129
|
-
|
|
130
|
+
instantiateWasm = 28,
|
|
130
131
|
/**
|
|
131
132
|
* the uncaught error handler for the webpack runtime
|
|
132
133
|
*/
|
|
133
|
-
|
|
134
|
+
uncaughtErrorHandler = 29,
|
|
134
135
|
/**
|
|
135
136
|
* the script nonce
|
|
136
137
|
*/
|
|
137
|
-
|
|
138
|
+
scriptNonce = 30,
|
|
138
139
|
/**
|
|
139
140
|
* function to load a script tag.
|
|
140
141
|
* Arguments: (url: string, done: (event) =\> void), key?: string | number, chunkId?: string | number) =\> void
|
|
141
142
|
* done function is called when loading has finished or timeout occurred.
|
|
142
143
|
* It will attach to existing script tags with data-webpack == uniqueName + ":" + key or src == url.
|
|
143
144
|
*/
|
|
144
|
-
|
|
145
|
+
loadScript = 31,
|
|
145
146
|
/**
|
|
146
147
|
* function to promote a string to a TrustedScript using webpack's Trusted
|
|
147
148
|
* Types policy
|
|
148
149
|
* Arguments: (script: string) =\> TrustedScript
|
|
149
150
|
*/
|
|
150
|
-
|
|
151
|
+
createScript = 32,
|
|
151
152
|
/**
|
|
152
153
|
* function to promote a string to a TrustedScriptURL using webpack's Trusted
|
|
153
154
|
* Types policy
|
|
154
155
|
* Arguments: (url: string) =\> TrustedScriptURL
|
|
155
156
|
*/
|
|
156
|
-
|
|
157
|
+
createScriptUrl = 33,
|
|
157
158
|
/**
|
|
158
159
|
* function to return webpack's Trusted Types policy
|
|
159
160
|
* Arguments: () =\> TrustedTypePolicy
|
|
160
161
|
*/
|
|
161
|
-
|
|
162
|
+
getTrustedTypesPolicy = 34,
|
|
162
163
|
/**
|
|
163
164
|
* a flag when a chunk has a fetch priority
|
|
164
165
|
*/
|
|
165
|
-
|
|
166
|
+
hasFetchPriority = 35,
|
|
166
167
|
/**
|
|
167
168
|
* the chunk name of the chunk with the runtime
|
|
168
169
|
*/
|
|
169
|
-
|
|
170
|
+
chunkName = 36,
|
|
170
171
|
/**
|
|
171
172
|
* the runtime id of the current runtime
|
|
172
173
|
*/
|
|
173
|
-
|
|
174
|
+
runtimeId = 37,
|
|
174
175
|
/**
|
|
175
176
|
* the filename of the script part of the chunk
|
|
176
177
|
*/
|
|
177
|
-
|
|
178
|
+
getChunkScriptFilename = 38,
|
|
178
179
|
/**
|
|
179
180
|
* the filename of the css part of the chunk
|
|
180
181
|
*/
|
|
181
|
-
|
|
182
|
+
getChunkCssFilename = 39,
|
|
183
|
+
/**
|
|
184
|
+
* rspack version
|
|
185
|
+
* @internal
|
|
186
|
+
*/
|
|
187
|
+
rspackVersion = 40,
|
|
182
188
|
/**
|
|
183
189
|
* a flag when a module/chunk/tree has css modules
|
|
184
190
|
*/
|
|
185
|
-
|
|
191
|
+
hasCssModules = 41,
|
|
192
|
+
/**
|
|
193
|
+
* rspack unique id
|
|
194
|
+
* @internal
|
|
195
|
+
*/
|
|
196
|
+
rspackUniqueId = 42,
|
|
186
197
|
/**
|
|
187
198
|
* the filename of the script part of the hot update chunk
|
|
188
199
|
*/
|
|
189
|
-
|
|
200
|
+
getChunkUpdateScriptFilename = 43,
|
|
190
201
|
/**
|
|
191
202
|
* the filename of the css part of the hot update chunk
|
|
192
203
|
*/
|
|
193
|
-
|
|
204
|
+
getChunkUpdateCssFilename = 44,
|
|
194
205
|
/**
|
|
195
206
|
* startup signal from runtime
|
|
196
207
|
* This will be called when the runtime chunk has been loaded.
|
|
197
208
|
*/
|
|
198
|
-
|
|
209
|
+
startup = 45,
|
|
199
210
|
/**
|
|
200
211
|
* @deprecated
|
|
201
212
|
* creating a default startup function with the entry modules
|
|
202
213
|
*/
|
|
203
|
-
|
|
214
|
+
startupNoDefault = 46,
|
|
204
215
|
/**
|
|
205
216
|
* startup signal from runtime but only used to add logic after the startup
|
|
206
217
|
*/
|
|
207
|
-
|
|
218
|
+
startupOnlyAfter = 47,
|
|
208
219
|
/**
|
|
209
220
|
* startup signal from runtime but only used to add sync logic before the startup
|
|
210
221
|
*/
|
|
211
|
-
|
|
222
|
+
startupOnlyBefore = 48,
|
|
212
223
|
/**
|
|
213
224
|
* global callback functions for installing chunks
|
|
214
225
|
*/
|
|
215
|
-
|
|
226
|
+
chunkCallback = 49,
|
|
216
227
|
/**
|
|
217
228
|
* method to startup an entrypoint with needed chunks.
|
|
218
229
|
* Signature: (moduleId: Id, chunkIds: Id[]) =\> any.
|
|
219
230
|
* Returns the exports of the module or a Promise
|
|
220
231
|
*/
|
|
221
|
-
|
|
232
|
+
startupEntrypoint = 50,
|
|
233
|
+
/**
|
|
234
|
+
* startup signal from runtime for chunk dependencies
|
|
235
|
+
*/
|
|
236
|
+
startupChunkDependencies = 51,
|
|
222
237
|
/**
|
|
223
238
|
* register deferred code, which will run when certain
|
|
224
239
|
* chunks are loaded.
|
|
@@ -227,87 +242,87 @@ export declare const RuntimeGlobals: {
|
|
|
227
242
|
* When (priority & 1) it will wait for all other handlers with lower priority to
|
|
228
243
|
* be executed before itself is executed
|
|
229
244
|
*/
|
|
230
|
-
|
|
245
|
+
onChunksLoaded = 52,
|
|
231
246
|
/**
|
|
232
247
|
* method to install a chunk that was loaded somehow
|
|
233
248
|
* Signature: (\{ id, ids, modules, runtime \}) =\> void
|
|
234
249
|
*/
|
|
235
|
-
|
|
250
|
+
externalInstallChunk = 53,
|
|
236
251
|
/**
|
|
237
252
|
* interceptor for module executions
|
|
238
253
|
*/
|
|
239
|
-
|
|
254
|
+
interceptModuleExecution = 54,
|
|
240
255
|
/**
|
|
241
256
|
* the global object
|
|
242
257
|
*/
|
|
243
|
-
|
|
258
|
+
global = 55,
|
|
244
259
|
/**
|
|
245
260
|
* an object with all share scopes
|
|
246
261
|
*/
|
|
247
|
-
|
|
262
|
+
shareScopeMap = 56,
|
|
248
263
|
/**
|
|
249
264
|
* The sharing init sequence function (only runs once per share scope).
|
|
250
265
|
* Has one argument, the name of the share scope.
|
|
251
266
|
* Creates a share scope if not existing
|
|
252
267
|
*/
|
|
253
|
-
|
|
268
|
+
initializeSharing = 57,
|
|
254
269
|
/**
|
|
255
270
|
* The current scope when getting a module from a remote
|
|
256
271
|
*/
|
|
257
|
-
|
|
272
|
+
currentRemoteGetScope = 58,
|
|
258
273
|
/**
|
|
259
274
|
* the filename of the HMR manifest
|
|
260
275
|
*/
|
|
261
|
-
|
|
276
|
+
getUpdateManifestFilename = 59,
|
|
262
277
|
/**
|
|
263
278
|
* function downloading the update manifest
|
|
264
279
|
*/
|
|
265
|
-
|
|
280
|
+
hmrDownloadManifest = 60,
|
|
266
281
|
/**
|
|
267
282
|
* array with handler functions to download chunk updates
|
|
268
283
|
*/
|
|
269
|
-
|
|
284
|
+
hmrDownloadUpdateHandlers = 61,
|
|
270
285
|
/**
|
|
271
286
|
* object with all hmr module data for all modules
|
|
272
287
|
*/
|
|
273
|
-
|
|
288
|
+
hmrModuleData = 62,
|
|
274
289
|
/**
|
|
275
290
|
* array with handler functions when a module should be invalidated
|
|
276
291
|
*/
|
|
277
|
-
|
|
292
|
+
hmrInvalidateModuleHandlers = 63,
|
|
278
293
|
/**
|
|
279
294
|
* the prefix for storing state of runtime modules when hmr is enabled
|
|
280
295
|
*/
|
|
281
|
-
|
|
296
|
+
hmrRuntimeStatePrefix = 64,
|
|
282
297
|
/**
|
|
283
298
|
* the AMD define function
|
|
284
299
|
*/
|
|
285
|
-
|
|
300
|
+
amdDefine = 65,
|
|
286
301
|
/**
|
|
287
302
|
* the AMD options
|
|
288
303
|
*/
|
|
289
|
-
|
|
304
|
+
amdOptions = 66,
|
|
290
305
|
/**
|
|
291
306
|
* the System polyfill object
|
|
292
307
|
*/
|
|
293
|
-
|
|
308
|
+
system = 67,
|
|
294
309
|
/**
|
|
295
310
|
* the shorthand for Object.prototype.hasOwnProperty
|
|
296
311
|
* using of it decreases the compiled bundle size
|
|
297
312
|
*/
|
|
298
|
-
|
|
313
|
+
hasOwnProperty = 68,
|
|
299
314
|
/**
|
|
300
315
|
* the System.register context object
|
|
301
316
|
*/
|
|
302
|
-
|
|
317
|
+
systemContext = 69,
|
|
303
318
|
/**
|
|
304
319
|
* the baseURI of current document
|
|
305
320
|
*/
|
|
306
|
-
|
|
321
|
+
baseURI = 70,
|
|
307
322
|
/**
|
|
308
323
|
* a RelativeURL class when relative URLs are used
|
|
309
324
|
*/
|
|
310
|
-
|
|
325
|
+
relativeUrl = 71,
|
|
311
326
|
/**
|
|
312
327
|
* Creates an async module. The body function must be a async function.
|
|
313
328
|
* "module.exports" will be decorated with an AsyncModulePromise.
|
|
@@ -320,9 +335,22 @@ export declare const RuntimeGlobals: {
|
|
|
320
335
|
* hasAwaitAfterDependencies?: boolean
|
|
321
336
|
* ) =\> void
|
|
322
337
|
*/
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
}
|
|
328
|
-
export declare const isReservedRuntimeGlobal: (r: string) => boolean;
|
|
338
|
+
asyncModule = 72,
|
|
339
|
+
asyncModuleExportSymbol = 73,
|
|
340
|
+
makeDeferredNamespaceObject = 74,
|
|
341
|
+
makeDeferredNamespaceObjectSymbol = 75
|
|
342
|
+
}
|
|
343
|
+
export declare const isReservedRuntimeGlobal: (r: string, compilerRuntimeGlobals: Record<string, string>) => boolean;
|
|
344
|
+
export declare function renderModulePrefix(_compilerOptions: RspackOptionsNormalized): string;
|
|
345
|
+
export declare enum RuntimeVariable {
|
|
346
|
+
Require = 0,
|
|
347
|
+
Modules = 1,
|
|
348
|
+
ModuleCache = 2,
|
|
349
|
+
Module = 3,
|
|
350
|
+
Exports = 4,
|
|
351
|
+
StartupExec = 5
|
|
352
|
+
}
|
|
353
|
+
export declare function renderRuntimeVariables(variable: RuntimeVariable, _compilerOptions?: RspackOptionsNormalized): string;
|
|
354
|
+
export declare function createCompilerRuntimeGlobals(compilerOptions?: RspackOptionsNormalized): Record<keyof typeof RuntimeGlobals, string>;
|
|
355
|
+
declare const DefaultRuntimeGlobals: Record<"publicPath" | "chunkName" | "moduleId" | "module" | "exports" | "require" | "global" | "system" | "requireScope" | "thisAsExports" | "returnExportsFromRuntime" | "moduleLoaded" | "entryModuleId" | "moduleCache" | "moduleFactories" | "moduleFactoriesAddOnly" | "ensureChunk" | "ensureChunkHandlers" | "ensureChunkIncludeEntries" | "prefetchChunk" | "prefetchChunkHandlers" | "preloadChunk" | "preloadChunkHandlers" | "definePropertyGetters" | "makeNamespaceObject" | "createFakeNamespaceObject" | "compatGetDefaultExport" | "harmonyModuleDecorator" | "nodeModuleDecorator" | "getFullHash" | "wasmInstances" | "instantiateWasm" | "uncaughtErrorHandler" | "scriptNonce" | "loadScript" | "createScript" | "createScriptUrl" | "getTrustedTypesPolicy" | "hasFetchPriority" | "runtimeId" | "getChunkScriptFilename" | "getChunkCssFilename" | "rspackVersion" | "hasCssModules" | "rspackUniqueId" | "getChunkUpdateScriptFilename" | "getChunkUpdateCssFilename" | "startup" | "startupNoDefault" | "startupOnlyAfter" | "startupOnlyBefore" | "chunkCallback" | "startupEntrypoint" | "startupChunkDependencies" | "onChunksLoaded" | "externalInstallChunk" | "interceptModuleExecution" | "shareScopeMap" | "initializeSharing" | "currentRemoteGetScope" | "getUpdateManifestFilename" | "hmrDownloadManifest" | "hmrDownloadUpdateHandlers" | "hmrModuleData" | "hmrInvalidateModuleHandlers" | "hmrRuntimeStatePrefix" | "amdDefine" | "amdOptions" | "hasOwnProperty" | "systemContext" | "baseURI" | "relativeUrl" | "asyncModule" | "asyncModuleExportSymbol" | "makeDeferredNamespaceObject" | "makeDeferredNamespaceObjectSymbol", string>;
|
|
356
|
+
export { DefaultRuntimeGlobals as RuntimeGlobals };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { LoaderContext, LoaderDefinition } from "../..";
|
|
2
|
-
export declare const BASE_URI = "
|
|
2
|
+
export declare const BASE_URI = "rspack-css-extract://";
|
|
3
3
|
export declare const MODULE_TYPE = "css/mini-extract";
|
|
4
|
-
export declare const AUTO_PUBLIC_PATH = "
|
|
5
|
-
export declare const ABSOLUTE_PUBLIC_PATH = "
|
|
6
|
-
export declare const SINGLE_DOT_PATH_SEGMENT = "
|
|
4
|
+
export declare const AUTO_PUBLIC_PATH = "__css_extract_public_path_auto__";
|
|
5
|
+
export declare const ABSOLUTE_PUBLIC_PATH = "rspack-css-extract:///css-extract-plugin/";
|
|
6
|
+
export declare const SINGLE_DOT_PATH_SEGMENT = "__css_extract_single_dot_path_segment__";
|
|
7
7
|
export interface CssExtractRspackLoaderOptions {
|
|
8
8
|
publicPath?: string | ((resourcePath: string, context: string) => string);
|
|
9
9
|
emit?: boolean;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import { type Compiler, MultiCompiler } from "../..";
|
|
2
2
|
import type { MiddlewareHandler } from "../../config/devServer";
|
|
3
3
|
export declare const LAZY_COMPILATION_PREFIX = "/lazy-compilation-using-";
|
|
4
|
+
/**
|
|
5
|
+
* Create a middleware that handles lazy compilation requests from the client.
|
|
6
|
+
* This function returns an Express-style middleware that listens for
|
|
7
|
+
* requests triggered by lazy compilation in the dev server client,
|
|
8
|
+
* then invokes the Rspack compiler to compile modules on demand.
|
|
9
|
+
* Use this middleware when integrating lazy compilation into a
|
|
10
|
+
* custom development server instead of relying on the built-in server.
|
|
11
|
+
*/
|
|
4
12
|
export declare const lazyCompilationMiddleware: (compiler: Compiler | MultiCompiler) => MiddlewareHandler;
|
|
@@ -17,7 +17,7 @@ export type EntryNormalized = EntryDynamicNormalized | EntryStaticNormalized;
|
|
|
17
17
|
export interface EntryStaticNormalized {
|
|
18
18
|
[k: string]: EntryDescriptionNormalized;
|
|
19
19
|
}
|
|
20
|
-
export type EntryDescriptionNormalized = Pick<EntryDescription, "runtime" | "chunkLoading" | "asyncChunks" | "publicPath" | "baseUri" | "filename" | "library" | "layer"> & {
|
|
20
|
+
export type EntryDescriptionNormalized = Pick<EntryDescription, "runtime" | "chunkLoading" | "wasmLoading" | "asyncChunks" | "publicPath" | "baseUri" | "filename" | "library" | "layer"> & {
|
|
21
21
|
import?: string[];
|
|
22
22
|
dependOn?: string[];
|
|
23
23
|
};
|
|
@@ -120,9 +120,18 @@ export interface ExperimentsNormalized {
|
|
|
120
120
|
buildHttp?: HttpUriPluginOptions;
|
|
121
121
|
parallelLoader?: boolean;
|
|
122
122
|
useInputFileSystem?: false | RegExp[];
|
|
123
|
+
/**
|
|
124
|
+
* @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
|
|
125
|
+
*/
|
|
123
126
|
inlineConst?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
|
|
129
|
+
*/
|
|
124
130
|
inlineEnum?: boolean;
|
|
125
131
|
typeReexportsPresence?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
|
|
134
|
+
*/
|
|
126
135
|
lazyBarrel?: boolean;
|
|
127
136
|
nativeWatcher?: boolean;
|
|
128
137
|
deferImport?: boolean;
|
package/dist/config/types.d.ts
CHANGED
|
@@ -858,8 +858,6 @@ export type JavascriptParserOptions = {
|
|
|
858
858
|
* Enable magic comments for CommonJS require() expressions.
|
|
859
859
|
*/
|
|
860
860
|
commonjsMagicComments?: boolean;
|
|
861
|
-
/** Inline const values in this module */
|
|
862
|
-
inlineConst?: boolean;
|
|
863
861
|
/** Whether to tolerant exportsPresence for type reexport */
|
|
864
862
|
typeReexportsPresence?: "no-tolerant" | "tolerant" | "tolerant-no-check";
|
|
865
863
|
/** Whether to enable JSX parsing */
|
|
@@ -1881,6 +1879,13 @@ export type Optimization = {
|
|
|
1881
1879
|
* The value is `false` in development mode.
|
|
1882
1880
|
*/
|
|
1883
1881
|
mangleExports?: "size" | "deterministic" | boolean;
|
|
1882
|
+
/**
|
|
1883
|
+
* Allows to inline exports when possible to reduce code size.
|
|
1884
|
+
*
|
|
1885
|
+
* The value is `true` in production mode.
|
|
1886
|
+
* The value is `false` in development mode.
|
|
1887
|
+
*/
|
|
1888
|
+
inlineExports?: boolean;
|
|
1884
1889
|
/**
|
|
1885
1890
|
* Tells Rspack to set process.env.NODE_ENV to a given string value.
|
|
1886
1891
|
* @default false
|
|
@@ -2155,21 +2160,25 @@ export type Experiments = {
|
|
|
2155
2160
|
/**
|
|
2156
2161
|
* Enable inline const feature
|
|
2157
2162
|
* @default false
|
|
2163
|
+
* @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
|
|
2158
2164
|
*/
|
|
2159
2165
|
inlineConst?: boolean;
|
|
2160
2166
|
/**
|
|
2161
2167
|
* Enable inline enum feature
|
|
2162
2168
|
* @default false
|
|
2169
|
+
* @deprecated This option is deprecated, it's already stable. Rspack will remove this option in future version
|
|
2163
2170
|
*/
|
|
2164
2171
|
inlineEnum?: boolean;
|
|
2165
2172
|
/**
|
|
2166
2173
|
* Enable type reexports presence feature
|
|
2167
2174
|
* @default false
|
|
2175
|
+
* @deprecated This option is deprecated, it's already stable. Rspack will remove this option in future version
|
|
2168
2176
|
*/
|
|
2169
2177
|
typeReexportsPresence?: boolean;
|
|
2170
2178
|
/**
|
|
2171
2179
|
* Enable lazy make side effects free barrel file
|
|
2172
2180
|
* @default false
|
|
2181
|
+
* @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
|
|
2173
2182
|
*/
|
|
2174
2183
|
lazyBarrel?: boolean;
|
|
2175
2184
|
/**
|
|
@@ -2333,7 +2342,18 @@ export type RspackOptions = {
|
|
|
2333
2342
|
*/
|
|
2334
2343
|
loader?: Loader;
|
|
2335
2344
|
/**
|
|
2336
|
-
*
|
|
2345
|
+
* Tells Rspack to suppress specific compilation warnings by matching their
|
|
2346
|
+
* message, module, or file, or by using a custom function.
|
|
2347
|
+
*
|
|
2348
|
+
* @example
|
|
2349
|
+
* ```js
|
|
2350
|
+
* export default {
|
|
2351
|
+
* ignoreWarnings: [
|
|
2352
|
+
* /warning from compiler/,
|
|
2353
|
+
* { file: /node_modules/ },
|
|
2354
|
+
* ],
|
|
2355
|
+
* };
|
|
2356
|
+
* ```
|
|
2337
2357
|
*/
|
|
2338
2358
|
ignoreWarnings?: IgnoreWarnings;
|
|
2339
2359
|
/**
|
package/dist/cssExtractHmr.js
CHANGED
|
@@ -115,10 +115,10 @@ function cssReload(moduleId, options) {
|
|
|
115
115
|
}, 50);
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
|
-
for(var
|
|
118
|
+
for(var __rspack_i in exports.cssReload = __webpack_exports__.cssReload, exports.normalizeUrl = __webpack_exports__.normalizeUrl, __webpack_exports__)-1 === [
|
|
119
119
|
"cssReload",
|
|
120
120
|
"normalizeUrl"
|
|
121
|
-
].indexOf(
|
|
121
|
+
].indexOf(__rspack_i) && (exports[__rspack_i] = __webpack_exports__[__rspack_i]);
|
|
122
122
|
Object.defineProperty(exports, '__esModule', {
|
|
123
123
|
value: !0
|
|
124
124
|
});
|