@rspack/core 1.3.0-beta.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ChunkGraph.d.ts +1 -1
- package/dist/Watching.d.ts +4 -1
- package/dist/builtin-plugin/APIPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/BannerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CircularDependencyRspackPlugin.d.ts +59 -0
- package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ContextReplacementPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DefinePlugin.d.ts +1 -1
- package/dist/builtin-plugin/DllEntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/HttpUriPlugin.d.ts +36 -0
- package/dist/builtin-plugin/IgnorePlugin.d.ts +1 -1
- package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LibManifestPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -1
- package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleInfoHeaderPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ProgressPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -1
- package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RsdoctorPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
- package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/base.d.ts +1 -1
- package/dist/builtin-plugin/html-plugin/plugin.d.ts +1 -1
- package/dist/builtin-plugin/index.d.ts +3 -1
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +1 -1
- package/dist/builtin-plugin/lazy-compilation/middleware.d.ts +4 -0
- package/dist/config/normalization.d.ts +2 -0
- package/dist/config/types.d.ts +19 -6
- package/dist/config/zod.d.ts +457 -511
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
- package/dist/cssExtractLoader.js +1 -1
- package/dist/exports.d.ts +4 -1
- package/dist/index.js +503 -527
- package/dist/stats/statsFactoryUtils.d.ts +8 -8
- package/dist/util/MergeCaller.d.ts +1 -0
- package/hot/lazy-compilation-node.js +5 -1
- package/hot/lazy-compilation-web.js +6 -10
- package/package.json +6 -6
- package/dist/builtin-plugin/lazy-compilation/backend.d.ts +0 -52
- package/dist/builtin-plugin/lazy-compilation/plugin.d.ts +0 -13
@@ -107,8 +107,8 @@ export type KnownStatsModule = {
|
|
107
107
|
cached: boolean;
|
108
108
|
optional?: boolean;
|
109
109
|
orphan?: boolean;
|
110
|
-
id?: string;
|
111
|
-
issuerId?: string;
|
110
|
+
id?: string | number | null;
|
111
|
+
issuerId?: string | number | null;
|
112
112
|
chunks?: string[];
|
113
113
|
assets?: string[];
|
114
114
|
dependent?: boolean;
|
@@ -138,7 +138,7 @@ export type StatsModule = KnownStatsModule & Record<string, any>;
|
|
138
138
|
export type KnownStatsModuleIssuer = {
|
139
139
|
identifier?: string;
|
140
140
|
name?: string;
|
141
|
-
id?: string | number;
|
141
|
+
id?: string | number | null;
|
142
142
|
};
|
143
143
|
export type StatsModuleIssuer = KnownStatsModuleIssuer & Record<string, any>;
|
144
144
|
export type KnownStatsError = {
|
@@ -151,7 +151,7 @@ export type KnownStatsError = {
|
|
151
151
|
moduleName?: string;
|
152
152
|
loc?: string;
|
153
153
|
chunkId?: string | number;
|
154
|
-
moduleId?: string | number;
|
154
|
+
moduleId?: string | number | null;
|
155
155
|
moduleTrace?: StatsModuleTraceItem[];
|
156
156
|
details?: any;
|
157
157
|
stack?: string;
|
@@ -162,8 +162,8 @@ export type StatsModuleTraceItem = {
|
|
162
162
|
originName?: string;
|
163
163
|
moduleIdentifier?: string;
|
164
164
|
moduleName?: string;
|
165
|
-
originId?: string;
|
166
|
-
moduleId?: string;
|
165
|
+
originId?: string | number | null;
|
166
|
+
moduleId?: string | number | null;
|
167
167
|
dependencies?: StatsModuleTraceDependency[];
|
168
168
|
};
|
169
169
|
export type StatsModuleTraceDependency = KnownStatsModuleTraceDependency & Record<string, any>;
|
@@ -181,7 +181,7 @@ export type KnownStatsModuleReason = {
|
|
181
181
|
explanation?: string;
|
182
182
|
userRequest?: string;
|
183
183
|
loc?: string;
|
184
|
-
moduleId?: string | null;
|
184
|
+
moduleId?: string | number | null;
|
185
185
|
resolvedModuleId?: string | number | null;
|
186
186
|
};
|
187
187
|
export type StatsModuleReason = KnownStatsModuleReason & Record<string, any>;
|
@@ -191,7 +191,7 @@ export type KnownStatsChunkOrigin = {
|
|
191
191
|
moduleName: string;
|
192
192
|
loc: string;
|
193
193
|
request: string;
|
194
|
-
moduleId?: string;
|
194
|
+
moduleId?: string | number | null;
|
195
195
|
};
|
196
196
|
export type StatsChunkOrigin = KnownStatsChunkOrigin & Record<string, any>;
|
197
197
|
export type KnownStatsCompilation = {
|
@@ -39,7 +39,11 @@ exports.keepAlive = function (options) {
|
|
39
39
|
*/
|
40
40
|
function errorHandler(err) {
|
41
41
|
err.message =
|
42
|
-
"Problem communicating active modules to the server
|
42
|
+
"Problem communicating active modules to the server" +
|
43
|
+
(err.message ? ": " + err.message : "") +
|
44
|
+
"\nRequest: " +
|
45
|
+
urlBase +
|
46
|
+
data;
|
43
47
|
onError(err);
|
44
48
|
}
|
45
49
|
request.on("error", errorHandler);
|
@@ -28,16 +28,12 @@ var updateEventSource = function updateEventSource() {
|
|
28
28
|
errorHandlers.forEach(function (onError) {
|
29
29
|
onError(
|
30
30
|
new Error(
|
31
|
-
"Problem communicating active modules to the server
|
32
|
-
event.message +
|
33
|
-
|
34
|
-
event.
|
35
|
-
|
36
|
-
event.
|
37
|
-
":" +
|
38
|
-
event.colno +
|
39
|
-
" " +
|
40
|
-
event.error
|
31
|
+
"Problem communicating active modules to the server" +
|
32
|
+
(event.message ? `: ${event.message} ` : "") +
|
33
|
+
(event.filename ? `: ${event.filename} ` : "") +
|
34
|
+
(event.lineno ? `: ${event.lineno} ` : "") +
|
35
|
+
(event.colno ? `: ${event.colno} ` : "") +
|
36
|
+
(event.error ? `: ${event.error}` : "")
|
41
37
|
)
|
42
38
|
);
|
43
39
|
});
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rspack/core",
|
3
|
-
"version": "1.3.0
|
3
|
+
"version": "1.3.0",
|
4
4
|
"webpackVersion": "5.75.0",
|
5
5
|
"license": "MIT",
|
6
6
|
"description": "The fast Rust-based web bundler with webpack-compatible API",
|
@@ -37,7 +37,7 @@
|
|
37
37
|
"directory": "packages/rspack"
|
38
38
|
},
|
39
39
|
"devDependencies": {
|
40
|
-
"@swc/core": "1.11.
|
40
|
+
"@swc/core": "1.11.11",
|
41
41
|
"@swc/types": "0.1.19",
|
42
42
|
"@types/graceful-fs": "4.1.9",
|
43
43
|
"@types/watchpack": "^2.4.4",
|
@@ -57,13 +57,13 @@
|
|
57
57
|
"webpack-sources": "3.2.3",
|
58
58
|
"zod": "^3.24.2",
|
59
59
|
"zod-validation-error": "3.4.0",
|
60
|
-
"@rspack/tracing": "1.3.0
|
60
|
+
"@rspack/tracing": "1.3.0"
|
61
61
|
},
|
62
62
|
"dependencies": {
|
63
|
-
"@module-federation/runtime-tools": "0.11.
|
63
|
+
"@module-federation/runtime-tools": "0.11.1",
|
64
64
|
"@rspack/lite-tapable": "1.0.1",
|
65
|
-
"caniuse-lite": "^1.0.
|
66
|
-
"@rspack/binding": "1.3.0
|
65
|
+
"caniuse-lite": "^1.0.30001706",
|
66
|
+
"@rspack/binding": "1.3.0"
|
67
67
|
},
|
68
68
|
"peerDependencies": {
|
69
69
|
"@rspack/tracing": "^1.x",
|
@@ -1,52 +0,0 @@
|
|
1
|
-
import type { IncomingMessage, ServerOptions as ServerOptionsImport, ServerResponse } from "node:http";
|
2
|
-
import type { AddressInfo, ListenOptions, Socket } from "node:net";
|
3
|
-
import type { SecureContextOptions, TlsOptions } from "node:tls";
|
4
|
-
import type { Compiler } from "../..";
|
5
|
-
interface Server {
|
6
|
-
on(event: "request", callback: (req: IncomingMessage, res: ServerResponse) => void): void;
|
7
|
-
on(event: "connection", callback: (socket: Socket) => void): void;
|
8
|
-
on(event: "listening", callback: (err?: Error) => void): void;
|
9
|
-
off(event: "request", callback: (req: IncomingMessage, res: ServerResponse) => void): void;
|
10
|
-
address(): AddressInfo;
|
11
|
-
close(callback: (err?: any) => void): void;
|
12
|
-
listen(listenOptions?: number | ListenOptions): void;
|
13
|
-
}
|
14
|
-
export interface LazyCompilationDefaultBackendOptions {
|
15
|
-
/**
|
16
|
-
* A custom client script path.
|
17
|
-
*/
|
18
|
-
client?: string;
|
19
|
-
/**
|
20
|
-
* Specifies where to listen to from the server.
|
21
|
-
*/
|
22
|
-
listen?: number | ListenOptions | ((server: Server) => void);
|
23
|
-
/**
|
24
|
-
* Specifies the protocol the client should use to connect to the server.
|
25
|
-
*/
|
26
|
-
protocol?: "http" | "https";
|
27
|
-
/**
|
28
|
-
* Specifies how to create the server handling the EventSource requests.
|
29
|
-
*/
|
30
|
-
server?: ServerOptionsImport<typeof IncomingMessage> | ServerOptionsHttps<typeof IncomingMessage, typeof ServerResponse> | (() => Server);
|
31
|
-
}
|
32
|
-
export type ServerOptionsHttps<Request extends typeof IncomingMessage = typeof IncomingMessage, Response extends typeof ServerResponse = typeof ServerResponse> = SecureContextOptions & TlsOptions & ServerOptionsImport<Request, Response>;
|
33
|
-
declare const getBackend: (options: Omit<LazyCompilationDefaultBackendOptions, "client"> & {
|
34
|
-
client: NonNullable<LazyCompilationDefaultBackendOptions["client"]>;
|
35
|
-
}) => {
|
36
|
-
state: {
|
37
|
-
module: any;
|
38
|
-
dispose: any;
|
39
|
-
};
|
40
|
-
backend: (compiler: Compiler, callback: (err: Error | null, obj?: {
|
41
|
-
dispose: (callback: (err: any) => void) => void;
|
42
|
-
module: (args: {
|
43
|
-
module: string;
|
44
|
-
path: string;
|
45
|
-
}) => {
|
46
|
-
data: string;
|
47
|
-
client: string;
|
48
|
-
active: boolean;
|
49
|
-
};
|
50
|
-
}) => void) => void;
|
51
|
-
};
|
52
|
-
export default getBackend;
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import type { Module } from "../../Module";
|
2
|
-
import type { Compiler } from "../..";
|
3
|
-
import { type LazyCompilationDefaultBackendOptions } from "./backend";
|
4
|
-
export default class LazyCompilationPlugin {
|
5
|
-
cacheable: boolean;
|
6
|
-
entries: boolean;
|
7
|
-
imports: boolean;
|
8
|
-
test?: RegExp | ((module: Module) => boolean);
|
9
|
-
backend?: LazyCompilationDefaultBackendOptions;
|
10
|
-
constructor(cacheable: boolean, entries: boolean, imports: boolean, test?: RegExp | ((module: Module) => boolean), backend?: LazyCompilationDefaultBackendOptions);
|
11
|
-
apply(compiler: Compiler): void;
|
12
|
-
}
|
13
|
-
export { LazyCompilationPlugin };
|