@rspack-canary/browser 1.6.0-canary-e28e40e9-20251022173516 → 1.6.0-canary-941e2203-20251024173714
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/MultiStats.d.ts +3 -2
- package/dist/builtin-plugin/InlineExportsPlugin.d.ts +9 -0
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +2 -1
- package/dist/builtin-plugin/css-extract/index.d.ts +2 -2
- package/dist/builtin-plugin/index.d.ts +1 -0
- package/dist/config/devServer.d.ts +7 -7
- package/dist/config/types.d.ts +10 -5
- package/dist/index.mjs +188 -241
- package/dist/lib/Cache.d.ts +1 -1
- package/dist/loader-runner/service.d.ts +1 -1
- package/dist/napi-binding.d.ts +1 -0
- package/dist/rspack.wasm32-wasi.wasm +0 -0
- package/package.json +1 -1
package/dist/MultiStats.d.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* Copyright (c) JS Foundation and other contributors
|
|
8
8
|
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
9
|
*/
|
|
10
|
+
import type { MultiStatsOptions, StatsPresets } from "./config";
|
|
10
11
|
import type { Stats } from "./Stats";
|
|
11
12
|
import type { StatsCompilation } from "./stats/statsFactoryUtils";
|
|
12
13
|
export default class MultiStats {
|
|
@@ -16,7 +17,7 @@ export default class MultiStats {
|
|
|
16
17
|
get hash(): string;
|
|
17
18
|
hasErrors(): boolean;
|
|
18
19
|
hasWarnings(): boolean;
|
|
19
|
-
toJson(options:
|
|
20
|
-
toString(options:
|
|
20
|
+
toJson(options: boolean | StatsPresets | MultiStatsOptions): StatsCompilation;
|
|
21
|
+
toString(options: boolean | StatsPresets | MultiStatsOptions): string;
|
|
21
22
|
}
|
|
22
23
|
export { MultiStats };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const InlineExportsPlugin: {
|
|
2
|
+
new (): {
|
|
3
|
+
name: string;
|
|
4
|
+
_args: [];
|
|
5
|
+
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
6
|
+
raw(compiler: import("..").Compiler): import("../binding").BuiltinPlugin;
|
|
7
|
+
apply(compiler: import("..").Compiler): void;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { LiteralUnion } from "../config";
|
|
1
2
|
import type { AssetConditions } from "../util/assetCondition";
|
|
2
3
|
type ExtractCommentsCondition = boolean | RegExp;
|
|
3
4
|
type ExtractCommentsBanner = string | boolean;
|
|
@@ -132,7 +133,7 @@ export interface JsFormatOptions {
|
|
|
132
133
|
*/
|
|
133
134
|
wrapFuncArgs?: boolean;
|
|
134
135
|
}
|
|
135
|
-
export type TerserEcmaVersion = 5 | 2015 | 2016 | string
|
|
136
|
+
export type TerserEcmaVersion = LiteralUnion<5 | 2015 | 2016, number> | string;
|
|
136
137
|
export interface TerserCompressOptions {
|
|
137
138
|
arguments?: boolean;
|
|
138
139
|
arrows?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type RawCssExtractPluginOption } from "../../binding";
|
|
2
|
-
import type { Compiler } from "../..";
|
|
2
|
+
import type { Compiler, LiteralUnion } from "../..";
|
|
3
3
|
export * from "./loader";
|
|
4
4
|
export type { CssExtractRspackLoaderOptions } from "./loader";
|
|
5
5
|
export interface CssExtractRspackPluginOptions {
|
|
@@ -8,7 +8,7 @@ export interface CssExtractRspackPluginOptions {
|
|
|
8
8
|
ignoreOrder?: boolean;
|
|
9
9
|
insert?: string | ((linkTag: HTMLLinkElement) => void);
|
|
10
10
|
attributes?: Record<string, string>;
|
|
11
|
-
linkType?:
|
|
11
|
+
linkType?: LiteralUnion<"text/css", string> | false;
|
|
12
12
|
runtime?: boolean;
|
|
13
13
|
pathinfo?: boolean;
|
|
14
14
|
enforceRelative?: boolean;
|
|
@@ -40,6 +40,7 @@ export * from "./HttpUriPlugin";
|
|
|
40
40
|
export * from "./html-plugin/index";
|
|
41
41
|
export * from "./IgnorePlugin";
|
|
42
42
|
export * from "./InferAsyncModulesPlugin";
|
|
43
|
+
export * from "./InlineExportsPlugin";
|
|
43
44
|
export * from "./JavascriptModulesPlugin";
|
|
44
45
|
export * from "./JsLoaderRspackPlugin";
|
|
45
46
|
export * from "./JsonModulesPlugin";
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Copyright (c) JS Foundation and other contributors
|
|
8
8
|
* https://github.com/webpack/webpack-dev-server/blob/master/LICENSE
|
|
9
9
|
*/
|
|
10
|
-
import type { Compiler, MultiCompiler, MultiStats, Stats, Watching } from "..";
|
|
10
|
+
import type { Compiler, LiteralUnion, MultiCompiler, MultiStats, Stats, Watching } from "..";
|
|
11
11
|
type Logger = ReturnType<Compiler["getInfrastructureLogger"]>;
|
|
12
12
|
type MultiWatching = MultiCompiler["watch"];
|
|
13
13
|
type BasicServer = import("net").Server | import("tls").Server;
|
|
@@ -38,7 +38,7 @@ type OutputFileSystem = import("..").OutputFileSystem & {
|
|
|
38
38
|
readFileSync: typeof import("fs").readFileSync;
|
|
39
39
|
};
|
|
40
40
|
type RspackConfiguration = import("..").Configuration;
|
|
41
|
-
type Port = number |
|
|
41
|
+
type Port = number | LiteralUnion<"auto", string>;
|
|
42
42
|
type HistoryContext = {
|
|
43
43
|
readonly match: RegExpMatchArray;
|
|
44
44
|
readonly parsedUrl: import("url").Url;
|
|
@@ -80,7 +80,7 @@ type DevMiddlewareOptions<RequestInternal extends IncomingMessage = IncomingMess
|
|
|
80
80
|
cacheImmutable?: boolean | undefined;
|
|
81
81
|
};
|
|
82
82
|
type BasicApplication = any;
|
|
83
|
-
type BonjourServer = any
|
|
83
|
+
type BonjourServer = Record<string, any>;
|
|
84
84
|
type ChokidarWatchOptions = {
|
|
85
85
|
[key: string]: any;
|
|
86
86
|
};
|
|
@@ -112,7 +112,7 @@ type Static = {
|
|
|
112
112
|
poll?: number | boolean;
|
|
113
113
|
}) | undefined;
|
|
114
114
|
};
|
|
115
|
-
type ServerType<A extends BasicApplication = BasicApplication, S extends BasicServer = import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>> = "http" | "https" | "spdy" | "http2"
|
|
115
|
+
type ServerType<A extends BasicApplication = BasicApplication, S extends BasicServer = import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>> = LiteralUnion<"http" | "https" | "spdy" | "http2", string> | ((arg0: ServerOptions, arg1: A) => S);
|
|
116
116
|
type ServerConfiguration<A extends BasicApplication = BasicApplication, S extends BasicServer = import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>> = {
|
|
117
117
|
type?: ServerType<A, S> | undefined;
|
|
118
118
|
options?: ServerOptions | undefined;
|
|
@@ -123,8 +123,8 @@ type WebSocketServerConfiguration = {
|
|
|
123
123
|
};
|
|
124
124
|
type NextFunction = (err?: any) => void;
|
|
125
125
|
type ProxyConfigArrayItem = {
|
|
126
|
-
path?: HttpProxyMiddlewareOptionsFilter
|
|
127
|
-
context?: HttpProxyMiddlewareOptionsFilter
|
|
126
|
+
path?: HttpProxyMiddlewareOptionsFilter;
|
|
127
|
+
context?: HttpProxyMiddlewareOptionsFilter;
|
|
128
128
|
} & {
|
|
129
129
|
bypass?: ByPass;
|
|
130
130
|
} & {
|
|
@@ -190,7 +190,7 @@ export type DevServerOptions<A extends BasicApplication = BasicApplication, S ex
|
|
|
190
190
|
compress?: boolean | undefined;
|
|
191
191
|
allowedHosts?: string | string[] | undefined;
|
|
192
192
|
historyApiFallback?: boolean | HistoryApiFallbackOptions | undefined;
|
|
193
|
-
bonjour?: boolean |
|
|
193
|
+
bonjour?: boolean | BonjourServer | undefined;
|
|
194
194
|
watchFiles?: string | string[] | WatchFiles | (string | WatchFiles)[] | undefined;
|
|
195
195
|
static?: string | boolean | Static | (string | Static)[] | undefined;
|
|
196
196
|
server?: ServerType<A, S> | ServerConfiguration<A, S> | undefined;
|
package/dist/config/types.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ import type { Module } from "../Module";
|
|
|
9
9
|
import type ModuleGraph from "../ModuleGraph";
|
|
10
10
|
import type { ResolveCallback } from "./adapterRuleUse";
|
|
11
11
|
import type { DevServerOptions } from "./devServer";
|
|
12
|
+
/** https://github.com/microsoft/TypeScript/issues/29729 */
|
|
13
|
+
export type LiteralUnion<T extends U, U> = T | (U & Record<never, never>);
|
|
12
14
|
export type FilenameTemplate = string;
|
|
13
15
|
export type Filename = FilenameTemplate | ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
14
16
|
/** Name of the configuration. Used when loading multiple configurations. */
|
|
@@ -27,17 +29,17 @@ export type Context = string;
|
|
|
27
29
|
export type Mode = "development" | "production" | "none";
|
|
28
30
|
export type Falsy = false | "" | 0 | null | undefined;
|
|
29
31
|
/** The publicPath of the resource referenced by this entry. */
|
|
30
|
-
export type PublicPath = "auto" | Filename
|
|
32
|
+
export type PublicPath = LiteralUnion<"auto", string> | Exclude<Filename, string>;
|
|
31
33
|
/** The baseURI of the resource referenced by this entry. */
|
|
32
34
|
export type BaseUri = string;
|
|
33
35
|
/** How this entry load other chunks. */
|
|
34
|
-
export type ChunkLoadingType =
|
|
36
|
+
export type ChunkLoadingType = LiteralUnion<"jsonp" | "import-scripts" | "require" | "async-node" | "import", string>;
|
|
35
37
|
/** How this entry load other chunks. */
|
|
36
38
|
export type ChunkLoading = false | ChunkLoadingType;
|
|
37
39
|
/** Whether to create a load-on-demand asynchronous chunk for entry. */
|
|
38
40
|
export type AsyncChunks = boolean;
|
|
39
41
|
/** Option to set the method of loading WebAssembly Modules. */
|
|
40
|
-
export type WasmLoadingType =
|
|
42
|
+
export type WasmLoadingType = LiteralUnion<"fetch-streaming" | "fetch" | "async-node", string>;
|
|
41
43
|
/** Option to set the method of loading WebAssembly Modules. */
|
|
42
44
|
export type WasmLoading = false | WasmLoadingType;
|
|
43
45
|
export type ScriptType = false | "text/javascript" | "module";
|
|
@@ -61,7 +63,7 @@ export type AuxiliaryComment = string | LibraryCustomUmdCommentObject;
|
|
|
61
63
|
/** Specify which export should be exposed as a library. */
|
|
62
64
|
export type LibraryExport = string | string[];
|
|
63
65
|
/** Configure how the library will be exposed. */
|
|
64
|
-
export type LibraryType =
|
|
66
|
+
export type LibraryType = LiteralUnion<"var" | "module" | "assign" | "assign-properties" | "this" | "window" | "self" | "global" | "commonjs" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd" | "amd-require" | "umd" | "umd2" | "jsonp" | "system", string>;
|
|
65
67
|
/** When using output.library.type: "umd", setting output.library.umdNamedDefine to true will name the AMD module of the UMD build. */
|
|
66
68
|
export type UmdNamedDefine = boolean;
|
|
67
69
|
/** Options for library. */
|
|
@@ -1199,7 +1201,7 @@ export type SnapshotOptions = {};
|
|
|
1199
1201
|
* cache: false
|
|
1200
1202
|
*/
|
|
1201
1203
|
export type CacheOptions = boolean;
|
|
1202
|
-
type StatsPresets = "normal" | "none" | "verbose" | "errors-only" | "errors-warnings" | "minimal" | "detailed" | "summary";
|
|
1204
|
+
export type StatsPresets = "normal" | "none" | "verbose" | "errors-only" | "errors-warnings" | "minimal" | "detailed" | "summary";
|
|
1203
1205
|
type ModuleFilterItemTypes = RegExp | string | ((name: string, module: any, type: any) => boolean);
|
|
1204
1206
|
type ModuleFilterTypes = boolean | ModuleFilterItemTypes | ModuleFilterItemTypes[];
|
|
1205
1207
|
export type StatsColorOptions = {
|
|
@@ -1600,6 +1602,9 @@ export type StatsOptions = {
|
|
|
1600
1602
|
*/
|
|
1601
1603
|
warningsSpace?: number;
|
|
1602
1604
|
};
|
|
1605
|
+
export type MultiStatsOptions = Omit<StatsOptions, "children"> & {
|
|
1606
|
+
children?: StatsValue | (StatsValue | undefined)[];
|
|
1607
|
+
};
|
|
1603
1608
|
/**
|
|
1604
1609
|
* Represents the value for stats configuration.
|
|
1605
1610
|
*/
|