@rspack-debug/browser 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.
@@ -83,7 +83,7 @@ export interface ExecuteModuleArgument {
83
83
  };
84
84
  }
85
85
  export interface ExecuteModuleContext {
86
- __webpack_require__: (id: string) => any;
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): boolean;
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): boolean;
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): boolean;
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): boolean;
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;
@@ -25,6 +25,6 @@ export interface ResolveRequest {
25
25
  export declare class Resolver {
26
26
  #private;
27
27
  constructor(binding: binding.JsResolver);
28
- resolveSync(context: object, path: string, request: string): string | false;
29
- resolve(context: object, path: string, request: string, resolveContext: ResolveContext, callback: ResolveCallback): void;
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
  }
@@ -8,217 +8,232 @@
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
10
  import type { JsRuntimeGlobals } from "./binding";
11
- export declare function __from_binding_runtime_globals(runtimeRequirements: JsRuntimeGlobals): Set<string>;
12
- export declare function __to_binding_runtime_globals(runtimeRequirements: Set<string>): JsRuntimeGlobals;
13
- export declare const RuntimeGlobals: {
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
- readonly require: "__webpack_require__";
18
+ require = 0,
18
19
  /**
19
20
  * access to properties of the internal require function/object
20
21
  */
21
- readonly requireScope: "__webpack_require__.*";
22
+ requireScope = 1,
22
23
  /**
23
24
  * the internal exports object
24
25
  */
25
- readonly exports: "__webpack_exports__";
26
+ exports = 2,
26
27
  /**
27
28
  * top-level this need to be the exports object
28
29
  */
29
- readonly thisAsExports: "top-level-this-exports";
30
+ thisAsExports = 3,
30
31
  /**
31
32
  * runtime need to return the exports of the last entry module
32
33
  */
33
- readonly returnExportsFromRuntime: "return-exports-from-runtime";
34
+ returnExportsFromRuntime = 4,
34
35
  /**
35
36
  * the internal module object
36
37
  */
37
- readonly module: "module";
38
+ module = 5,
38
39
  /**
39
40
  * the internal module object
40
41
  */
41
- readonly moduleId: "module.id";
42
+ moduleId = 6,
42
43
  /**
43
44
  * the internal module object
44
45
  */
45
- readonly moduleLoaded: "module.loaded";
46
+ moduleLoaded = 7,
46
47
  /**
47
48
  * the bundle public path
48
49
  */
49
- readonly publicPath: "__webpack_require__.p";
50
+ publicPath = 8,
50
51
  /**
51
52
  * the module id of the entry point
52
53
  */
53
- readonly entryModuleId: "__webpack_require__.s";
54
+ entryModuleId = 9,
54
55
  /**
55
56
  * the module cache
56
57
  */
57
- readonly moduleCache: "__webpack_require__.c";
58
+ moduleCache = 10,
58
59
  /**
59
60
  * the module functions
60
61
  */
61
- readonly moduleFactories: "__webpack_require__.m";
62
+ moduleFactories = 11,
62
63
  /**
63
64
  * the module functions, with only write access
64
65
  */
65
- readonly moduleFactoriesAddOnly: "__webpack_require__.m (add only)";
66
+ moduleFactoriesAddOnly = 12,
66
67
  /**
67
68
  * the chunk ensure function
68
69
  */
69
- readonly ensureChunk: "__webpack_require__.e";
70
+ ensureChunk = 13,
70
71
  /**
71
72
  * an object with handlers to ensure a chunk
72
73
  */
73
- readonly ensureChunkHandlers: "__webpack_require__.f";
74
+ ensureChunkHandlers = 14,
74
75
  /**
75
76
  * a runtime requirement if ensureChunkHandlers should include loading of chunk needed for entries
76
77
  */
77
- readonly ensureChunkIncludeEntries: "__webpack_require__.f (include entries)";
78
+ ensureChunkIncludeEntries = 15,
78
79
  /**
79
80
  * the chunk prefetch function
80
81
  */
81
- readonly prefetchChunk: "__webpack_require__.E";
82
+ prefetchChunk = 16,
82
83
  /**
83
84
  * an object with handlers to prefetch a chunk
84
85
  */
85
- readonly prefetchChunkHandlers: "__webpack_require__.F";
86
+ prefetchChunkHandlers = 17,
86
87
  /**
87
88
  * the chunk preload function
88
89
  */
89
- readonly preloadChunk: "__webpack_require__.G";
90
+ preloadChunk = 18,
90
91
  /**
91
92
  * an object with handlers to preload a chunk
92
93
  */
93
- readonly preloadChunkHandlers: "__webpack_require__.H";
94
+ preloadChunkHandlers = 19,
94
95
  /**
95
96
  * the exported property define getters function
96
97
  */
97
- readonly definePropertyGetters: "__webpack_require__.d";
98
+ definePropertyGetters = 20,
98
99
  /**
99
100
  * define compatibility on export
100
101
  */
101
- readonly makeNamespaceObject: "__webpack_require__.r";
102
+ makeNamespaceObject = 21,
102
103
  /**
103
104
  * create a fake namespace object
104
105
  */
105
- readonly createFakeNamespaceObject: "__webpack_require__.t";
106
+ createFakeNamespaceObject = 22,
106
107
  /**
107
108
  * compatibility get default export
108
109
  */
109
- readonly compatGetDefaultExport: "__webpack_require__.n";
110
+ compatGetDefaultExport = 23,
110
111
  /**
111
112
  * ES modules decorator
112
113
  */
113
- readonly harmonyModuleDecorator: "__webpack_require__.hmd";
114
+ harmonyModuleDecorator = 24,
114
115
  /**
115
116
  * node.js module decorator
116
117
  */
117
- readonly nodeModuleDecorator: "__webpack_require__.nmd";
118
+ nodeModuleDecorator = 25,
118
119
  /**
119
120
  * the webpack hash
120
121
  */
121
- readonly getFullHash: "__webpack_require__.h";
122
+ getFullHash = 26,
122
123
  /**
123
124
  * an object containing all installed WebAssembly.Instance export objects keyed by module id
124
125
  */
125
- readonly wasmInstances: "__webpack_require__.w";
126
+ wasmInstances = 27,
126
127
  /**
127
128
  * instantiate a wasm instance from module exports object, id, hash and importsObject
128
129
  */
129
- readonly instantiateWasm: "__webpack_require__.v";
130
+ instantiateWasm = 28,
130
131
  /**
131
132
  * the uncaught error handler for the webpack runtime
132
133
  */
133
- readonly uncaughtErrorHandler: "__webpack_require__.oe";
134
+ uncaughtErrorHandler = 29,
134
135
  /**
135
136
  * the script nonce
136
137
  */
137
- readonly scriptNonce: "__webpack_require__.nc";
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
- readonly loadScript: "__webpack_require__.l";
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
- readonly createScript: "__webpack_require__.ts";
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
- readonly createScriptUrl: "__webpack_require__.tu";
157
+ createScriptUrl = 33,
157
158
  /**
158
159
  * function to return webpack's Trusted Types policy
159
160
  * Arguments: () =\> TrustedTypePolicy
160
161
  */
161
- readonly getTrustedTypesPolicy: "__webpack_require__.tt";
162
+ getTrustedTypesPolicy = 34,
162
163
  /**
163
164
  * a flag when a chunk has a fetch priority
164
165
  */
165
- readonly hasFetchPriority: "has fetch priority";
166
+ hasFetchPriority = 35,
166
167
  /**
167
168
  * the chunk name of the chunk with the runtime
168
169
  */
169
- readonly chunkName: "__webpack_require__.cn";
170
+ chunkName = 36,
170
171
  /**
171
172
  * the runtime id of the current runtime
172
173
  */
173
- readonly runtimeId: "__webpack_require__.j";
174
+ runtimeId = 37,
174
175
  /**
175
176
  * the filename of the script part of the chunk
176
177
  */
177
- readonly getChunkScriptFilename: "__webpack_require__.u";
178
+ getChunkScriptFilename = 38,
178
179
  /**
179
180
  * the filename of the css part of the chunk
180
181
  */
181
- readonly getChunkCssFilename: "__webpack_require__.k";
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
- readonly hasCssModules: "has css modules";
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
- readonly getChunkUpdateScriptFilename: "__webpack_require__.hu";
200
+ getChunkUpdateScriptFilename = 43,
190
201
  /**
191
202
  * the filename of the css part of the hot update chunk
192
203
  */
193
- readonly getChunkUpdateCssFilename: "__webpack_require__.hk";
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
- readonly startup: "__webpack_require__.x";
209
+ startup = 45,
199
210
  /**
200
211
  * @deprecated
201
212
  * creating a default startup function with the entry modules
202
213
  */
203
- readonly startupNoDefault: "__webpack_require__.x (no default handler)";
214
+ startupNoDefault = 46,
204
215
  /**
205
216
  * startup signal from runtime but only used to add logic after the startup
206
217
  */
207
- readonly startupOnlyAfter: "__webpack_require__.x (only after)";
218
+ startupOnlyAfter = 47,
208
219
  /**
209
220
  * startup signal from runtime but only used to add sync logic before the startup
210
221
  */
211
- readonly startupOnlyBefore: "__webpack_require__.x (only before)";
222
+ startupOnlyBefore = 48,
212
223
  /**
213
224
  * global callback functions for installing chunks
214
225
  */
215
- readonly chunkCallback: "webpackChunk";
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
- readonly startupEntrypoint: "__webpack_require__.X";
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
- readonly onChunksLoaded: "__webpack_require__.O";
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
- readonly externalInstallChunk: "__webpack_require__.C";
250
+ externalInstallChunk = 53,
236
251
  /**
237
252
  * interceptor for module executions
238
253
  */
239
- readonly interceptModuleExecution: "__webpack_require__.i";
254
+ interceptModuleExecution = 54,
240
255
  /**
241
256
  * the global object
242
257
  */
243
- readonly global: "__webpack_require__.g";
258
+ global = 55,
244
259
  /**
245
260
  * an object with all share scopes
246
261
  */
247
- readonly shareScopeMap: "__webpack_require__.S";
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
- readonly initializeSharing: "__webpack_require__.I";
268
+ initializeSharing = 57,
254
269
  /**
255
270
  * The current scope when getting a module from a remote
256
271
  */
257
- readonly currentRemoteGetScope: "__webpack_require__.R";
272
+ currentRemoteGetScope = 58,
258
273
  /**
259
274
  * the filename of the HMR manifest
260
275
  */
261
- readonly getUpdateManifestFilename: "__webpack_require__.hmrF";
276
+ getUpdateManifestFilename = 59,
262
277
  /**
263
278
  * function downloading the update manifest
264
279
  */
265
- readonly hmrDownloadManifest: "__webpack_require__.hmrM";
280
+ hmrDownloadManifest = 60,
266
281
  /**
267
282
  * array with handler functions to download chunk updates
268
283
  */
269
- readonly hmrDownloadUpdateHandlers: "__webpack_require__.hmrC";
284
+ hmrDownloadUpdateHandlers = 61,
270
285
  /**
271
286
  * object with all hmr module data for all modules
272
287
  */
273
- readonly hmrModuleData: "__webpack_require__.hmrD";
288
+ hmrModuleData = 62,
274
289
  /**
275
290
  * array with handler functions when a module should be invalidated
276
291
  */
277
- readonly hmrInvalidateModuleHandlers: "__webpack_require__.hmrI";
292
+ hmrInvalidateModuleHandlers = 63,
278
293
  /**
279
294
  * the prefix for storing state of runtime modules when hmr is enabled
280
295
  */
281
- readonly hmrRuntimeStatePrefix: "__webpack_require__.hmrS";
296
+ hmrRuntimeStatePrefix = 64,
282
297
  /**
283
298
  * the AMD define function
284
299
  */
285
- readonly amdDefine: "__webpack_require__.amdD";
300
+ amdDefine = 65,
286
301
  /**
287
302
  * the AMD options
288
303
  */
289
- readonly amdOptions: "__webpack_require__.amdO";
304
+ amdOptions = 66,
290
305
  /**
291
306
  * the System polyfill object
292
307
  */
293
- readonly system: "__webpack_require__.System";
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
- readonly hasOwnProperty: "__webpack_require__.o";
313
+ hasOwnProperty = 68,
299
314
  /**
300
315
  * the System.register context object
301
316
  */
302
- readonly systemContext: "__webpack_require__.y";
317
+ systemContext = 69,
303
318
  /**
304
319
  * the baseURI of current document
305
320
  */
306
- readonly baseURI: "__webpack_require__.b";
321
+ baseURI = 70,
307
322
  /**
308
323
  * a RelativeURL class when relative URLs are used
309
324
  */
310
- readonly relativeUrl: "__webpack_require__.U";
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
- readonly asyncModule: "__webpack_require__.a";
324
- readonly asyncModuleExportSymbol: "__webpack_require__.aE";
325
- readonly makeDeferredNamespaceObject: "__webpack_require__.z";
326
- readonly makeDeferredNamespaceObjectSymbol: "__webpack_require__.zS";
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 = "webpack://";
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 = "__mini_css_extract_plugin_public_path_auto__";
5
- export declare const ABSOLUTE_PUBLIC_PATH = "webpack:///mini-css-extract-plugin/";
6
- export declare const SINGLE_DOT_PATH_SEGMENT = "__mini_css_extract_plugin_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;
@@ -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
- * Warnings to ignore during compilation.
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/exports.d.ts CHANGED
@@ -56,6 +56,7 @@ export { LoaderOptionsPlugin } from "./lib/LoaderOptionsPlugin";
56
56
  export { LoaderTargetPlugin } from "./lib/LoaderTargetPlugin";
57
57
  export type { OutputFileSystem, WatchFileSystem } from "./util/fs";
58
58
  import { EsmLibraryPlugin, FetchCompileAsyncWasmPlugin, lazyCompilationMiddleware, SubresourceIntegrityPlugin } from "./builtin-plugin";
59
+ export { SubresourceIntegrityPlugin };
59
60
  interface Web {
60
61
  FetchCompileAsyncWasmPlugin: typeof FetchCompileAsyncWasmPlugin;
61
62
  }
@@ -68,6 +69,7 @@ interface Node {
68
69
  NodeTemplatePlugin: typeof NodeTemplatePlugin;
69
70
  NodeEnvironmentPlugin: typeof NodeEnvironmentPlugin;
70
71
  }
72
+ export { lazyCompilationMiddleware };
71
73
  export declare const node: Node;
72
74
  import { ElectronTargetPlugin } from "./builtin-plugin";
73
75
  interface Electron {
@@ -141,11 +143,17 @@ interface Experiments {
141
143
  cleanup: () => Promise<void>;
142
144
  };
143
145
  RemoveDuplicateModulesPlugin: typeof RemoveDuplicateModulesPlugin;
146
+ /**
147
+ * @deprecated Use `rspack.SubresourceIntegrityPlugin` instead
148
+ */
149
+ SubresourceIntegrityPlugin: typeof SubresourceIntegrityPlugin;
144
150
  EsmLibraryPlugin: typeof EsmLibraryPlugin;
145
151
  RsdoctorPlugin: typeof RsdoctorPlugin;
146
152
  RstestPlugin: typeof RstestPlugin;
147
153
  RslibPlugin: typeof RslibPlugin;
148
- SubresourceIntegrityPlugin: typeof SubresourceIntegrityPlugin;
154
+ /**
155
+ * @deprecated Use `rspack.lazyCompilationMiddleware` instead
156
+ */
149
157
  lazyCompilationMiddleware: typeof lazyCompilationMiddleware;
150
158
  swc: {
151
159
  transform: typeof transform;