@rspack/core 1.6.8 → 1.7.0-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/dist/Compilation.d.ts +24 -4
- package/dist/Resolver.d.ts +2 -2
- package/dist/RuntimeGlobals.d.ts +2 -2
- package/dist/builtin-plugin/lazy-compilation/middleware.d.ts +8 -0
- package/dist/config/normalization.d.ts +10 -5
- package/dist/config/types.d.ts +31 -9
- package/dist/cssExtractHmr.js +2 -2
- package/dist/cssExtractLoader.js +1 -1
- package/dist/exports.d.ts +9 -1
- package/dist/index.js +147 -106
- package/dist/lib/EntryOptionPlugin.d.ts +1 -1
- package/dist/moduleFederationDefaultRuntime.js +1 -1
- package/dist/rspack.d.ts +9 -0
- package/dist/util/fake.d.ts +6 -1
- package/dist/util/index.d.ts +1 -0
- package/dist/worker.js +4 -4
- package/package.json +8 -8
package/dist/Compilation.d.ts
CHANGED
|
@@ -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
|
@@ -351,6 +351,6 @@ export declare enum RuntimeVariable {
|
|
|
351
351
|
StartupExec = 5
|
|
352
352
|
}
|
|
353
353
|
export declare function renderRuntimeVariables(variable: RuntimeVariable, _compilerOptions?: RspackOptionsNormalized): string;
|
|
354
|
-
export declare function createCompilerRuntimeGlobals(compilerOptions?: RspackOptionsNormalized): typeof RuntimeGlobals
|
|
355
|
-
declare const DefaultRuntimeGlobals:
|
|
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
356
|
export { DefaultRuntimeGlobals as RuntimeGlobals };
|
|
@@ -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
|
};
|
|
@@ -111,18 +111,23 @@ export interface ExperimentsNormalized {
|
|
|
111
111
|
*/
|
|
112
112
|
layers?: boolean;
|
|
113
113
|
incremental?: false | Incremental;
|
|
114
|
-
/**
|
|
115
|
-
* @deprecated This option is deprecated, as it has a huge regression in some edge cases where the chunk graph has lots of cycles. We will improve performance of build_chunk_graph.
|
|
116
|
-
*/
|
|
117
|
-
parallelCodeSplitting?: boolean;
|
|
118
114
|
futureDefaults?: boolean;
|
|
119
115
|
rspackFuture?: RspackFutureOptions;
|
|
120
116
|
buildHttp?: HttpUriPluginOptions;
|
|
121
117
|
parallelLoader?: boolean;
|
|
122
118
|
useInputFileSystem?: false | RegExp[];
|
|
119
|
+
/**
|
|
120
|
+
* @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
|
|
121
|
+
*/
|
|
123
122
|
inlineConst?: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
|
|
125
|
+
*/
|
|
124
126
|
inlineEnum?: boolean;
|
|
125
127
|
typeReexportsPresence?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
|
|
130
|
+
*/
|
|
126
131
|
lazyBarrel?: boolean;
|
|
127
132
|
nativeWatcher?: boolean;
|
|
128
133
|
deferImport?: boolean;
|
package/dist/config/types.d.ts
CHANGED
|
@@ -461,7 +461,13 @@ export type Output = {
|
|
|
461
461
|
/** An optional salt to update the hash. */
|
|
462
462
|
hashSalt?: HashSalt;
|
|
463
463
|
/**
|
|
464
|
-
*
|
|
464
|
+
* Controls whether dynamically imported modules are emitted as separate async chunks or bundled into
|
|
465
|
+
* existing chunks.
|
|
466
|
+
* - `true`: Modules loaded via `import()` are split into independent async chunks. These chunks are
|
|
467
|
+
* emitted as separate files and are loaded on demand at runtime. This enables code splitting and keeps
|
|
468
|
+
* the initial bundle smaller.
|
|
469
|
+
* - `false`: Dynamically imported modules are bundled into existing chunks instead of being emitted as
|
|
470
|
+
* separate files. No additional async chunk files are generated.
|
|
465
471
|
* @default true
|
|
466
472
|
* */
|
|
467
473
|
asyncChunks?: AsyncChunks;
|
|
@@ -858,8 +864,6 @@ export type JavascriptParserOptions = {
|
|
|
858
864
|
* Enable magic comments for CommonJS require() expressions.
|
|
859
865
|
*/
|
|
860
866
|
commonjsMagicComments?: boolean;
|
|
861
|
-
/** Inline const values in this module */
|
|
862
|
-
inlineConst?: boolean;
|
|
863
867
|
/** Whether to tolerant exportsPresence for type reexport */
|
|
864
868
|
typeReexportsPresence?: "no-tolerant" | "tolerant" | "tolerant-no-check";
|
|
865
869
|
/** Whether to enable JSX parsing */
|
|
@@ -1881,6 +1885,13 @@ export type Optimization = {
|
|
|
1881
1885
|
* The value is `false` in development mode.
|
|
1882
1886
|
*/
|
|
1883
1887
|
mangleExports?: "size" | "deterministic" | boolean;
|
|
1888
|
+
/**
|
|
1889
|
+
* Allows to inline exports when possible to reduce code size.
|
|
1890
|
+
*
|
|
1891
|
+
* The value is `true` in production mode.
|
|
1892
|
+
* The value is `false` in development mode.
|
|
1893
|
+
*/
|
|
1894
|
+
inlineExports?: boolean;
|
|
1884
1895
|
/**
|
|
1885
1896
|
* Tells Rspack to set process.env.NODE_ENV to a given string value.
|
|
1886
1897
|
* @default false
|
|
@@ -2092,6 +2103,7 @@ export type Experiments = {
|
|
|
2092
2103
|
outputModule?: boolean;
|
|
2093
2104
|
/**
|
|
2094
2105
|
* Enable top-level await.
|
|
2106
|
+
* @deprecated This option is deprecated, top-level await is enabled by default.
|
|
2095
2107
|
* @default true
|
|
2096
2108
|
*/
|
|
2097
2109
|
topLevelAwait?: boolean;
|
|
@@ -2118,11 +2130,6 @@ export type Experiments = {
|
|
|
2118
2130
|
* Enable incremental builds.
|
|
2119
2131
|
*/
|
|
2120
2132
|
incremental?: IncrementalPresets | Incremental;
|
|
2121
|
-
/**
|
|
2122
|
-
* Enable multi-threaded code splitting algorithm.
|
|
2123
|
-
* @deprecated This option is deprecated, it has a huge regression in some edge cases where the chunk graph has lots of cycles. We'll improve the performance of build_chunk_graph in the future instead
|
|
2124
|
-
*/
|
|
2125
|
-
parallelCodeSplitting?: boolean;
|
|
2126
2133
|
/**
|
|
2127
2134
|
* Enable future default options.
|
|
2128
2135
|
* @default false
|
|
@@ -2155,21 +2162,25 @@ export type Experiments = {
|
|
|
2155
2162
|
/**
|
|
2156
2163
|
* Enable inline const feature
|
|
2157
2164
|
* @default false
|
|
2165
|
+
* @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
|
|
2158
2166
|
*/
|
|
2159
2167
|
inlineConst?: boolean;
|
|
2160
2168
|
/**
|
|
2161
2169
|
* Enable inline enum feature
|
|
2162
2170
|
* @default false
|
|
2171
|
+
* @deprecated This option is deprecated, it's already stable. Rspack will remove this option in future version
|
|
2163
2172
|
*/
|
|
2164
2173
|
inlineEnum?: boolean;
|
|
2165
2174
|
/**
|
|
2166
2175
|
* Enable type reexports presence feature
|
|
2167
2176
|
* @default false
|
|
2177
|
+
* @deprecated This option is deprecated, it's already stable. Rspack will remove this option in future version
|
|
2168
2178
|
*/
|
|
2169
2179
|
typeReexportsPresence?: boolean;
|
|
2170
2180
|
/**
|
|
2171
2181
|
* Enable lazy make side effects free barrel file
|
|
2172
2182
|
* @default false
|
|
2183
|
+
* @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
|
|
2173
2184
|
*/
|
|
2174
2185
|
lazyBarrel?: boolean;
|
|
2175
2186
|
/**
|
|
@@ -2333,7 +2344,18 @@ export type RspackOptions = {
|
|
|
2333
2344
|
*/
|
|
2334
2345
|
loader?: Loader;
|
|
2335
2346
|
/**
|
|
2336
|
-
*
|
|
2347
|
+
* Tells Rspack to suppress specific compilation warnings by matching their
|
|
2348
|
+
* message, module, or file, or by using a custom function.
|
|
2349
|
+
*
|
|
2350
|
+
* @example
|
|
2351
|
+
* ```js
|
|
2352
|
+
* export default {
|
|
2353
|
+
* ignoreWarnings: [
|
|
2354
|
+
* /warning from compiler/,
|
|
2355
|
+
* { file: /node_modules/ },
|
|
2356
|
+
* ],
|
|
2357
|
+
* };
|
|
2358
|
+
* ```
|
|
2337
2359
|
*/
|
|
2338
2360
|
ignoreWarnings?: IgnoreWarnings;
|
|
2339
2361
|
/**
|
package/dist/cssExtractHmr.js
CHANGED
|
@@ -6,7 +6,7 @@ __webpack_require__.d = (exports1, definition)=>{
|
|
|
6
6
|
get: definition[key]
|
|
7
7
|
});
|
|
8
8
|
}, __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop), __webpack_require__.r = (exports1)=>{
|
|
9
|
-
|
|
9
|
+
"u" > typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
10
10
|
value: 'Module'
|
|
11
11
|
}), Object.defineProperty(exports1, '__esModule', {
|
|
12
12
|
value: !0
|
|
@@ -34,7 +34,7 @@ __webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_expo
|
|
|
34
34
|
cssReload: ()=>cssReload,
|
|
35
35
|
normalizeUrl: ()=>normalizeUrl
|
|
36
36
|
});
|
|
37
|
-
const srcByModuleId = Object.create(null), noDocument = "
|
|
37
|
+
const srcByModuleId = Object.create(null), noDocument = "u" < typeof document, { forEach } = Array.prototype;
|
|
38
38
|
function noop() {}
|
|
39
39
|
function updateCss(el, url) {
|
|
40
40
|
let normalizedUrl;
|
package/dist/cssExtractLoader.js
CHANGED
|
@@ -11,7 +11,7 @@ __webpack_require__.n = (module)=>{
|
|
|
11
11
|
get: definition[key]
|
|
12
12
|
});
|
|
13
13
|
}, __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop), __webpack_require__.r = (exports1)=>{
|
|
14
|
-
|
|
14
|
+
"u" > typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
15
15
|
value: 'Module'
|
|
16
16
|
}), Object.defineProperty(exports1, '__esModule', {
|
|
17
17
|
value: !0
|
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
|
-
|
|
154
|
+
/**
|
|
155
|
+
* @deprecated Use `rspack.lazyCompilationMiddleware` instead
|
|
156
|
+
*/
|
|
149
157
|
lazyCompilationMiddleware: typeof lazyCompilationMiddleware;
|
|
150
158
|
swc: {
|
|
151
159
|
transform: typeof transform;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
"../../node_modules/.pnpm/enhanced-resolve@5.18.
|
|
3
|
+
"../../node_modules/.pnpm/enhanced-resolve@5.18.4/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
4
4
|
let { nextTick } = __webpack_require__("process"), dirname = (path)=>{
|
|
5
5
|
let idx = path.length - 1;
|
|
6
6
|
for(; idx >= 0;){
|
|
@@ -264,7 +264,7 @@ __webpack_require__.n = (module1)=>{
|
|
|
264
264
|
get: definition[key]
|
|
265
265
|
});
|
|
266
266
|
}, __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop), __webpack_require__.r = (exports1)=>{
|
|
267
|
-
|
|
267
|
+
"u" > typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
268
268
|
value: 'Module'
|
|
269
269
|
}), Object.defineProperty(exports1, '__esModule', {
|
|
270
270
|
value: !0
|
|
@@ -297,6 +297,7 @@ for(var __rspack_i in (()=>{
|
|
|
297
297
|
EvalDevToolModulePlugin: ()=>EvalDevToolModulePlugin,
|
|
298
298
|
NormalModuleReplacementPlugin: ()=>NormalModuleReplacementPlugin,
|
|
299
299
|
WebpackOptionsApply: ()=>RspackOptionsApply,
|
|
300
|
+
lazyCompilationMiddleware: ()=>lazyCompilationMiddleware,
|
|
300
301
|
EnvironmentPlugin: ()=>EnvironmentPlugin,
|
|
301
302
|
HotModuleReplacementPlugin: ()=>HotModuleReplacementPlugin,
|
|
302
303
|
Compilation: ()=>Compilation,
|
|
@@ -329,9 +330,10 @@ for(var __rspack_i in (()=>{
|
|
|
329
330
|
ModuleFilenameHelpers: ()=>ModuleFilenameHelpers_namespaceObject,
|
|
330
331
|
MultiCompiler: ()=>MultiCompiler,
|
|
331
332
|
SourceMapDevToolPlugin: ()=>SourceMapDevToolPlugin,
|
|
333
|
+
SubresourceIntegrityPlugin: ()=>SubresourceIntegrityPlugin,
|
|
332
334
|
library: ()=>exports_library,
|
|
333
|
-
node: ()=>exports_node,
|
|
334
335
|
RuntimeGlobals: ()=>DefaultRuntimeGlobals,
|
|
336
|
+
node: ()=>exports_node,
|
|
335
337
|
rspackVersion: ()=>exports_rspackVersion,
|
|
336
338
|
util: ()=>util,
|
|
337
339
|
optimize: ()=>optimize,
|
|
@@ -401,6 +403,7 @@ for(var __rspack_i in (()=>{
|
|
|
401
403
|
SourceMapDevToolPlugin: ()=>SourceMapDevToolPlugin,
|
|
402
404
|
Stats: ()=>Stats,
|
|
403
405
|
StatsErrorCode: ()=>statsFactoryUtils_StatsErrorCode,
|
|
406
|
+
SubresourceIntegrityPlugin: ()=>SubresourceIntegrityPlugin,
|
|
404
407
|
SwcJsMinimizerRspackPlugin: ()=>SwcJsMinimizerRspackPlugin,
|
|
405
408
|
Template: ()=>Template,
|
|
406
409
|
ValidationError: ()=>ValidationError,
|
|
@@ -412,6 +415,7 @@ for(var __rspack_i in (()=>{
|
|
|
412
415
|
electron: ()=>electron,
|
|
413
416
|
experiments: ()=>exports_experiments,
|
|
414
417
|
javascript: ()=>javascript,
|
|
418
|
+
lazyCompilationMiddleware: ()=>lazyCompilationMiddleware,
|
|
415
419
|
library: ()=>exports_library,
|
|
416
420
|
node: ()=>exports_node,
|
|
417
421
|
optimize: ()=>optimize,
|
|
@@ -1185,20 +1189,35 @@ for(var __rspack_i in (()=>{
|
|
|
1185
1189
|
}
|
|
1186
1190
|
}
|
|
1187
1191
|
function createFakeCompilationDependencies(getDeps, addDeps) {
|
|
1188
|
-
let addDepsCaller = new MergeCaller(addDeps)
|
|
1192
|
+
let addDepsCaller = new MergeCaller(addDeps), deletedDeps = new Set(), hasDep = (dep)=>!deletedDeps.has(dep) && (addDepsCaller.pendingData().includes(dep) || getDeps().includes(dep)), getAllDeps = ()=>{
|
|
1193
|
+
let deps = new Set([
|
|
1194
|
+
...getDeps(),
|
|
1195
|
+
...addDepsCaller.pendingData()
|
|
1196
|
+
]);
|
|
1197
|
+
for (let deleted of deletedDeps)deps.delete(deleted);
|
|
1198
|
+
return deps;
|
|
1199
|
+
};
|
|
1189
1200
|
return {
|
|
1190
1201
|
*[Symbol.iterator] () {
|
|
1191
|
-
for (let dep of
|
|
1192
|
-
...getDeps(),
|
|
1193
|
-
...addDepsCaller.pendingData()
|
|
1194
|
-
]))yield dep;
|
|
1202
|
+
for (let dep of getAllDeps())yield dep;
|
|
1195
1203
|
},
|
|
1196
|
-
has:
|
|
1204
|
+
has: hasDep,
|
|
1197
1205
|
add: (dep)=>{
|
|
1198
|
-
addDepsCaller.push(dep);
|
|
1206
|
+
deletedDeps.delete(dep), addDepsCaller.push(dep);
|
|
1199
1207
|
},
|
|
1200
1208
|
addAll: (deps)=>{
|
|
1209
|
+
for (let dep of deps)deletedDeps.delete(dep);
|
|
1201
1210
|
addDepsCaller.push(...deps);
|
|
1211
|
+
},
|
|
1212
|
+
delete: (dep)=>{
|
|
1213
|
+
let hadDep = hasDep(dep);
|
|
1214
|
+
return hadDep && deletedDeps.add(dep), hadDep;
|
|
1215
|
+
},
|
|
1216
|
+
keys: ()=>getAllDeps().keys(),
|
|
1217
|
+
values: ()=>getAllDeps().values(),
|
|
1218
|
+
entries: ()=>getAllDeps().entries(),
|
|
1219
|
+
get size () {
|
|
1220
|
+
return getAllDeps().size;
|
|
1202
1221
|
}
|
|
1203
1222
|
};
|
|
1204
1223
|
}
|
|
@@ -1476,7 +1495,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
1476
1495
|
processAssetsHook.tap(getOptions(options), ()=>fn(...getArgs()));
|
|
1477
1496
|
},
|
|
1478
1497
|
tapAsync: (options, fn)=>{
|
|
1479
|
-
processAssetsHook.tapAsync(getOptions(options), (
|
|
1498
|
+
processAssetsHook.tapAsync(getOptions(options), (_assets, callback)=>fn(...getArgs(), callback));
|
|
1480
1499
|
},
|
|
1481
1500
|
tapPromise: (options, fn)=>{
|
|
1482
1501
|
processAssetsHook.tapPromise(getOptions(options), ()=>fn(...getArgs()));
|
|
@@ -2169,7 +2188,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
2169
2188
|
for (let entry of desc.import)new EntryPlugin(context, entry, options).apply(compiler);
|
|
2170
2189
|
}
|
|
2171
2190
|
}
|
|
2172
|
-
static entryDescriptionToOptions(
|
|
2191
|
+
static entryDescriptionToOptions(_compiler, name, desc) {
|
|
2173
2192
|
return {
|
|
2174
2193
|
name,
|
|
2175
2194
|
filename: desc.filename,
|
|
@@ -2192,13 +2211,13 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
2192
2211
|
} : options)
|
|
2193
2212
|
}), "make");
|
|
2194
2213
|
function getRawEntryOptions(entry) {
|
|
2195
|
-
let runtime = entry.runtime, chunkLoading = entry.chunkLoading;
|
|
2196
2214
|
return {
|
|
2197
2215
|
name: entry.name,
|
|
2198
2216
|
publicPath: entry.publicPath,
|
|
2199
2217
|
baseUri: entry.baseUri,
|
|
2200
|
-
runtime,
|
|
2201
|
-
chunkLoading,
|
|
2218
|
+
runtime: entry.runtime,
|
|
2219
|
+
chunkLoading: entry.chunkLoading,
|
|
2220
|
+
wasmLoading: entry.wasmLoading,
|
|
2202
2221
|
asyncChunks: entry.asyncChunks,
|
|
2203
2222
|
filename: entry.filename,
|
|
2204
2223
|
library: entry.library,
|
|
@@ -2287,7 +2306,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
2287
2306
|
var config;
|
|
2288
2307
|
let err, logger = compiler.getInfrastructureLogger(EsmLibraryPlugin.PLUGIN_NAME);
|
|
2289
2308
|
if (!function(options, logger) {
|
|
2290
|
-
options.optimization.concatenateModules = !1, options.output.chunkFormat = !1, options.output.chunkLoading && "import" !== options.output.chunkLoading && (logger.warn(`\`output.chunkLoading\` should be \`"import"\` or \`false\`, but got ${options.output.chunkLoading}, changed it to \`"import"\``), options.output.chunkLoading = "import"), void 0 === options.output.chunkLoading && (options.output.chunkLoading = "import"), options.output.library && (options.output.library = void 0);
|
|
2309
|
+
options.optimization.concatenateModules = !1, options.optimization.removeEmptyChunks = !1, options.output.chunkFormat = !1, options.output.module = !0, options.output.chunkLoading && "import" !== options.output.chunkLoading && (logger.warn(`\`output.chunkLoading\` should be \`"import"\` or \`false\`, but got ${options.output.chunkLoading}, changed it to \`"import"\``), options.output.chunkLoading = "import"), void 0 === options.output.chunkLoading && (options.output.chunkLoading = "import"), options.output.library && (options.output.library = void 0);
|
|
2291
2310
|
let { splitChunks } = options.optimization;
|
|
2292
2311
|
void 0 === splitChunks && (splitChunks = options.optimization.splitChunks = {}), !1 !== splitChunks && (splitChunks.chunks = "all", splitChunks.minSize = 0, splitChunks.maxAsyncRequests = 1 / 0, splitChunks.maxInitialRequests = 1 / 0, splitChunks.cacheGroups ??= {}, splitChunks.cacheGroups.default = !1, splitChunks.cacheGroups.defaultVendors = !1);
|
|
2293
2312
|
}(compiler.options, logger), new RemoveDuplicateModulesPlugin().apply(compiler), err = (config = compiler.options).optimization.concatenateModules ? "You should disable `config.optimization.concatenateModules`" : !1 !== config.output.chunkFormat ? "You should disable default chunkFormat by `config.output.chunkFormat = false`" : void 0) throw new src_0.WebpackError(`Conflicted config for ${EsmLibraryPlugin.PLUGIN_NAME}: ${err}`);
|
|
@@ -2316,9 +2335,13 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
2316
2335
|
return o.path + o.query + o.fragment;
|
|
2317
2336
|
}
|
|
2318
2337
|
let unsupported = (name, issue)=>{
|
|
2319
|
-
let s = `${name} is not supported by
|
|
2320
|
-
throw issue && (s += `
|
|
2321
|
-
},
|
|
2338
|
+
let s = `${name} is not supported by Rspack.`;
|
|
2339
|
+
throw issue && (s += ` Refer to issue ${issue} for more information.`), Error(s);
|
|
2340
|
+
}, warnedMessages = new Set();
|
|
2341
|
+
function deprecate(message) {
|
|
2342
|
+
warnedMessages.has(message) || (warnedMessages.add(message), console.warn(`[Rspack Deprecation] ${message}`));
|
|
2343
|
+
}
|
|
2344
|
+
let WINDOWS_ABS_PATH_REGEXP = /^[a-zA-Z]:[\\/]/, SEGMENTS_SPLIT_REGEXP = /([|!])/, WINDOWS_PATH_SEPARATOR_REGEXP = /\\/g, relativePathToRequest = (relativePath)=>"" === relativePath ? "./." : ".." === relativePath ? "../." : relativePath.startsWith("../") ? relativePath : `./${relativePath}`, absoluteToRequest = (context, maybeAbsolutePath)=>{
|
|
2322
2345
|
if ("/" === maybeAbsolutePath[0]) {
|
|
2323
2346
|
if (maybeAbsolutePath.length > 1 && "/" === maybeAbsolutePath[maybeAbsolutePath.length - 1]) return maybeAbsolutePath;
|
|
2324
2347
|
let querySplitPos = maybeAbsolutePath.indexOf("?"), resource = -1 === querySplitPos ? maybeAbsolutePath : maybeAbsolutePath.slice(0, querySplitPos);
|
|
@@ -3973,7 +3996,6 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
3973
3996
|
commonjs: parser.commonjs,
|
|
3974
3997
|
importDynamic: parser.importDynamic,
|
|
3975
3998
|
commonjsMagicComments: parser.commonjsMagicComments,
|
|
3976
|
-
inlineConst: parser.inlineConst,
|
|
3977
3999
|
typeReexportsPresence: parser.typeReexportsPresence,
|
|
3978
4000
|
jsx: parser.jsx,
|
|
3979
4001
|
deferImport: parser.deferImport
|
|
@@ -4442,7 +4464,36 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
4442
4464
|
currentActiveModules
|
|
4443
4465
|
}), "thisCompilation"), LAZY_COMPILATION_PREFIX = "/lazy-compilation-using-", noop = (_req, _res, next)=>{
|
|
4444
4466
|
"function" == typeof next && next();
|
|
4445
|
-
}, DEPRECATED_LAZY_COMPILATION_OPTIONS_WARN = "The `experiments.lazyCompilation` option is deprecated, please use the configuration top level `lazyCompilation` instead.", REPEAT_LAZY_COMPILATION_OPTIONS_WARN = "Both top-level `lazyCompilation` and `experiments.lazyCompilation` options are set. The top-level `lazyCompilation` configuration will take precedence."
|
|
4467
|
+
}, DEPRECATED_LAZY_COMPILATION_OPTIONS_WARN = "The `experiments.lazyCompilation` option is deprecated, please use the configuration top level `lazyCompilation` instead.", REPEAT_LAZY_COMPILATION_OPTIONS_WARN = "Both top-level `lazyCompilation` and `experiments.lazyCompilation` options are set. The top-level `lazyCompilation` configuration will take precedence.", lazyCompilationMiddleware = (compiler)=>{
|
|
4468
|
+
if (compiler instanceof MultiCompiler) {
|
|
4469
|
+
let middlewareByCompiler = new Map(), i = 0;
|
|
4470
|
+
for (let c of compiler.compilers){
|
|
4471
|
+
if (c.options.experiments.lazyCompilation && (c.name ? deprecate(`The 'experiments.lazyCompilation' option in compiler named '${c.name}' is deprecated, please use the Configuration top level 'lazyCompilation' instead.`) : deprecate(DEPRECATED_LAZY_COMPILATION_OPTIONS_WARN)), c.options.lazyCompilation && c.options.experiments.lazyCompilation && (c.name ? deprecate(`The top-level 'lazyCompilation' option in compiler named '${c.name}' will override the 'experiments.lazyCompilation' option.`) : deprecate(REPEAT_LAZY_COMPILATION_OPTIONS_WARN)), !c.options.lazyCompilation && !c.options.experiments.lazyCompilation) continue;
|
|
4472
|
+
let options = {
|
|
4473
|
+
...c.options.experiments.lazyCompilation,
|
|
4474
|
+
...c.options.lazyCompilation
|
|
4475
|
+
}, prefix = options.prefix || LAZY_COMPILATION_PREFIX;
|
|
4476
|
+
options.prefix = `${prefix}__${i++}`;
|
|
4477
|
+
let activeModules = new Set();
|
|
4478
|
+
middlewareByCompiler.set(options.prefix, lazyCompilationMiddlewareInternal(compiler, activeModules, options.prefix)), applyPlugin(c, options, activeModules);
|
|
4479
|
+
}
|
|
4480
|
+
let keys = [
|
|
4481
|
+
...middlewareByCompiler.keys()
|
|
4482
|
+
];
|
|
4483
|
+
return (req, res, next)=>{
|
|
4484
|
+
let key = keys.find((key)=>req.url?.startsWith(key));
|
|
4485
|
+
if (!key) return next?.();
|
|
4486
|
+
let middleware = middlewareByCompiler.get(key);
|
|
4487
|
+
return middleware?.(req, res, next);
|
|
4488
|
+
};
|
|
4489
|
+
}
|
|
4490
|
+
if (compiler.options.experiments.lazyCompilation && (deprecate(DEPRECATED_LAZY_COMPILATION_OPTIONS_WARN), compiler.options.lazyCompilation && deprecate(REPEAT_LAZY_COMPILATION_OPTIONS_WARN)), !compiler.options.lazyCompilation && !compiler.options.experiments.lazyCompilation) return noop;
|
|
4491
|
+
let activeModules = new Set(), options = {
|
|
4492
|
+
...compiler.options.experiments.lazyCompilation,
|
|
4493
|
+
...compiler.options.lazyCompilation
|
|
4494
|
+
};
|
|
4495
|
+
return applyPlugin(compiler, options, activeModules), lazyCompilationMiddlewareInternal(compiler, activeModules, options.prefix || LAZY_COMPILATION_PREFIX);
|
|
4496
|
+
};
|
|
4446
4497
|
function applyPlugin(compiler, options, activeModules) {
|
|
4447
4498
|
let compiler1;
|
|
4448
4499
|
new BuiltinLazyCompilationPlugin(()=>{
|
|
@@ -5735,12 +5786,16 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
5735
5786
|
if ("function" != typeof options.entry) for (let key of Object.keys(options.entry))F(options.entry[key], "import", ()=>[
|
|
5736
5787
|
"./src"
|
|
5737
5788
|
]);
|
|
5738
|
-
F(options, "devtool", ()=>!!development && "eval"), D(options, "watch", !1), D(options, "profile", !1),
|
|
5789
|
+
F(options, "devtool", ()=>!!development && "eval"), D(options, "watch", !1), D(options, "profile", !1), F(options, "lazyCompilation", ()=>!!targetProperties && !!targetProperties.web && !targetProperties.electron && !targetProperties.node && !targetProperties.nwjs && {
|
|
5790
|
+
imports: !0,
|
|
5791
|
+
entries: !1
|
|
5792
|
+
}), D(options, "bail", !1), F(options, "cache", ()=>development), !1 === options.cache && (options.experiments.cache = !1), applyExperimentsDefaults(options.experiments, {
|
|
5739
5793
|
development
|
|
5740
5794
|
}), applyOptimizationDefaults(options.optimization, {
|
|
5741
5795
|
production,
|
|
5742
5796
|
development,
|
|
5743
|
-
css: options.experiments.css
|
|
5797
|
+
css: options.experiments.css,
|
|
5798
|
+
deprecatedInline: options.experiments.inlineConst || options.experiments.inlineEnum
|
|
5744
5799
|
}), applySnapshotDefaults(options.snapshot, {
|
|
5745
5800
|
production
|
|
5746
5801
|
}), applyModuleDefaults(options.module, {
|
|
@@ -5750,17 +5805,13 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
5750
5805
|
targetProperties,
|
|
5751
5806
|
mode: options.mode,
|
|
5752
5807
|
uniqueName: options.output.uniqueName,
|
|
5753
|
-
usedExports: !!options.optimization.usedExports,
|
|
5754
|
-
inlineConst: options.experiments.inlineConst,
|
|
5755
5808
|
deferImport: options.experiments.deferImport
|
|
5756
5809
|
}), applyOutputDefaults(options.output, {
|
|
5757
5810
|
context: options.context,
|
|
5758
5811
|
targetProperties,
|
|
5759
5812
|
isAffectedByBrowserslist: void 0 === target || "string" == typeof target && target.startsWith("browserslist") || Array.isArray(target) && target.some((target)=>target.startsWith("browserslist")),
|
|
5760
5813
|
outputModule: options.experiments.outputModule,
|
|
5761
|
-
|
|
5762
|
-
entry: options.entry,
|
|
5763
|
-
futureDefaults: options.experiments.futureDefaults
|
|
5814
|
+
entry: options.entry
|
|
5764
5815
|
}), applybundlerInfoDefaults(options.experiments.rspackFuture, options.output.library), applyExternalsPresetsDefaults(options.externalsPresets, {
|
|
5765
5816
|
targetProperties,
|
|
5766
5817
|
buildHttp: !!options.experiments.buildHttp
|
|
@@ -5783,17 +5834,15 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
5783
5834
|
let tty = infrastructureLogging.stream?.isTTY && "dumb" !== process.env.TERM;
|
|
5784
5835
|
D(infrastructureLogging, "level", "info"), D(infrastructureLogging, "debug", !1), D(infrastructureLogging, "colors", tty), D(infrastructureLogging, "appendOnly", !tty);
|
|
5785
5836
|
}, applyExperimentsDefaults = (experiments, { development })=>{
|
|
5786
|
-
F(experiments, "cache", ()=>development), D(experiments, "futureDefaults", !1), D(experiments, "lazyCompilation", !1), D(experiments, "asyncWebAssembly", experiments.futureDefaults), D(experiments, "css", !!experiments.futureDefaults || void 0), D(experiments, "topLevelAwait", !0), D(experiments, "deferImport", !1), D(experiments, "buildHttp", void 0), experiments.buildHttp && "object" == typeof experiments.buildHttp && D(experiments.buildHttp, "upgrade", !1), D(experiments, "incremental", {}), "object" == typeof experiments.incremental && (D(experiments.incremental, "silent", !0), D(experiments.incremental, "make", !0), D(experiments.incremental, "inferAsyncModules", !0), D(experiments.incremental, "providedExports", !0), D(experiments.incremental, "dependenciesDiagnostics", !0), D(experiments.incremental, "sideEffects", !0), D(experiments.incremental, "buildChunkGraph", !1), D(experiments.incremental, "moduleIds", !0), D(experiments.incremental, "chunkIds", !0), D(experiments.incremental, "modulesHashes", !0), D(experiments.incremental, "modulesCodegen", !0), D(experiments.incremental, "modulesRuntimeRequirements", !0), D(experiments.incremental, "chunksRuntimeRequirements", !0), D(experiments.incremental, "chunksHashes", !0), D(experiments.incremental, "chunksRender", !0), D(experiments.incremental, "emitAssets", !0)), D(experiments, "rspackFuture", {}), D(experiments, "
|
|
5837
|
+
F(experiments, "cache", ()=>development), D(experiments, "futureDefaults", !1), D(experiments, "lazyCompilation", !1), D(experiments, "asyncWebAssembly", experiments.futureDefaults), D(experiments, "css", !!experiments.futureDefaults || void 0), D(experiments, "topLevelAwait", !0), D(experiments, "deferImport", !1), D(experiments, "buildHttp", void 0), experiments.buildHttp && "object" == typeof experiments.buildHttp && D(experiments.buildHttp, "upgrade", !1), D(experiments, "incremental", {}), "object" == typeof experiments.incremental && (D(experiments.incremental, "silent", !0), D(experiments.incremental, "make", !0), D(experiments.incremental, "inferAsyncModules", !0), D(experiments.incremental, "providedExports", !0), D(experiments.incremental, "dependenciesDiagnostics", !0), D(experiments.incremental, "sideEffects", !0), D(experiments.incremental, "buildChunkGraph", !1), D(experiments.incremental, "moduleIds", !0), D(experiments.incremental, "chunkIds", !0), D(experiments.incremental, "modulesHashes", !0), D(experiments.incremental, "modulesCodegen", !0), D(experiments.incremental, "modulesRuntimeRequirements", !0), D(experiments.incremental, "chunksRuntimeRequirements", !0), D(experiments.incremental, "chunksHashes", !0), D(experiments.incremental, "chunksRender", !0), D(experiments.incremental, "emitAssets", !0)), D(experiments, "rspackFuture", {}), D(experiments, "parallelLoader", !1), D(experiments, "useInputFileSystem", !1), D(experiments, "inlineConst", !0), D(experiments, "inlineEnum", !1), D(experiments, "typeReexportsPresence", !1), D(experiments, "lazyBarrel", !0);
|
|
5787
5838
|
}, applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
5788
|
-
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.
|
|
5789
|
-
}, applySnapshotDefaults = (_snapshot, _env)=>{}, applyModuleDefaults = (module1, { cache, asyncWebAssembly, css, targetProperties, mode, uniqueName,
|
|
5790
|
-
if (assertNotNill(module1.parser), assertNotNill(module1.generator), cache ? D(module1, "unsafeCache", /[\\/]node_modules[\\/]/) : D(module1, "unsafeCache", !1), F(module1.parser, "asset", ()=>({})), assertNotNill(module1.parser.asset), F(module1.parser.asset, "dataUrlCondition", ()=>({})), "object" == typeof module1.parser.asset.dataUrlCondition && D(module1.parser.asset.dataUrlCondition, "maxSize", 8096), F(module1.parser, "javascript", ()=>({})), assertNotNill(module1.parser.javascript), ((parserOptions, {
|
|
5839
|
+
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.7.0-beta.1"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
|
|
5840
|
+
}, applySnapshotDefaults = (_snapshot, _env)=>{}, applyModuleDefaults = (module1, { cache, asyncWebAssembly, css, targetProperties, mode, uniqueName, deferImport })=>{
|
|
5841
|
+
if (assertNotNill(module1.parser), assertNotNill(module1.generator), cache ? D(module1, "unsafeCache", /[\\/]node_modules[\\/]/) : D(module1, "unsafeCache", !1), F(module1.parser, "asset", ()=>({})), assertNotNill(module1.parser.asset), F(module1.parser.asset, "dataUrlCondition", ()=>({})), "object" == typeof module1.parser.asset.dataUrlCondition && D(module1.parser.asset.dataUrlCondition, "maxSize", 8096), F(module1.parser, "javascript", ()=>({})), assertNotNill(module1.parser.javascript), ((parserOptions, { deferImport })=>{
|
|
5791
5842
|
D(parserOptions, "dynamicImportMode", "lazy"), D(parserOptions, "dynamicImportPrefetch", !1), D(parserOptions, "dynamicImportPreload", !1), D(parserOptions, "url", !0), D(parserOptions, "exprContextCritical", !0), D(parserOptions, "unknownContextCritical", !0), D(parserOptions, "wrappedContextCritical", !1), D(parserOptions, "wrappedContextRegExp", /.*/), D(parserOptions, "strictExportPresence", !1), D(parserOptions, "requireAsExpression", !0), D(parserOptions, "requireDynamic", !0), D(parserOptions, "requireResolve", !0), D(parserOptions, "commonjs", !0), D(parserOptions, "importDynamic", !0), D(parserOptions, "worker", [
|
|
5792
5843
|
"..."
|
|
5793
|
-
]), D(parserOptions, "importMeta", !0), D(parserOptions, "
|
|
5844
|
+
]), D(parserOptions, "importMeta", !0), D(parserOptions, "typeReexportsPresence", "no-tolerant"), D(parserOptions, "jsx", !1), D(parserOptions, "deferImport", deferImport);
|
|
5794
5845
|
})(module1.parser.javascript, {
|
|
5795
|
-
usedExports,
|
|
5796
|
-
inlineConst,
|
|
5797
5846
|
deferImport
|
|
5798
5847
|
}), F(module1.parser, "json", ()=>({})), assertNotNill(module1.parser.json), D(module1.parser.json, "exportsDepth", "development" === mode ? 1 : Number.MAX_SAFE_INTEGER), F(module1.generator, "json", ()=>({})), assertNotNill(module1.generator.json), D(module1.generator.json, "JSONParse", !0), css) {
|
|
5799
5848
|
F(module1.parser, "css", ()=>({})), assertNotNill(module1.parser.css), D(module1.parser.css, "namedExports", !0), D(module1.parser.css, "url", !0), F(module1.parser, "css/auto", ()=>({})), assertNotNill(module1.parser["css/auto"]), D(module1.parser["css/auto"], "namedExports", !0), D(module1.parser["css/auto"], "url", !0), F(module1.parser, "css/module", ()=>({})), assertNotNill(module1.parser["css/module"]), D(module1.parser["css/module"], "namedExports", !0), D(module1.parser["css/module"], "url", !0), F(module1.generator, "css", ()=>({})), assertNotNill(module1.generator.css), D(module1.generator.css, "exportsOnly", !targetProperties || !targetProperties.document), D(module1.generator.css, "esModule", !0), F(module1.generator, "css/auto", ()=>({})), assertNotNill(module1.generator["css/auto"]), D(module1.generator["css/auto"], "exportsOnly", !targetProperties || !targetProperties.document), D(module1.generator["css/auto"], "exportsConvention", "as-is");
|
|
@@ -5914,15 +5963,20 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
5914
5963
|
type: "json"
|
|
5915
5964
|
},
|
|
5916
5965
|
type: "json"
|
|
5966
|
+
}, {
|
|
5967
|
+
with: {
|
|
5968
|
+
type: "text"
|
|
5969
|
+
},
|
|
5970
|
+
type: "asset/source"
|
|
5917
5971
|
}), rules;
|
|
5918
5972
|
});
|
|
5919
|
-
}, applyOutputDefaults = (output, { context, outputModule, targetProperties: tp, isAffectedByBrowserslist,
|
|
5973
|
+
}, applyOutputDefaults = (output, { context, outputModule, targetProperties: tp, isAffectedByBrowserslist, entry })=>{
|
|
5920
5974
|
let getLibraryName = (library)=>{
|
|
5921
5975
|
let libraryName = "object" == typeof library && library && !Array.isArray(library) && "type" in library ? library.name : library;
|
|
5922
5976
|
return Array.isArray(libraryName) ? libraryName.join(".") : "object" == typeof libraryName ? getLibraryName(libraryName.root) : "string" == typeof libraryName ? libraryName : "";
|
|
5923
5977
|
};
|
|
5924
5978
|
F(output, "uniqueName", ()=>{
|
|
5925
|
-
let libraryName = getLibraryName(output.library).replace(/^\[(\\*[\w:]+\\*)\](\.)|(\.)\[(\\*[\w:]+\\*)\](?=\.|$)|\[(\\*[\w:]+\\*)\]/g, (
|
|
5979
|
+
let libraryName = getLibraryName(output.library).replace(/^\[(\\*[\w:]+\\*)\](\.)|(\.)\[(\\*[\w:]+\\*)\](?=\.|$)|\[(\\*[\w:]+\\*)\]/g, (_, a, d1, d2, b, c)=>{
|
|
5926
5980
|
let content = a || b || c;
|
|
5927
5981
|
return content.startsWith("\\") && content.endsWith("\\") ? `${d2 || ""}[${content.slice(1, -1)}]${d1 || ""}` : "";
|
|
5928
5982
|
});
|
|
@@ -6035,7 +6089,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6035
6089
|
if (tp) {
|
|
6036
6090
|
if (tp.fetchWasm) return "fetch";
|
|
6037
6091
|
if (tp.nodeBuiltins) return "async-node";
|
|
6038
|
-
null === tp.nodeBuiltins || tp.fetchWasm;
|
|
6092
|
+
if ((null === tp.nodeBuiltins || null === tp.fetchWasm) && output.module && environment.dynamicImport) return "universal";
|
|
6039
6093
|
}
|
|
6040
6094
|
return !1;
|
|
6041
6095
|
}), F(output, "workerWasmLoading", ()=>output.wasmLoading), F(output, "globalObject", ()=>{
|
|
@@ -6062,7 +6116,9 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6062
6116
|
}), Array.from(enabledChunkLoadingTypes);
|
|
6063
6117
|
}), A(output, "enabledWasmLoadingTypes", ()=>{
|
|
6064
6118
|
let enabledWasmLoadingTypes = new Set();
|
|
6065
|
-
return output.wasmLoading && enabledWasmLoadingTypes.add(output.wasmLoading), output.workerWasmLoading && enabledWasmLoadingTypes.add(output.workerWasmLoading),
|
|
6119
|
+
return output.wasmLoading && enabledWasmLoadingTypes.add(output.wasmLoading), output.workerWasmLoading && enabledWasmLoadingTypes.add(output.workerWasmLoading), forEachEntry((desc)=>{
|
|
6120
|
+
desc.wasmLoading && enabledWasmLoadingTypes.add(desc.wasmLoading);
|
|
6121
|
+
}), Array.from(enabledWasmLoadingTypes);
|
|
6066
6122
|
});
|
|
6067
6123
|
}, applyExternalsPresetsDefaults = (externalsPresets, { targetProperties, buildHttp })=>{
|
|
6068
6124
|
D(externalsPresets, "web", !buildHttp && targetProperties?.web), D(externalsPresets, "node", targetProperties?.node), D(externalsPresets, "electron", targetProperties?.electron), D(externalsPresets, "electronMain", targetProperties?.electron && targetProperties.electronMain), D(externalsPresets, "electronPreload", targetProperties?.electron && targetProperties.electronPreload), D(externalsPresets, "electronRenderer", targetProperties?.electron && targetProperties.electronRenderer), D(externalsPresets, "nwjs", targetProperties?.nwjs);
|
|
@@ -6079,8 +6135,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6079
6135
|
!1 !== node && (F(node, "global", ()=>!targetProperties?.global && "warn"), F(node, "__dirname", ()=>targetProperties?.node ? outputModule ? "node-module" : "eval-only" : "warn-mock"), F(node, "__filename", ()=>targetProperties?.node ? outputModule ? "node-module" : "eval-only" : "warn-mock"));
|
|
6080
6136
|
}, applyPerformanceDefaults = (performance, { production })=>{
|
|
6081
6137
|
!1 !== performance && (D(performance, "maxAssetSize", 250000), D(performance, "maxEntrypointSize", 250000), F(performance, "hints", ()=>!!production && "warning"));
|
|
6082
|
-
}, applyOptimizationDefaults = (optimization, { production, development, css })=>{
|
|
6083
|
-
D(optimization, "removeAvailableModules", !0), D(optimization, "removeEmptyChunks", !0), D(optimization, "mergeDuplicateChunks", !0), F(optimization, "moduleIds", ()=>production ? "deterministic" : development ? "named" : "natural"), F(optimization, "chunkIds", ()=>production ? "deterministic" : development ? "named" : "natural"), F(optimization, "sideEffects", ()=>!!production || "flag"), D(optimization, "mangleExports", production), D(optimization, "providedExports", !0), D(optimization, "usedExports", production), D(optimization, "innerGraph", production), D(optimization, "emitOnErrors", !production), D(optimization, "runtimeChunk", !1), D(optimization, "realContentHash", production), D(optimization, "avoidEntryIife", !1), D(optimization, "minimize", production), D(optimization, "concatenateModules", production), A(optimization, "minimizer", ()=>[
|
|
6138
|
+
}, applyOptimizationDefaults = (optimization, { production, development, css, deprecatedInline })=>{
|
|
6139
|
+
D(optimization, "removeAvailableModules", !0), D(optimization, "removeEmptyChunks", !0), D(optimization, "mergeDuplicateChunks", !0), F(optimization, "moduleIds", ()=>production ? "deterministic" : development ? "named" : "natural"), F(optimization, "chunkIds", ()=>production ? "deterministic" : development ? "named" : "natural"), F(optimization, "sideEffects", ()=>!!production || "flag"), D(optimization, "mangleExports", production), D(optimization, "inlineExports", deprecatedInline && production), D(optimization, "providedExports", !0), D(optimization, "usedExports", production), D(optimization, "innerGraph", production), D(optimization, "emitOnErrors", !production), D(optimization, "runtimeChunk", !1), D(optimization, "realContentHash", production), D(optimization, "avoidEntryIife", !1), D(optimization, "minimize", production), D(optimization, "concatenateModules", production), A(optimization, "minimizer", ()=>[
|
|
6084
6140
|
new SwcJsMinimizerRspackPlugin(),
|
|
6085
6141
|
new LightningCssMinimizerRspackPlugin()
|
|
6086
6142
|
]), F(optimization, "nodeEnv", ()=>production ? "production" : !!development && "development");
|
|
@@ -6243,13 +6299,15 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6243
6299
|
}, getPnpDefault = ()=>!!process.versions.pnp, getNormalizedRspackOptions = (config)=>{
|
|
6244
6300
|
let fn;
|
|
6245
6301
|
return {
|
|
6246
|
-
ignoreWarnings:
|
|
6247
|
-
if (
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6302
|
+
ignoreWarnings: ((ignoreWarnings)=>{
|
|
6303
|
+
if (ignoreWarnings) return ignoreWarnings.map((ignore)=>{
|
|
6304
|
+
if ("function" == typeof ignore) return ignore;
|
|
6305
|
+
let rule = ignore instanceof RegExp ? {
|
|
6306
|
+
message: ignore
|
|
6307
|
+
} : ignore;
|
|
6308
|
+
return (warning)=>(!!rule.message || !!rule.module || !!rule.file) && (!rule.message || !!rule.message.test(warning.message)) && (!rule.module || !!warning.module && !!rule.module.test(warning.module.readableIdentifier())) && (!rule.file || !!warning.file && !!rule.file.test(warning.file));
|
|
6309
|
+
});
|
|
6310
|
+
})(config.ignoreWarnings),
|
|
6253
6311
|
name: config.name,
|
|
6254
6312
|
dependencies: config.dependencies,
|
|
6255
6313
|
context: config.context,
|
|
@@ -6258,7 +6316,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6258
6316
|
main: {}
|
|
6259
6317
|
} : "function" == typeof config.entry ? (fn = config.entry, ()=>Promise.resolve().then(fn).then(getNormalizedEntryStatic)) : getNormalizedEntryStatic(config.entry),
|
|
6260
6318
|
output: nestedConfig(config.output, (output)=>{
|
|
6261
|
-
"cssHeadDataCompression" in output &&
|
|
6319
|
+
"cssHeadDataCompression" in output && deprecate("cssHeadDataCompression is not used now, see https://github.com/web-infra-dev/rspack/pull/8534, this option could be removed in the future");
|
|
6262
6320
|
let { library } = output, libraryBase = "object" == typeof library && library && !Array.isArray(library) && "type" in library ? library : library || output.libraryTarget ? {
|
|
6263
6321
|
name: library
|
|
6264
6322
|
} : void 0;
|
|
@@ -6397,7 +6455,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6397
6455
|
plugins: nestedArray(config.plugins, (p)=>[
|
|
6398
6456
|
...p
|
|
6399
6457
|
]),
|
|
6400
|
-
experiments: nestedConfig(config.experiments, (experiments)=>(experiments.layers &&
|
|
6458
|
+
experiments: nestedConfig(config.experiments, (experiments)=>(experiments.layers && deprecate("`experiments.layers` config is deprecated and will be removed in Rspack v2.0. Feature layers will always be enabled. Remove this option from your Rspack configuration."), !1 === experiments.topLevelAwait && deprecate("`experiments.topLevelAwait` config is deprecated and will be removed in Rspack v2.0. Top-level await will always be enabled. Remove this option from your Rspack configuration."), experiments.lazyBarrel && deprecate("`experiments.lazyBarrel` config is deprecated and will be removed in Rspack v2.0. Lazy barrel is already stable and enabled by default. Remove this option from your Rspack configuration."), experiments.inlineConst && deprecate("`experiments.inlineConst` config is deprecated and will be removed in Rspack v2.0. Inline Const is already stable and enabled by default. Remove this option from your Rspack configuration."), experiments.inlineEnum && deprecate("`experiments.inlineEnum` config is deprecated and will be removed in Rspack v2.0. Inline Enum is already stable. Remove this option from your Rspack configuration."), experiments.typeReexportsPresence && deprecate("`experiments.typeReexportsPresence` config is deprecated and will be removed in Rspack v2.0. typeReexportsPresence is already stable. Remove this option from your Rspack configuration."), {
|
|
6401
6459
|
...experiments,
|
|
6402
6460
|
cache: optionalNestedConfig(experiments.cache, (cache)=>{
|
|
6403
6461
|
if ("boolean" == typeof cache || "memory" === cache.type) return cache;
|
|
@@ -6416,7 +6474,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6416
6474
|
managedPaths: optionalNestedArray(snapshot.managedPaths, (p)=>[
|
|
6417
6475
|
...p
|
|
6418
6476
|
]) || [
|
|
6419
|
-
|
|
6477
|
+
/[\\/]node_modules[\\/][^.]/
|
|
6420
6478
|
]
|
|
6421
6479
|
},
|
|
6422
6480
|
storage: {
|
|
@@ -6427,7 +6485,6 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6427
6485
|
}),
|
|
6428
6486
|
lazyCompilation: optionalNestedConfig(experiments.lazyCompilation, (options)=>!0 === options ? {} : options),
|
|
6429
6487
|
incremental: optionalNestedConfig(experiments.incremental, (options)=>getNormalizedIncrementalOptions(options)),
|
|
6430
|
-
parallelCodeSplitting: experiments.parallelCodeSplitting,
|
|
6431
6488
|
buildHttp: experiments.buildHttp,
|
|
6432
6489
|
parallelLoader: experiments.parallelLoader,
|
|
6433
6490
|
useInputFileSystem: experiments.useInputFileSystem
|
|
@@ -6883,7 +6940,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6883
6940
|
constructor(fs){
|
|
6884
6941
|
if (Object.assign(this, NOOP_FILESYSTEM), !fs) return;
|
|
6885
6942
|
this.writeFile = memoizeFn(()=>external_node_util_default().promisify(fs.writeFile.bind(fs))), this.removeFile = memoizeFn(()=>external_node_util_default().promisify(fs.unlink.bind(fs))), this.mkdir = memoizeFn(()=>external_node_util_default().promisify(fs.mkdir.bind(fs))), this.mkdirp = memoizeFn(()=>external_node_util_default().promisify(mkdirp.bind(null, fs))), this.removeDirAll = memoizeFn(()=>external_node_util_default().promisify((function rmrf(fs, p, callback) {
|
|
6886
|
-
fs.stat(p, (err, stats)=>{
|
|
6943
|
+
(fs.lstat || fs.stat)(p, (err, stats)=>{
|
|
6887
6944
|
if (err) return "ENOENT" === err.code ? callback() : callback(err);
|
|
6888
6945
|
stats.isDirectory() ? fs.readdir(p, (err, files)=>{
|
|
6889
6946
|
if (err) return callback(err);
|
|
@@ -6938,7 +6995,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6938
6995
|
readFn(fd, {
|
|
6939
6996
|
position,
|
|
6940
6997
|
length
|
|
6941
|
-
}, (err,
|
|
6998
|
+
}, (err, _bytesRead, buffer)=>{
|
|
6942
6999
|
err ? resolve(err) : resolve(buffer);
|
|
6943
7000
|
});
|
|
6944
7001
|
});
|
|
@@ -7233,10 +7290,10 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
7233
7290
|
constructor(binding){
|
|
7234
7291
|
this.#binding = binding;
|
|
7235
7292
|
}
|
|
7236
|
-
resolveSync(
|
|
7293
|
+
resolveSync(_context, path, request) {
|
|
7237
7294
|
return this.#binding.resolveSync(path, request) ?? !1;
|
|
7238
7295
|
}
|
|
7239
|
-
resolve(
|
|
7296
|
+
resolve(_context, path, request, resolveContext, callback) {
|
|
7240
7297
|
this.#binding.resolve(path, request, (error, text)=>{
|
|
7241
7298
|
if (error) return void callback(error);
|
|
7242
7299
|
let req = text ? JSON.parse(text) : void 0;
|
|
@@ -7545,7 +7602,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
7545
7602
|
});
|
|
7546
7603
|
}
|
|
7547
7604
|
}
|
|
7548
|
-
let CORE_VERSION = "1.
|
|
7605
|
+
let CORE_VERSION = "1.7.0-beta.1", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
|
|
7549
7606
|
|
|
7550
7607
|
Help:
|
|
7551
7608
|
Looks like you are using a custom binding (via environment variable 'RSPACK_BINDING=${process.env.RSPACK_BINDING}').
|
|
@@ -8178,11 +8235,11 @@ Help:
|
|
|
8178
8235
|
parser: Object.fromEntries(Object.entries(parser = module1.parser).map(([k, v])=>[
|
|
8179
8236
|
k,
|
|
8180
8237
|
getRawParserOptions(v, k)
|
|
8181
|
-
]).filter(([
|
|
8238
|
+
]).filter(([_, v])=>void 0 !== v)),
|
|
8182
8239
|
generator: Object.fromEntries(Object.entries(generator = module1.generator).map(([k, v])=>[
|
|
8183
8240
|
k,
|
|
8184
8241
|
getRawGeneratorOptions(v, k)
|
|
8185
|
-
]).filter(([
|
|
8242
|
+
]).filter(([_, v])=>void 0 !== v)),
|
|
8186
8243
|
noParse: module1.noParse,
|
|
8187
8244
|
unsafeCache: module1.unsafeCache
|
|
8188
8245
|
};
|
|
@@ -8400,9 +8457,9 @@ Help:
|
|
|
8400
8457
|
codeGenerationResult: new CodeGenerationResult(result),
|
|
8401
8458
|
moduleObject
|
|
8402
8459
|
}, {
|
|
8403
|
-
[
|
|
8460
|
+
[RuntimeGlobals.require]: moduleRequireFn
|
|
8404
8461
|
}), "Compilation.hooks.executeModule"), moduleObject.loaded = !0, moduleObject.exports;
|
|
8405
|
-
}, moduleCache = moduleRequireFn[
|
|
8462
|
+
}, moduleCache = moduleRequireFn[RuntimeGlobals.moduleCache.replace(`${RuntimeGlobals.require}.`, "")] = {}, interceptModuleExecution = moduleRequireFn[RuntimeGlobals.interceptModuleExecution.replace(`${RuntimeGlobals.require}.`, "")] = [];
|
|
8406
8463
|
for (let runtimeModule of runtimeModules)moduleRequireFn(runtimeModule);
|
|
8407
8464
|
let executeResult = moduleRequireFn(entry);
|
|
8408
8465
|
getCompiler2().__internal__get_module_execution_results_map().set(id, executeResult);
|
|
@@ -8854,7 +8911,7 @@ Help:
|
|
|
8854
8911
|
obj.children = this.stats.map((stat, idx)=>{
|
|
8855
8912
|
let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
|
|
8856
8913
|
return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
|
|
8857
|
-
}), childOptions.version && (obj.rspackVersion = "1.
|
|
8914
|
+
}), childOptions.version && (obj.rspackVersion = "1.7.0-beta.1", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
|
|
8858
8915
|
let mapError = (j, obj)=>({
|
|
8859
8916
|
...obj,
|
|
8860
8917
|
compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
|
|
@@ -9197,7 +9254,13 @@ Help:
|
|
|
9197
9254
|
}
|
|
9198
9255
|
apply(compiler) {
|
|
9199
9256
|
compiler.hooks.compilation.tap(this.name, (compilation)=>{
|
|
9200
|
-
compilation.hooks.processWarnings.tap(this.name, (warnings)=>warnings.filter((warning)
|
|
9257
|
+
compilation.hooks.processWarnings.tap(this.name, (warnings)=>warnings.filter((warning)=>{
|
|
9258
|
+
let plainWarning = warning.message ? {
|
|
9259
|
+
...warning,
|
|
9260
|
+
message: external_node_util_default().stripVTControlCharacters(warning.message)
|
|
9261
|
+
} : warning;
|
|
9262
|
+
return !this._ignorePattern.some((ignore)=>ignore(plainWarning, compilation));
|
|
9263
|
+
}));
|
|
9201
9264
|
});
|
|
9202
9265
|
}
|
|
9203
9266
|
};
|
|
@@ -9727,15 +9790,20 @@ Help:
|
|
|
9727
9790
|
if (!1 === logging && !debugMode) continue;
|
|
9728
9791
|
let groupStack = [], rootList = [], currentList = rootList, processedLogEntries = 0;
|
|
9729
9792
|
for (let entry of logEntries){
|
|
9730
|
-
let type = entry.type, typeBitFlag = getLogTypeBitFlag(type);
|
|
9793
|
+
let message, type = entry.type, typeBitFlag = getLogTypeBitFlag(type);
|
|
9731
9794
|
if (!debugMode && (acceptedTypes & typeBitFlag) !== typeBitFlag) continue;
|
|
9732
9795
|
if (type === LogType.groupCollapsed && (debugMode || collapsedGroups) && (type = LogType.group), 0 === depthInCollapsedGroup && processedLogEntries++, type === LogType.groupEnd) {
|
|
9733
9796
|
groupStack.pop(), currentList = groupStack.length > 0 ? groupStack[groupStack.length - 1].children : rootList, depthInCollapsedGroup > 0 && depthInCollapsedGroup--;
|
|
9734
9797
|
continue;
|
|
9735
9798
|
}
|
|
9799
|
+
if (entry.type === LogType.time) {
|
|
9800
|
+
let [label, first, second] = entry.args;
|
|
9801
|
+
"number" == typeof first && "number" == typeof second && (message = `${label}: ${1000 * first + second / 1000000} ms`);
|
|
9802
|
+
}
|
|
9803
|
+
message || (message = entry.args?.length ? external_node_util_namespaceObject.format(entry.args[0], ...entry.args.slice(1)) : "");
|
|
9736
9804
|
let newEntry = {
|
|
9737
9805
|
type,
|
|
9738
|
-
message:
|
|
9806
|
+
message: message || "",
|
|
9739
9807
|
trace: loggingTrace ? entry.trace : void 0,
|
|
9740
9808
|
children: type === LogType.group || type === LogType.groupCollapsed ? [] : void 0
|
|
9741
9809
|
};
|
|
@@ -9753,7 +9821,7 @@ Help:
|
|
|
9753
9821
|
object.hash = context.getStatsCompilation(compilation).hash;
|
|
9754
9822
|
},
|
|
9755
9823
|
version: (object)=>{
|
|
9756
|
-
object.version = "5.75.0", object.rspackVersion = "1.
|
|
9824
|
+
object.version = "5.75.0", object.rspackVersion = "1.7.0-beta.1";
|
|
9757
9825
|
},
|
|
9758
9826
|
env: (object, _compilation, _context, { _env })=>{
|
|
9759
9827
|
object.env = _env;
|
|
@@ -9801,7 +9869,7 @@ Help:
|
|
|
9801
9869
|
}), options.assetsSpace ?? 1 / 0);
|
|
9802
9870
|
object.assets = limited.children, object.filteredAssets = limited.filteredChildren;
|
|
9803
9871
|
},
|
|
9804
|
-
chunks: (object, compilation, context,
|
|
9872
|
+
chunks: (object, compilation, context, _options, factory)=>{
|
|
9805
9873
|
let { type, getStatsCompilation } = context, chunks = getStatsCompilation(compilation).chunks;
|
|
9806
9874
|
object.chunks = factory.create(`${type}.chunks`, chunks, context);
|
|
9807
9875
|
},
|
|
@@ -10255,8 +10323,8 @@ Help:
|
|
|
10255
10323
|
warningsFilter: (value)=>(Array.isArray(value) ? value : value ? [
|
|
10256
10324
|
value
|
|
10257
10325
|
] : []).map((filter)=>{
|
|
10258
|
-
if ("string" == typeof filter) return (
|
|
10259
|
-
if (filter instanceof RegExp) return (
|
|
10326
|
+
if ("string" == typeof filter) return (_warning, warningString)=>warningString.includes(filter);
|
|
10327
|
+
if (filter instanceof RegExp) return (_warning, warningString)=>filter.test(warningString);
|
|
10260
10328
|
if ("function" == typeof filter) return filter;
|
|
10261
10329
|
throw Error(`Can only filter warnings with Strings or RegExps. (Given: ${filter})`);
|
|
10262
10330
|
}),
|
|
@@ -11092,7 +11160,7 @@ Help:
|
|
|
11092
11160
|
moduleFilenameTemplate: options.output.devtoolModuleFilenameTemplate,
|
|
11093
11161
|
namespace: options.output.devtoolNamespace
|
|
11094
11162
|
}).apply(compiler);
|
|
11095
|
-
if (new JavascriptModulesPlugin().apply(compiler), new URLPlugin().apply(compiler), new JsonModulesPlugin().apply(compiler), new AssetModulesPlugin().apply(compiler), options.experiments.asyncWebAssembly && new AsyncWebAssemblyModulesPlugin().apply(compiler), options.experiments.css && new CssModulesPlugin().apply(compiler), new lib_EntryOptionPlugin().apply(compiler), assertNotNill(options.context), compiler.hooks.entryOption.call(options.context, options.entry), new RuntimePlugin().apply(compiler), options.experiments.rspackFuture.bundlerInfo && new BundlerInfoRspackPlugin(options.experiments.rspackFuture.bundlerInfo).apply(compiler), new InferAsyncModulesPlugin().apply(compiler), new APIPlugin().apply(compiler), new DataUriPlugin().apply(compiler), new FileUriPlugin().apply(compiler), options.experiments.buildHttp && new HttpUriPlugin(options.experiments.buildHttp).apply(compiler), new EnsureChunkConditionsPlugin().apply(compiler), options.optimization.mergeDuplicateChunks && new MergeDuplicateChunksPlugin().apply(compiler), options.optimization.sideEffects && new SideEffectsFlagPlugin().apply(compiler), options.optimization.providedExports && new FlagDependencyExportsPlugin().apply(compiler), options.optimization.usedExports && new FlagDependencyUsagePlugin("global" === options.optimization.usedExports).apply(compiler), options.optimization.concatenateModules && new ModuleConcatenationPlugin().apply(compiler),
|
|
11163
|
+
if (new JavascriptModulesPlugin().apply(compiler), new URLPlugin().apply(compiler), new JsonModulesPlugin().apply(compiler), new AssetModulesPlugin().apply(compiler), options.experiments.asyncWebAssembly && new AsyncWebAssemblyModulesPlugin().apply(compiler), options.experiments.css && new CssModulesPlugin().apply(compiler), new lib_EntryOptionPlugin().apply(compiler), assertNotNill(options.context), compiler.hooks.entryOption.call(options.context, options.entry), new RuntimePlugin().apply(compiler), options.experiments.rspackFuture.bundlerInfo && new BundlerInfoRspackPlugin(options.experiments.rspackFuture.bundlerInfo).apply(compiler), new InferAsyncModulesPlugin().apply(compiler), new APIPlugin().apply(compiler), new DataUriPlugin().apply(compiler), new FileUriPlugin().apply(compiler), options.experiments.buildHttp && new HttpUriPlugin(options.experiments.buildHttp).apply(compiler), new EnsureChunkConditionsPlugin().apply(compiler), options.optimization.mergeDuplicateChunks && new MergeDuplicateChunksPlugin().apply(compiler), options.optimization.sideEffects && new SideEffectsFlagPlugin().apply(compiler), options.optimization.providedExports && new FlagDependencyExportsPlugin().apply(compiler), options.optimization.usedExports && new FlagDependencyUsagePlugin("global" === options.optimization.usedExports).apply(compiler), options.optimization.concatenateModules && new ModuleConcatenationPlugin().apply(compiler), options.optimization.inlineExports && new InlineExportsPlugin().apply(compiler), options.optimization.mangleExports && new MangleExportsPlugin("size" !== options.optimization.mangleExports).apply(compiler), options.output.enabledLibraryTypes && options.output.enabledLibraryTypes.length > 0) for (let type of options.output.enabledLibraryTypes)new EnableLibraryPlugin(type).apply(compiler);
|
|
11096
11164
|
options.optimization.splitChunks && new SplitChunksPlugin(options.optimization.splitChunks).apply(compiler), options.optimization.removeEmptyChunks && new RemoveEmptyChunksPlugin().apply(compiler), options.optimization.realContentHash && new RealContentHashPlugin().apply(compiler);
|
|
11097
11165
|
let moduleIds = options.optimization.moduleIds;
|
|
11098
11166
|
if (moduleIds) switch(moduleIds){
|
|
@@ -11319,7 +11387,7 @@ Help:
|
|
|
11319
11387
|
});
|
|
11320
11388
|
}
|
|
11321
11389
|
}
|
|
11322
|
-
var CachedInputFileSystem = __webpack_require__("../../node_modules/.pnpm/enhanced-resolve@5.18.
|
|
11390
|
+
var CachedInputFileSystem = __webpack_require__("../../node_modules/.pnpm/enhanced-resolve@5.18.4/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js"), CachedInputFileSystem_default = __webpack_require__.n(CachedInputFileSystem);
|
|
11323
11391
|
let filterToFunction = (item)=>{
|
|
11324
11392
|
if ("string" == typeof item) {
|
|
11325
11393
|
let regExp = RegExp(`[\\\\/]${item.replace(/[-[\]{}()*+?.\\^$|]/g, "\\$&")}([\\\\/]|$|!|\\?)`);
|
|
@@ -11972,7 +12040,7 @@ Help:
|
|
|
11972
12040
|
let _options = JSON.stringify(options || {});
|
|
11973
12041
|
return binding_default().transform(source, _options);
|
|
11974
12042
|
}
|
|
11975
|
-
let exports_rspackVersion = "1.
|
|
12043
|
+
let exports_rspackVersion = "1.7.0-beta.1", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
|
|
11976
12044
|
getNormalizedRspackOptions: getNormalizedRspackOptions,
|
|
11977
12045
|
applyRspackOptionsDefaults: applyRspackOptionsDefaults,
|
|
11978
12046
|
getNormalizedWebpackOptions: getNormalizedRspackOptions,
|
|
@@ -12080,7 +12148,7 @@ Help:
|
|
|
12080
12148
|
}), sum;
|
|
12081
12149
|
}, {}), manifestExposes = function(exposes) {
|
|
12082
12150
|
if (!exposes) return;
|
|
12083
|
-
let result = parseOptions(exposes, (value
|
|
12151
|
+
let result = parseOptions(exposes, (value)=>({
|
|
12084
12152
|
import: Array.isArray(value) ? value : [
|
|
12085
12153
|
value
|
|
12086
12154
|
],
|
|
@@ -12176,41 +12244,12 @@ Help:
|
|
|
12176
12244
|
}
|
|
12177
12245
|
},
|
|
12178
12246
|
RemoveDuplicateModulesPlugin: RemoveDuplicateModulesPlugin,
|
|
12247
|
+
SubresourceIntegrityPlugin: SubresourceIntegrityPlugin,
|
|
12179
12248
|
EsmLibraryPlugin: EsmLibraryPlugin,
|
|
12180
12249
|
RsdoctorPlugin: RsdoctorPluginImpl,
|
|
12181
12250
|
RstestPlugin: RstestPlugin,
|
|
12182
12251
|
RslibPlugin: RslibPlugin,
|
|
12183
|
-
|
|
12184
|
-
lazyCompilationMiddleware: (compiler)=>{
|
|
12185
|
-
if (compiler instanceof MultiCompiler) {
|
|
12186
|
-
let middlewareByCompiler = new Map(), i = 0, isReportDeprecatedWarned = !1, isReportRepeatWarned = !1;
|
|
12187
|
-
for (let c of compiler.compilers){
|
|
12188
|
-
if (c.options.experiments.lazyCompilation && (c.name ? console.warn(`The 'experiments.lazyCompilation' option in compiler named '${c.name}' is deprecated, please use the Configuration top level 'lazyCompilation' instead.`) : isReportDeprecatedWarned || (console.warn(DEPRECATED_LAZY_COMPILATION_OPTIONS_WARN), isReportDeprecatedWarned = !0)), c.options.lazyCompilation && c.options.experiments.lazyCompilation && (c.name ? console.warn(`The top-level 'lazyCompilation' option in compiler named '${c.name}' will override the 'experiments.lazyCompilation' option.`) : isReportRepeatWarned || (console.warn(REPEAT_LAZY_COMPILATION_OPTIONS_WARN), isReportRepeatWarned = !0)), !c.options.lazyCompilation && !c.options.experiments.lazyCompilation) continue;
|
|
12189
|
-
let options = {
|
|
12190
|
-
...c.options.experiments.lazyCompilation,
|
|
12191
|
-
...c.options.lazyCompilation
|
|
12192
|
-
}, prefix = options.prefix || LAZY_COMPILATION_PREFIX;
|
|
12193
|
-
options.prefix = `${prefix}__${i++}`;
|
|
12194
|
-
let activeModules = new Set();
|
|
12195
|
-
middlewareByCompiler.set(options.prefix, lazyCompilationMiddlewareInternal(compiler, activeModules, options.prefix)), applyPlugin(c, options, activeModules);
|
|
12196
|
-
}
|
|
12197
|
-
let keys = [
|
|
12198
|
-
...middlewareByCompiler.keys()
|
|
12199
|
-
];
|
|
12200
|
-
return (req, res, next)=>{
|
|
12201
|
-
let key = keys.find((key)=>req.url?.startsWith(key));
|
|
12202
|
-
if (!key) return next?.();
|
|
12203
|
-
let middleware = middlewareByCompiler.get(key);
|
|
12204
|
-
return middleware?.(req, res, next);
|
|
12205
|
-
};
|
|
12206
|
-
}
|
|
12207
|
-
if (compiler.options.experiments.lazyCompilation && (console.warn(DEPRECATED_LAZY_COMPILATION_OPTIONS_WARN), compiler.options.lazyCompilation && console.warn(REPEAT_LAZY_COMPILATION_OPTIONS_WARN)), !compiler.options.lazyCompilation && !compiler.options.experiments.lazyCompilation) return noop;
|
|
12208
|
-
let activeModules = new Set(), options = {
|
|
12209
|
-
...compiler.options.experiments.lazyCompilation,
|
|
12210
|
-
...compiler.options.lazyCompilation
|
|
12211
|
-
};
|
|
12212
|
-
return applyPlugin(compiler, options, activeModules), lazyCompilationMiddlewareInternal(compiler, activeModules, options.prefix || LAZY_COMPILATION_PREFIX);
|
|
12213
|
-
},
|
|
12252
|
+
lazyCompilationMiddleware: lazyCompilationMiddleware,
|
|
12214
12253
|
swc: {
|
|
12215
12254
|
minify: minify,
|
|
12216
12255
|
transform: transform,
|
|
@@ -12315,12 +12354,12 @@ Help:
|
|
|
12315
12354
|
}
|
|
12316
12355
|
{
|
|
12317
12356
|
let { compiler, watch } = create();
|
|
12318
|
-
return watch &&
|
|
12357
|
+
return watch && deprecate("A 'callback' argument needs to be provided to the 'rspack(options, callback)' function when the 'watch' option is set. There is no way to handle the 'watch' option without a callback."), compiler;
|
|
12319
12358
|
}
|
|
12320
12359
|
}, exports_namespaceObject);
|
|
12321
12360
|
src_fn.rspack = src_fn, src_fn.webpack = src_fn;
|
|
12322
12361
|
let src_rspack_0 = src_fn, src_0 = src_rspack_0;
|
|
12323
|
-
})(), exports.AsyncDependenciesBlock = __webpack_exports__.AsyncDependenciesBlock, exports.BannerPlugin = __webpack_exports__.BannerPlugin, exports.CircularDependencyRspackPlugin = __webpack_exports__.CircularDependencyRspackPlugin, exports.Compilation = __webpack_exports__.Compilation, exports.Compiler = __webpack_exports__.Compiler, exports.ConcatenatedModule = __webpack_exports__.ConcatenatedModule, exports.ContextModule = __webpack_exports__.ContextModule, exports.ContextReplacementPlugin = __webpack_exports__.ContextReplacementPlugin, exports.CopyRspackPlugin = __webpack_exports__.CopyRspackPlugin, exports.CssExtractRspackPlugin = __webpack_exports__.CssExtractRspackPlugin, exports.DefinePlugin = __webpack_exports__.DefinePlugin, exports.Dependency = __webpack_exports__.Dependency, exports.DllPlugin = __webpack_exports__.DllPlugin, exports.DllReferencePlugin = __webpack_exports__.DllReferencePlugin, exports.DynamicEntryPlugin = __webpack_exports__.DynamicEntryPlugin, exports.EntryDependency = __webpack_exports__.EntryDependency, exports.EntryOptionPlugin = __webpack_exports__.EntryOptionPlugin, exports.EntryPlugin = __webpack_exports__.EntryPlugin, exports.EnvironmentPlugin = __webpack_exports__.EnvironmentPlugin, exports.EvalDevToolModulePlugin = __webpack_exports__.EvalDevToolModulePlugin, exports.EvalSourceMapDevToolPlugin = __webpack_exports__.EvalSourceMapDevToolPlugin, exports.ExternalModule = __webpack_exports__.ExternalModule, exports.ExternalsPlugin = __webpack_exports__.ExternalsPlugin, exports.HotModuleReplacementPlugin = __webpack_exports__.HotModuleReplacementPlugin, exports.HtmlRspackPlugin = __webpack_exports__.HtmlRspackPlugin, exports.IgnorePlugin = __webpack_exports__.IgnorePlugin, exports.LightningCssMinimizerRspackPlugin = __webpack_exports__.LightningCssMinimizerRspackPlugin, exports.LoaderOptionsPlugin = __webpack_exports__.LoaderOptionsPlugin, exports.LoaderTargetPlugin = __webpack_exports__.LoaderTargetPlugin, exports.Module = __webpack_exports__.Module, exports.ModuleFilenameHelpers = __webpack_exports__.ModuleFilenameHelpers, exports.MultiCompiler = __webpack_exports__.MultiCompiler, exports.MultiStats = __webpack_exports__.MultiStats, exports.NoEmitOnErrorsPlugin = __webpack_exports__.NoEmitOnErrorsPlugin, exports.NormalModule = __webpack_exports__.NormalModule, exports.NormalModuleReplacementPlugin = __webpack_exports__.NormalModuleReplacementPlugin, exports.ProgressPlugin = __webpack_exports__.ProgressPlugin, exports.ProvidePlugin = __webpack_exports__.ProvidePlugin, exports.RspackOptionsApply = __webpack_exports__.RspackOptionsApply, exports.RuntimeGlobals = __webpack_exports__.RuntimeGlobals, exports.RuntimeModule = __webpack_exports__.RuntimeModule, exports.RuntimePlugin = __webpack_exports__.RuntimePlugin, exports.SourceMapDevToolPlugin = __webpack_exports__.SourceMapDevToolPlugin, exports.Stats = __webpack_exports__.Stats, exports.StatsErrorCode = __webpack_exports__.StatsErrorCode, exports.SwcJsMinimizerRspackPlugin = __webpack_exports__.SwcJsMinimizerRspackPlugin, exports.Template = __webpack_exports__.Template, exports.ValidationError = __webpack_exports__.ValidationError, exports.WarnCaseSensitiveModulesPlugin = __webpack_exports__.WarnCaseSensitiveModulesPlugin, exports.WebpackError = __webpack_exports__.WebpackError, exports.WebpackOptionsApply = __webpack_exports__.WebpackOptionsApply, exports.config = __webpack_exports__.config, exports.container = __webpack_exports__.container, exports.default = __webpack_exports__.default, exports.electron = __webpack_exports__.electron, exports.experiments = __webpack_exports__.experiments, exports.javascript = __webpack_exports__.javascript, exports.library = __webpack_exports__.library, exports.node = __webpack_exports__.node, exports.optimize = __webpack_exports__.optimize, exports.rspack = __webpack_exports__.rspack, exports.rspackVersion = __webpack_exports__.rspackVersion, exports.sharing = __webpack_exports__.sharing, exports.sources = __webpack_exports__.sources, exports.util = __webpack_exports__.util, exports.version = __webpack_exports__.version, exports.wasm = __webpack_exports__.wasm, exports.web = __webpack_exports__.web, exports.webworker = __webpack_exports__.webworker, __webpack_exports__)-1 === [
|
|
12362
|
+
})(), exports.AsyncDependenciesBlock = __webpack_exports__.AsyncDependenciesBlock, exports.BannerPlugin = __webpack_exports__.BannerPlugin, exports.CircularDependencyRspackPlugin = __webpack_exports__.CircularDependencyRspackPlugin, exports.Compilation = __webpack_exports__.Compilation, exports.Compiler = __webpack_exports__.Compiler, exports.ConcatenatedModule = __webpack_exports__.ConcatenatedModule, exports.ContextModule = __webpack_exports__.ContextModule, exports.ContextReplacementPlugin = __webpack_exports__.ContextReplacementPlugin, exports.CopyRspackPlugin = __webpack_exports__.CopyRspackPlugin, exports.CssExtractRspackPlugin = __webpack_exports__.CssExtractRspackPlugin, exports.DefinePlugin = __webpack_exports__.DefinePlugin, exports.Dependency = __webpack_exports__.Dependency, exports.DllPlugin = __webpack_exports__.DllPlugin, exports.DllReferencePlugin = __webpack_exports__.DllReferencePlugin, exports.DynamicEntryPlugin = __webpack_exports__.DynamicEntryPlugin, exports.EntryDependency = __webpack_exports__.EntryDependency, exports.EntryOptionPlugin = __webpack_exports__.EntryOptionPlugin, exports.EntryPlugin = __webpack_exports__.EntryPlugin, exports.EnvironmentPlugin = __webpack_exports__.EnvironmentPlugin, exports.EvalDevToolModulePlugin = __webpack_exports__.EvalDevToolModulePlugin, exports.EvalSourceMapDevToolPlugin = __webpack_exports__.EvalSourceMapDevToolPlugin, exports.ExternalModule = __webpack_exports__.ExternalModule, exports.ExternalsPlugin = __webpack_exports__.ExternalsPlugin, exports.HotModuleReplacementPlugin = __webpack_exports__.HotModuleReplacementPlugin, exports.HtmlRspackPlugin = __webpack_exports__.HtmlRspackPlugin, exports.IgnorePlugin = __webpack_exports__.IgnorePlugin, exports.LightningCssMinimizerRspackPlugin = __webpack_exports__.LightningCssMinimizerRspackPlugin, exports.LoaderOptionsPlugin = __webpack_exports__.LoaderOptionsPlugin, exports.LoaderTargetPlugin = __webpack_exports__.LoaderTargetPlugin, exports.Module = __webpack_exports__.Module, exports.ModuleFilenameHelpers = __webpack_exports__.ModuleFilenameHelpers, exports.MultiCompiler = __webpack_exports__.MultiCompiler, exports.MultiStats = __webpack_exports__.MultiStats, exports.NoEmitOnErrorsPlugin = __webpack_exports__.NoEmitOnErrorsPlugin, exports.NormalModule = __webpack_exports__.NormalModule, exports.NormalModuleReplacementPlugin = __webpack_exports__.NormalModuleReplacementPlugin, exports.ProgressPlugin = __webpack_exports__.ProgressPlugin, exports.ProvidePlugin = __webpack_exports__.ProvidePlugin, exports.RspackOptionsApply = __webpack_exports__.RspackOptionsApply, exports.RuntimeGlobals = __webpack_exports__.RuntimeGlobals, exports.RuntimeModule = __webpack_exports__.RuntimeModule, exports.RuntimePlugin = __webpack_exports__.RuntimePlugin, exports.SourceMapDevToolPlugin = __webpack_exports__.SourceMapDevToolPlugin, exports.Stats = __webpack_exports__.Stats, exports.StatsErrorCode = __webpack_exports__.StatsErrorCode, exports.SubresourceIntegrityPlugin = __webpack_exports__.SubresourceIntegrityPlugin, exports.SwcJsMinimizerRspackPlugin = __webpack_exports__.SwcJsMinimizerRspackPlugin, exports.Template = __webpack_exports__.Template, exports.ValidationError = __webpack_exports__.ValidationError, exports.WarnCaseSensitiveModulesPlugin = __webpack_exports__.WarnCaseSensitiveModulesPlugin, exports.WebpackError = __webpack_exports__.WebpackError, exports.WebpackOptionsApply = __webpack_exports__.WebpackOptionsApply, exports.config = __webpack_exports__.config, exports.container = __webpack_exports__.container, exports.default = __webpack_exports__.default, exports.electron = __webpack_exports__.electron, exports.experiments = __webpack_exports__.experiments, exports.javascript = __webpack_exports__.javascript, exports.lazyCompilationMiddleware = __webpack_exports__.lazyCompilationMiddleware, exports.library = __webpack_exports__.library, exports.node = __webpack_exports__.node, exports.optimize = __webpack_exports__.optimize, exports.rspack = __webpack_exports__.rspack, exports.rspackVersion = __webpack_exports__.rspackVersion, exports.sharing = __webpack_exports__.sharing, exports.sources = __webpack_exports__.sources, exports.util = __webpack_exports__.util, exports.version = __webpack_exports__.version, exports.wasm = __webpack_exports__.wasm, exports.web = __webpack_exports__.web, exports.webworker = __webpack_exports__.webworker, __webpack_exports__)-1 === [
|
|
12324
12363
|
"AsyncDependenciesBlock",
|
|
12325
12364
|
"BannerPlugin",
|
|
12326
12365
|
"CircularDependencyRspackPlugin",
|
|
@@ -12366,6 +12405,7 @@ Help:
|
|
|
12366
12405
|
"SourceMapDevToolPlugin",
|
|
12367
12406
|
"Stats",
|
|
12368
12407
|
"StatsErrorCode",
|
|
12408
|
+
"SubresourceIntegrityPlugin",
|
|
12369
12409
|
"SwcJsMinimizerRspackPlugin",
|
|
12370
12410
|
"Template",
|
|
12371
12411
|
"ValidationError",
|
|
@@ -12378,6 +12418,7 @@ Help:
|
|
|
12378
12418
|
"electron",
|
|
12379
12419
|
"experiments",
|
|
12380
12420
|
"javascript",
|
|
12421
|
+
"lazyCompilationMiddleware",
|
|
12381
12422
|
"library",
|
|
12382
12423
|
"node",
|
|
12383
12424
|
"optimize",
|
|
@@ -28,6 +28,6 @@ export declare class EntryOptionPlugin {
|
|
|
28
28
|
* @param desc entry description
|
|
29
29
|
* @returns options for the entry
|
|
30
30
|
*/
|
|
31
|
-
static entryDescriptionToOptions(
|
|
31
|
+
static entryDescriptionToOptions(_compiler: Compiler, name: string, desc: EntryDescriptionNormalized): EntryOptions;
|
|
32
32
|
}
|
|
33
33
|
export default EntryOptionPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __module_federation_bundler_runtime__,__module_federation_runtime_plugins__,__module_federation_remote_infos__,__module_federation_container_name__,__module_federation_share_strategy__;module.exports=function(){if((__webpack_require__.initializeSharingData||__webpack_require__.initializeExposesData)&&__webpack_require__.federation){var __webpack_require___remotesLoadingData,__webpack_require___remotesLoadingData1,__webpack_require___initializeSharingData,__webpack_require___consumesLoadingData,__webpack_require___consumesLoadingData1,__webpack_require___initializeExposesData,__webpack_require___consumesLoadingData2;const override=(obj,key,value)=>{if(!obj)return;if(obj[key])obj[key]=value};const merge=(obj,key,fn)=>{const value=fn();if(Array.isArray(value)){var _obj,_key;var _;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=[];obj[key].push(...value)}else if(typeof value==="object"&&value!==null){var _obj1,_key1;var _1;(_1=(_obj1=obj)[_key1=key])!==null&&_1!==void 0?_1:_obj1[_key1]={};Object.assign(obj[key],value)}};const early=(obj,key,initial)=>{var _obj,_key;var _;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=initial()};var
|
|
1
|
+
var __module_federation_bundler_runtime__,__module_federation_runtime_plugins__,__module_federation_remote_infos__,__module_federation_container_name__,__module_federation_share_strategy__;module.exports=function(){if((__webpack_require__.initializeSharingData||__webpack_require__.initializeExposesData)&&__webpack_require__.federation){var __webpack_require___remotesLoadingData,__webpack_require___remotesLoadingData1,__webpack_require___initializeSharingData,__webpack_require___consumesLoadingData,__webpack_require___consumesLoadingData1,__webpack_require___initializeExposesData,__webpack_require___consumesLoadingData2;const override=(obj,key,value)=>{if(!obj)return;if(obj[key])obj[key]=value};const merge=(obj,key,fn)=>{const value=fn();if(Array.isArray(value)){var _obj,_key;var _;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=[];obj[key].push(...value)}else if(typeof value==="object"&&value!==null){var _obj1,_key1;var _1;(_1=(_obj1=obj)[_key1=key])!==null&&_1!==void 0?_1:_obj1[_key1]={};Object.assign(obj[key],value)}};const early=(obj,key,initial)=>{var _obj,_key;var _;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=initial()};var _ref;const remotesLoadingChunkMapping=(_ref=(__webpack_require___remotesLoadingData=__webpack_require__.remotesLoadingData)===null||__webpack_require___remotesLoadingData===void 0?void 0:__webpack_require___remotesLoadingData.chunkMapping)!==null&&_ref!==void 0?_ref:{};var _ref1;const remotesLoadingModuleIdToRemoteDataMapping=(_ref1=(__webpack_require___remotesLoadingData1=__webpack_require__.remotesLoadingData)===null||__webpack_require___remotesLoadingData1===void 0?void 0:__webpack_require___remotesLoadingData1.moduleIdToRemoteDataMapping)!==null&&_ref1!==void 0?_ref1:{};var _ref2;const initializeSharingScopeToInitDataMapping=(_ref2=(__webpack_require___initializeSharingData=__webpack_require__.initializeSharingData)===null||__webpack_require___initializeSharingData===void 0?void 0:__webpack_require___initializeSharingData.scopeToSharingDataMapping)!==null&&_ref2!==void 0?_ref2:{};var _ref3;const consumesLoadingChunkMapping=(_ref3=(__webpack_require___consumesLoadingData=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData===void 0?void 0:__webpack_require___consumesLoadingData.chunkMapping)!==null&&_ref3!==void 0?_ref3:{};var _ref4;const consumesLoadingModuleToConsumeDataMapping=(_ref4=(__webpack_require___consumesLoadingData1=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData1===void 0?void 0:__webpack_require___consumesLoadingData1.moduleIdToConsumeDataMapping)!==null&&_ref4!==void 0?_ref4:{};const consumesLoadinginstalledModules={};const initializeSharingInitPromises=[];const initializeSharingInitTokens={};const containerShareScope=(__webpack_require___initializeExposesData=__webpack_require__.initializeExposesData)===null||__webpack_require___initializeExposesData===void 0?void 0:__webpack_require___initializeExposesData.shareScope;for(const key in __module_federation_bundler_runtime__){__webpack_require__.federation[key]=__module_federation_bundler_runtime__[key]}early(__webpack_require__.federation,"consumesLoadingModuleToHandlerMapping",()=>{const consumesLoadingModuleToHandlerMapping={};for(let[moduleId,data]of Object.entries(consumesLoadingModuleToConsumeDataMapping)){consumesLoadingModuleToHandlerMapping[moduleId]={getter:data.fallback,shareInfo:{shareConfig:{fixedDependencies:false,requiredVersion:data.requiredVersion,strictVersion:data.strictVersion,singleton:data.singleton,eager:data.eager},scope:[data.shareScope]},shareKey:data.shareKey}}return consumesLoadingModuleToHandlerMapping});early(__webpack_require__.federation,"initOptions",()=>({}));early(__webpack_require__.federation.initOptions,"name",()=>__module_federation_container_name__);early(__webpack_require__.federation.initOptions,"shareStrategy",()=>__module_federation_share_strategy__);early(__webpack_require__.federation.initOptions,"shared",()=>{const shared={};for(let[scope,stages]of Object.entries(initializeSharingScopeToInitDataMapping)){for(let stage of stages){if(typeof stage==="object"&&stage!==null){const{name,version,factory,eager,singleton,requiredVersion,strictVersion}=stage;const shareConfig={};const isValidValue=function(val){return typeof val!=="undefined"};if(isValidValue(singleton)){shareConfig.singleton=singleton}if(isValidValue(requiredVersion)){shareConfig.requiredVersion=requiredVersion}if(isValidValue(eager)){shareConfig.eager=eager}if(isValidValue(strictVersion)){shareConfig.strictVersion=strictVersion}const options={version,scope:[scope],shareConfig,get:factory};if(shared[name]){shared[name].push(options)}else{shared[name]=[options]}}}}return shared});merge(__webpack_require__.federation.initOptions,"remotes",()=>Object.values(__module_federation_remote_infos__).flat().filter(remote=>remote.externalType==="script"));merge(__webpack_require__.federation.initOptions,"plugins",()=>__module_federation_runtime_plugins__);early(__webpack_require__.federation,"bundlerRuntimeOptions",()=>({}));early(__webpack_require__.federation.bundlerRuntimeOptions,"remotes",()=>({}));early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"chunkMapping",()=>remotesLoadingChunkMapping);early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"remoteInfos",()=>__module_federation_remote_infos__);early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"idToExternalAndNameMapping",()=>{const remotesLoadingIdToExternalAndNameMappingMapping={};for(let[moduleId,data]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){remotesLoadingIdToExternalAndNameMappingMapping[moduleId]=[data.shareScope,data.name,data.externalModuleId,data.remoteName]}return remotesLoadingIdToExternalAndNameMappingMapping});early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"webpackRequire",()=>__webpack_require__);merge(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"idToRemoteMap",()=>{const idToRemoteMap={};for(let[id,remoteData]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){const info=__module_federation_remote_infos__[remoteData.remoteName];if(info)idToRemoteMap[id]=info}return idToRemoteMap});override(__webpack_require__,"S",__webpack_require__.federation.bundlerRuntime.S);if(__webpack_require__.federation.attachShareScopeMap){__webpack_require__.federation.attachShareScopeMap(__webpack_require__)}override(__webpack_require__.f,"remotes",(chunkId,promises)=>__webpack_require__.federation.bundlerRuntime.remotes({chunkId,promises,chunkMapping:remotesLoadingChunkMapping,idToExternalAndNameMapping:__webpack_require__.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping,idToRemoteMap:__webpack_require__.federation.bundlerRuntimeOptions.remotes.idToRemoteMap,webpackRequire:__webpack_require__}));override(__webpack_require__.f,"consumes",(chunkId,promises)=>__webpack_require__.federation.bundlerRuntime.consumes({chunkId,promises,chunkMapping:consumesLoadingChunkMapping,moduleToHandlerMapping:__webpack_require__.federation.consumesLoadingModuleToHandlerMapping,installedModules:consumesLoadinginstalledModules,webpackRequire:__webpack_require__}));override(__webpack_require__,"I",(name,initScope)=>__webpack_require__.federation.bundlerRuntime.I({shareScopeName:name,initScope,initPromises:initializeSharingInitPromises,initTokens:initializeSharingInitTokens,webpackRequire:__webpack_require__}));override(__webpack_require__,"initContainer",(shareScope,initScope,remoteEntryInitOptions)=>__webpack_require__.federation.bundlerRuntime.initContainerEntry({shareScope,initScope,remoteEntryInitOptions,shareScopeKey:containerShareScope,webpackRequire:__webpack_require__}));override(__webpack_require__,"getContainer",(module1,getScope)=>{var moduleMap=__webpack_require__.initializeExposesData.moduleMap;__webpack_require__.R=getScope;getScope=Object.prototype.hasOwnProperty.call(moduleMap,module1)?moduleMap[module1]():Promise.resolve().then(()=>{throw new Error('Module "'+module1+'" does not exist in container.')});__webpack_require__.R=undefined;return getScope});__webpack_require__.federation.instance=__webpack_require__.federation.runtime.init(__webpack_require__.federation.initOptions);if((__webpack_require___consumesLoadingData2=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData2===void 0?void 0:__webpack_require___consumesLoadingData2.initialConsumes){__webpack_require__.federation.bundlerRuntime.installInitialConsumes({webpackRequire:__webpack_require__,installedModules:consumesLoadinginstalledModules,initialConsumes:__webpack_require__.consumesLoadingData.initialConsumes,moduleToHandlerMapping:__webpack_require__.federation.consumesLoadingModuleToHandlerMapping})}}};
|
package/dist/rspack.d.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The following code is modified based on
|
|
3
|
+
* https://github.com/webpack/webpack/blob/4b4ca3b/lib
|
|
4
|
+
*
|
|
5
|
+
* MIT Licensed
|
|
6
|
+
* Author Tobias Koppers @sokra
|
|
7
|
+
* Copyright (c) JS Foundation and other contributors
|
|
8
|
+
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
|
+
*/
|
|
1
10
|
import type { Callback } from "@rspack/lite-tapable";
|
|
2
11
|
import { Compiler } from "./Compiler";
|
|
3
12
|
import { type RspackOptions } from "./config";
|
package/dist/util/fake.d.ts
CHANGED
|
@@ -3,7 +3,12 @@ export type FakeHook<T> = T & {
|
|
|
3
3
|
};
|
|
4
4
|
export declare function createFakeCompilationDependencies(getDeps: () => string[], addDeps: (deps: string[]) => void): {
|
|
5
5
|
[Symbol.iterator](): Generator<string, void, unknown>;
|
|
6
|
-
has(dep: string)
|
|
6
|
+
has: (dep: string) => boolean;
|
|
7
7
|
add: (dep: string) => void;
|
|
8
8
|
addAll: (deps: Iterable<string>) => void;
|
|
9
|
+
delete: (dep: string) => boolean;
|
|
10
|
+
keys(): SetIterator<string>;
|
|
11
|
+
values(): SetIterator<string>;
|
|
12
|
+
entries(): SetIterator<[string, string]>;
|
|
13
|
+
readonly size: number;
|
|
9
14
|
};
|
package/dist/util/index.d.ts
CHANGED
|
@@ -6,3 +6,4 @@ export declare function serializeObject(map: string | object | undefined | null)
|
|
|
6
6
|
export declare function indent(str: string, prefix: string): string;
|
|
7
7
|
export declare function stringifyLoaderObject(o: LoaderObject): string;
|
|
8
8
|
export declare const unsupported: (name: string, issue?: string) => never;
|
|
9
|
+
export declare function deprecate(message: string): void;
|
package/dist/worker.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
"./src/swc.ts" (
|
|
3
|
+
"./src/swc.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
4
4
|
__webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_exports__, {
|
|
5
5
|
minify: ()=>minify,
|
|
6
6
|
minifySync: ()=>minifySync,
|
|
@@ -25,7 +25,7 @@ var __webpack_modules__ = {
|
|
|
25
25
|
return _rspack_binding__rspack_import_0_default().transformSync(source, _options);
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
|
-
"./src/util/cleverMerge.ts" (
|
|
28
|
+
"./src/util/cleverMerge.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
29
29
|
__webpack_require__.d(__webpack_exports__, {
|
|
30
30
|
ks: ()=>cleverMerge
|
|
31
31
|
});
|
|
@@ -203,7 +203,7 @@ var __webpack_modules__ = {
|
|
|
203
203
|
}
|
|
204
204
|
};
|
|
205
205
|
},
|
|
206
|
-
"./src/util/createHash.ts" (
|
|
206
|
+
"./src/util/createHash.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
207
207
|
let createMd4, createXxhash64;
|
|
208
208
|
__webpack_require__.d(__webpack_exports__, {
|
|
209
209
|
n: ()=>createHash_createHash
|
|
@@ -454,7 +454,7 @@ __webpack_require__.n = (module)=>{
|
|
|
454
454
|
get: definition[key]
|
|
455
455
|
});
|
|
456
456
|
}, __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop), __webpack_require__.r = (exports1)=>{
|
|
457
|
-
|
|
457
|
+
"u" > typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
458
458
|
value: 'Module'
|
|
459
459
|
}), Object.defineProperty(exports1, '__esModule', {
|
|
460
460
|
value: !0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0-beta.1",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "The fast Rust-based web bundler with webpack-compatible API",
|
|
@@ -37,20 +37,20 @@
|
|
|
37
37
|
"directory": "packages/rspack"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@ast-grep/napi": "^0.40.
|
|
40
|
+
"@ast-grep/napi": "^0.40.3",
|
|
41
41
|
"@napi-rs/wasm-runtime": "1.0.7",
|
|
42
42
|
"@rsbuild/plugin-node-polyfill": "^1.4.2",
|
|
43
|
-
"@rslib/core": "0.18.
|
|
43
|
+
"@rslib/core": "0.18.5",
|
|
44
44
|
"@swc/types": "0.1.25",
|
|
45
|
-
"@types/node": "^20.19.
|
|
45
|
+
"@types/node": "^20.19.27",
|
|
46
46
|
"@types/watchpack": "^2.4.5",
|
|
47
47
|
"browserslist-load-config": "^1.0.1",
|
|
48
|
-
"enhanced-resolve": "5.18.
|
|
48
|
+
"enhanced-resolve": "5.18.4",
|
|
49
49
|
"glob-to-regexp": "^0.4.1",
|
|
50
|
-
"memfs": "4.
|
|
50
|
+
"memfs": "4.51.1",
|
|
51
51
|
"prebundle": "^1.6.0",
|
|
52
52
|
"tinypool": "^1.1.1",
|
|
53
|
-
"tsx": "^4.
|
|
53
|
+
"tsx": "^4.21.0",
|
|
54
54
|
"typescript": "^5.9.3",
|
|
55
55
|
"watchpack": "^2.4.4",
|
|
56
56
|
"webpack-sources": "3.3.3"
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@module-federation/runtime-tools": "0.21.6",
|
|
60
60
|
"@rspack/lite-tapable": "1.1.0",
|
|
61
|
-
"@rspack/binding": "1.
|
|
61
|
+
"@rspack/binding": "1.7.0-beta.1"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"@swc/helpers": ">=0.5.1"
|