@rspack-canary/browser 1.7.0-canary-22d591c5-20251222090400 → 1.7.0-canary-dcc2f8c9-20251223064055
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/config/normalization.d.ts +0 -4
- package/dist/config/types.d.ts +1 -5
- package/dist/container/ModuleFederationManifestPlugin.d.ts +2 -9
- package/dist/container/ModuleFederationPlugin.d.ts +3 -16
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +4 -0
- package/dist/exports.d.ts +0 -3
- package/dist/index.mjs +343 -893
- package/dist/napi-binding.d.ts +5 -32
- package/dist/rspack.d.ts +9 -0
- package/dist/rspack.wasm32-wasi.wasm +0 -0
- package/dist/sharing/ConsumeSharedPlugin.d.ts +0 -16
- package/dist/sharing/ProvideSharedPlugin.d.ts +0 -19
- package/dist/sharing/SharePlugin.d.ts +0 -36
- package/dist/sharing/utils.d.ts +0 -1
- package/dist/util/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/sharing/CollectSharedEntryPlugin.d.ts +0 -22
- package/dist/sharing/IndependentSharedPlugin.d.ts +0 -35
- package/dist/sharing/SharedContainerPlugin.d.ts +0 -23
- package/dist/sharing/SharedUsedExportsOptimizerPlugin.d.ts +0 -14
- package/dist/sharing/TreeShakeSharedPlugin.d.ts +0 -19
package/dist/napi-binding.d.ts
CHANGED
|
@@ -540,13 +540,10 @@ export declare enum BuiltinPluginName {
|
|
|
540
540
|
SplitChunksPlugin = 'SplitChunksPlugin',
|
|
541
541
|
RemoveDuplicateModulesPlugin = 'RemoveDuplicateModulesPlugin',
|
|
542
542
|
ShareRuntimePlugin = 'ShareRuntimePlugin',
|
|
543
|
-
SharedUsedExportsOptimizerPlugin = 'SharedUsedExportsOptimizerPlugin',
|
|
544
543
|
ContainerPlugin = 'ContainerPlugin',
|
|
545
544
|
ContainerReferencePlugin = 'ContainerReferencePlugin',
|
|
546
545
|
ProvideSharedPlugin = 'ProvideSharedPlugin',
|
|
547
546
|
ConsumeSharedPlugin = 'ConsumeSharedPlugin',
|
|
548
|
-
CollectSharedEntryPlugin = 'CollectSharedEntryPlugin',
|
|
549
|
-
SharedContainerPlugin = 'SharedContainerPlugin',
|
|
550
547
|
ModuleFederationRuntimePlugin = 'ModuleFederationRuntimePlugin',
|
|
551
548
|
ModuleFederationManifestPlugin = 'ModuleFederationManifestPlugin',
|
|
552
549
|
NamedModuleIdsPlugin = 'NamedModuleIdsPlugin',
|
|
@@ -1841,11 +1838,6 @@ export interface RawCircularDependencyRspackPluginOptions {
|
|
|
1841
1838
|
onEnd?: () => void
|
|
1842
1839
|
}
|
|
1843
1840
|
|
|
1844
|
-
export interface RawCollectShareEntryPluginOptions {
|
|
1845
|
-
consumes: Array<RawConsumeOptions>
|
|
1846
|
-
filename?: string
|
|
1847
|
-
}
|
|
1848
|
-
|
|
1849
1841
|
export interface RawConsumeOptions {
|
|
1850
1842
|
key: string
|
|
1851
1843
|
import?: string
|
|
@@ -1857,7 +1849,6 @@ export interface RawConsumeOptions {
|
|
|
1857
1849
|
strictVersion: boolean
|
|
1858
1850
|
singleton: boolean
|
|
1859
1851
|
eager: boolean
|
|
1860
|
-
treeshakeStrategy?: string
|
|
1861
1852
|
}
|
|
1862
1853
|
|
|
1863
1854
|
export interface RawConsumeSharedPluginOptions {
|
|
@@ -2133,7 +2124,6 @@ export interface RawExperimentCacheOptionsPersistent {
|
|
|
2133
2124
|
export interface RawExperiments {
|
|
2134
2125
|
topLevelAwait: boolean
|
|
2135
2126
|
incremental?: false | { [key: string]: boolean }
|
|
2136
|
-
parallelCodeSplitting: boolean
|
|
2137
2127
|
rspackFuture?: RawRspackFuture
|
|
2138
2128
|
cache: boolean | { type: "persistent" } & RawExperimentCacheOptionsPersistent | { type: "memory" }
|
|
2139
2129
|
useInputFileSystem?: false | Array<RegExp>
|
|
@@ -2472,8 +2462,13 @@ export interface RawModuleFederationManifestPluginOptions {
|
|
|
2472
2462
|
buildInfo?: RawStatsBuildInfo
|
|
2473
2463
|
}
|
|
2474
2464
|
|
|
2465
|
+
export interface RawModuleFederationRuntimeExperimentsOptions {
|
|
2466
|
+
asyncStartup?: boolean
|
|
2467
|
+
}
|
|
2468
|
+
|
|
2475
2469
|
export interface RawModuleFederationRuntimePluginOptions {
|
|
2476
2470
|
entryRuntime?: string | undefined
|
|
2471
|
+
experiments?: RawModuleFederationRuntimeExperimentsOptions
|
|
2477
2472
|
}
|
|
2478
2473
|
|
|
2479
2474
|
export interface RawModuleFilenameTemplateFnCtx {
|
|
@@ -2589,12 +2584,6 @@ export interface RawOptimizationOptions {
|
|
|
2589
2584
|
avoidEntryIife: boolean
|
|
2590
2585
|
}
|
|
2591
2586
|
|
|
2592
|
-
export interface RawOptimizeSharedConfig {
|
|
2593
|
-
shareKey: string
|
|
2594
|
-
treeshake: boolean
|
|
2595
|
-
usedExports?: Array<string>
|
|
2596
|
-
}
|
|
2597
|
-
|
|
2598
2587
|
export interface RawOptions {
|
|
2599
2588
|
name?: string
|
|
2600
2589
|
mode?: undefined | 'production' | 'development' | 'none'
|
|
@@ -2695,7 +2684,6 @@ export interface RawProvideOptions {
|
|
|
2695
2684
|
singleton?: boolean
|
|
2696
2685
|
requiredVersion?: string | false | undefined
|
|
2697
2686
|
strictVersion?: boolean
|
|
2698
|
-
treeshakeStrategy?: string
|
|
2699
2687
|
}
|
|
2700
2688
|
|
|
2701
2689
|
export interface RawRelated {
|
|
@@ -2832,21 +2820,6 @@ export interface RawRuntimeChunkOptions {
|
|
|
2832
2820
|
name: string | ((entrypoint: { name: string }) => string)
|
|
2833
2821
|
}
|
|
2834
2822
|
|
|
2835
|
-
export interface RawSharedContainerPluginOptions {
|
|
2836
|
-
name: string
|
|
2837
|
-
request: string
|
|
2838
|
-
version: string
|
|
2839
|
-
fileName?: string
|
|
2840
|
-
library: JsLibraryOptions
|
|
2841
|
-
}
|
|
2842
|
-
|
|
2843
|
-
export interface RawSharedUsedExportsOptimizerPluginOptions {
|
|
2844
|
-
shared: Array<RawOptimizeSharedConfig>
|
|
2845
|
-
injectUsedExports?: boolean
|
|
2846
|
-
manifestFileName?: string
|
|
2847
|
-
statsFileName?: string
|
|
2848
|
-
}
|
|
2849
|
-
|
|
2850
2823
|
export interface RawSizeLimitsPluginOptions {
|
|
2851
2824
|
assetFilter?: (assetFilename: string) => boolean
|
|
2852
2825
|
hints?: "error" | "warning"
|
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";
|
|
Binary file
|
|
@@ -20,22 +20,7 @@ export type ConsumesConfig = {
|
|
|
20
20
|
shareScope?: string;
|
|
21
21
|
singleton?: boolean;
|
|
22
22
|
strictVersion?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Tree shaking strategy for the shared module.
|
|
25
|
-
*/
|
|
26
|
-
treeshakeStrategy?: "server" | "infer";
|
|
27
23
|
};
|
|
28
|
-
export declare function normalizeConsumeShareOptions(consumes: Consumes, shareScope?: string): [string, {
|
|
29
|
-
import: string | undefined;
|
|
30
|
-
shareScope: string;
|
|
31
|
-
shareKey: string;
|
|
32
|
-
requiredVersion: string | false | undefined;
|
|
33
|
-
strictVersion: boolean;
|
|
34
|
-
packageName: string | undefined;
|
|
35
|
-
singleton: boolean;
|
|
36
|
-
eager: boolean;
|
|
37
|
-
treeshakeStrategy: "server" | "infer" | undefined;
|
|
38
|
-
}][];
|
|
39
24
|
export declare class ConsumeSharedPlugin extends RspackBuiltinPlugin {
|
|
40
25
|
name: BuiltinPluginName;
|
|
41
26
|
_options: {
|
|
@@ -48,7 +33,6 @@ export declare class ConsumeSharedPlugin extends RspackBuiltinPlugin {
|
|
|
48
33
|
packageName: string | undefined;
|
|
49
34
|
singleton: boolean;
|
|
50
35
|
eager: boolean;
|
|
51
|
-
treeshakeStrategy: "server" | "infer" | undefined;
|
|
52
36
|
}][];
|
|
53
37
|
enhanced: boolean;
|
|
54
38
|
};
|
|
@@ -23,26 +23,7 @@ type ProvidesEnhancedExtraConfig = {
|
|
|
23
23
|
singleton?: boolean;
|
|
24
24
|
strictVersion?: boolean;
|
|
25
25
|
requiredVersion?: false | string;
|
|
26
|
-
/**
|
|
27
|
-
* Tree shaking strategy for the shared module.
|
|
28
|
-
*/
|
|
29
|
-
treeshakeStrategy?: "server" | "infer";
|
|
30
26
|
};
|
|
31
|
-
export declare function normalizeProvideShareOptions<Enhanced extends boolean = false>(options: Provides<Enhanced>, shareScope?: string, enhanced?: boolean): [string, {
|
|
32
|
-
shareKey: string;
|
|
33
|
-
version: string | false | undefined;
|
|
34
|
-
shareScope: string;
|
|
35
|
-
eager: boolean;
|
|
36
|
-
} | {
|
|
37
|
-
singleton: boolean | undefined;
|
|
38
|
-
requiredVersion: string | false | undefined;
|
|
39
|
-
strictVersion: boolean | undefined;
|
|
40
|
-
treeshakeStrategy: "server" | "infer" | undefined;
|
|
41
|
-
shareKey: string;
|
|
42
|
-
version: string | false | undefined;
|
|
43
|
-
shareScope: string;
|
|
44
|
-
eager: boolean;
|
|
45
|
-
}][];
|
|
46
27
|
export declare class ProvideSharedPlugin<Enhanced extends boolean = false> extends RspackBuiltinPlugin {
|
|
47
28
|
name: BuiltinPluginName;
|
|
48
29
|
_provides: [string, Omit<RawProvideOptions, "key">][];
|
|
@@ -9,11 +9,6 @@ export type SharedItem = string;
|
|
|
9
9
|
export type SharedObject = {
|
|
10
10
|
[k: string]: SharedConfig | SharedItem;
|
|
11
11
|
};
|
|
12
|
-
export type TreeshakeConfig = {
|
|
13
|
-
usedExports?: string[];
|
|
14
|
-
strategy?: "server" | "infer";
|
|
15
|
-
filename?: string;
|
|
16
|
-
};
|
|
17
12
|
export type SharedConfig = {
|
|
18
13
|
eager?: boolean;
|
|
19
14
|
import?: false | SharedItem;
|
|
@@ -24,35 +19,7 @@ export type SharedConfig = {
|
|
|
24
19
|
singleton?: boolean;
|
|
25
20
|
strictVersion?: boolean;
|
|
26
21
|
version?: false | string;
|
|
27
|
-
treeshake?: TreeshakeConfig;
|
|
28
22
|
};
|
|
29
|
-
export type NormalizedSharedOptions = [string, SharedConfig][];
|
|
30
|
-
export declare function normalizeSharedOptions(shared: Shared): NormalizedSharedOptions;
|
|
31
|
-
export declare function createProvideShareOptions(normalizedSharedOptions: NormalizedSharedOptions): {
|
|
32
|
-
[x: string]: {
|
|
33
|
-
shareKey: string;
|
|
34
|
-
shareScope: string | undefined;
|
|
35
|
-
version: string | false | undefined;
|
|
36
|
-
eager: boolean | undefined;
|
|
37
|
-
singleton: boolean | undefined;
|
|
38
|
-
requiredVersion: string | false | undefined;
|
|
39
|
-
strictVersion: boolean | undefined;
|
|
40
|
-
treeshakeStrategy: "server" | "infer" | undefined;
|
|
41
|
-
};
|
|
42
|
-
}[];
|
|
43
|
-
export declare function createConsumeShareOptions(normalizedSharedOptions: NormalizedSharedOptions): {
|
|
44
|
-
[x: string]: {
|
|
45
|
-
import: string | false | undefined;
|
|
46
|
-
shareKey: string;
|
|
47
|
-
shareScope: string | undefined;
|
|
48
|
-
requiredVersion: string | false | undefined;
|
|
49
|
-
strictVersion: boolean | undefined;
|
|
50
|
-
singleton: boolean | undefined;
|
|
51
|
-
packageName: string | undefined;
|
|
52
|
-
eager: boolean | undefined;
|
|
53
|
-
treeshakeStrategy: "server" | "infer" | undefined;
|
|
54
|
-
};
|
|
55
|
-
}[];
|
|
56
23
|
export declare class SharePlugin {
|
|
57
24
|
_shareScope: string | undefined;
|
|
58
25
|
_consumes: {
|
|
@@ -65,7 +32,6 @@ export declare class SharePlugin {
|
|
|
65
32
|
singleton: boolean | undefined;
|
|
66
33
|
packageName: string | undefined;
|
|
67
34
|
eager: boolean | undefined;
|
|
68
|
-
treeshakeStrategy: "server" | "infer" | undefined;
|
|
69
35
|
};
|
|
70
36
|
}[];
|
|
71
37
|
_provides: {
|
|
@@ -77,11 +43,9 @@ export declare class SharePlugin {
|
|
|
77
43
|
singleton: boolean | undefined;
|
|
78
44
|
requiredVersion: string | false | undefined;
|
|
79
45
|
strictVersion: boolean | undefined;
|
|
80
|
-
treeshakeStrategy: "server" | "infer" | undefined;
|
|
81
46
|
};
|
|
82
47
|
}[];
|
|
83
48
|
_enhanced: boolean;
|
|
84
|
-
_sharedOptions: NormalizedSharedOptions;
|
|
85
49
|
constructor(options: SharePluginOptions);
|
|
86
50
|
apply(compiler: Compiler): void;
|
|
87
51
|
}
|
package/dist/sharing/utils.d.ts
CHANGED
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack-canary/browser",
|
|
3
|
-
"version": "1.7.0-canary-
|
|
3
|
+
"version": "1.7.0-canary-dcc2f8c9-20251223064055",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Rspack for running in the browser. This is still in early stage and may not follow the semver.",
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type BuiltinPlugin, BuiltinPluginName } from "../binding";
|
|
2
|
-
import { RspackBuiltinPlugin } from "../builtin-plugin/base";
|
|
3
|
-
import type { Compiler } from "../Compiler";
|
|
4
|
-
import { type NormalizedSharedOptions } from "./SharePlugin";
|
|
5
|
-
export type CollectSharedEntryPluginOptions = {
|
|
6
|
-
sharedOptions: NormalizedSharedOptions;
|
|
7
|
-
shareScope?: string;
|
|
8
|
-
};
|
|
9
|
-
export type ShareRequestsMap = Record<string, {
|
|
10
|
-
shareScope: string;
|
|
11
|
-
requests: [string, string][];
|
|
12
|
-
}>;
|
|
13
|
-
export declare class CollectSharedEntryPlugin extends RspackBuiltinPlugin {
|
|
14
|
-
name: BuiltinPluginName;
|
|
15
|
-
sharedOptions: NormalizedSharedOptions;
|
|
16
|
-
private _collectedEntries;
|
|
17
|
-
constructor(options: CollectSharedEntryPluginOptions);
|
|
18
|
-
getData(): ShareRequestsMap;
|
|
19
|
-
getFilename(): string;
|
|
20
|
-
apply(compiler: Compiler): void;
|
|
21
|
-
raw(): BuiltinPlugin;
|
|
22
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { Compiler } from "../Compiler";
|
|
2
|
-
import type { LibraryOptions, Plugins } from "../config";
|
|
3
|
-
import { type ModuleFederationManifestPluginOptions } from "../container/ModuleFederationManifestPlugin";
|
|
4
|
-
import type { Shared, SharedConfig } from "./SharePlugin";
|
|
5
|
-
export type MakeRequired<T, K extends keyof T> = Required<Pick<T, K>> & Omit<T, K>;
|
|
6
|
-
export interface IndependentSharePluginOptions {
|
|
7
|
-
name: string;
|
|
8
|
-
shared: Shared;
|
|
9
|
-
library?: LibraryOptions;
|
|
10
|
-
outputDir?: string;
|
|
11
|
-
plugins?: Plugins;
|
|
12
|
-
treeshake?: boolean;
|
|
13
|
-
manifest?: ModuleFederationManifestPluginOptions;
|
|
14
|
-
injectUsedExports?: boolean;
|
|
15
|
-
treeshakeSharedExcludedPlugins?: string[];
|
|
16
|
-
}
|
|
17
|
-
export type ShareFallback = Record<string, [string, string, string][]>;
|
|
18
|
-
export declare class IndependentSharedPlugin {
|
|
19
|
-
mfName: string;
|
|
20
|
-
shared: Shared;
|
|
21
|
-
library?: LibraryOptions;
|
|
22
|
-
sharedOptions: [string, SharedConfig][];
|
|
23
|
-
outputDir: string;
|
|
24
|
-
plugins: Plugins;
|
|
25
|
-
treeshake?: boolean;
|
|
26
|
-
manifest?: ModuleFederationManifestPluginOptions;
|
|
27
|
-
buildAssets: ShareFallback;
|
|
28
|
-
injectUsedExports?: boolean;
|
|
29
|
-
treeshakeSharedExcludedPlugins?: string[];
|
|
30
|
-
name: string;
|
|
31
|
-
constructor(options: IndependentSharePluginOptions);
|
|
32
|
-
apply(compiler: Compiler): void;
|
|
33
|
-
private createIndependentCompilers;
|
|
34
|
-
private createIndependentCompiler;
|
|
35
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { type BuiltinPlugin, BuiltinPluginName, type RawSharedContainerPluginOptions } from "../binding";
|
|
2
|
-
import { RspackBuiltinPlugin } from "../builtin-plugin/base";
|
|
3
|
-
import type { Compiler } from "../Compiler";
|
|
4
|
-
import type { LibraryOptions } from "../config";
|
|
5
|
-
export type SharedContainerPluginOptions = {
|
|
6
|
-
mfName: string;
|
|
7
|
-
shareName: string;
|
|
8
|
-
version: string;
|
|
9
|
-
request: string;
|
|
10
|
-
library?: LibraryOptions;
|
|
11
|
-
independentShareFileName?: string;
|
|
12
|
-
};
|
|
13
|
-
export declare class SharedContainerPlugin extends RspackBuiltinPlugin {
|
|
14
|
-
name: BuiltinPluginName;
|
|
15
|
-
filename: string;
|
|
16
|
-
_options: RawSharedContainerPluginOptions;
|
|
17
|
-
_shareName: string;
|
|
18
|
-
_globalName: string;
|
|
19
|
-
constructor(options: SharedContainerPluginOptions);
|
|
20
|
-
getData(): (string | undefined)[];
|
|
21
|
-
raw(compiler: Compiler): BuiltinPlugin;
|
|
22
|
-
apply(compiler: Compiler): void;
|
|
23
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { BuiltinPlugin } from "../binding";
|
|
2
|
-
import { BuiltinPluginName } from "../binding";
|
|
3
|
-
import { RspackBuiltinPlugin } from "../builtin-plugin/base";
|
|
4
|
-
import { type ModuleFederationManifestPluginOptions } from "../container/ModuleFederationManifestPlugin";
|
|
5
|
-
import type { NormalizedSharedOptions } from "./SharePlugin";
|
|
6
|
-
export declare class SharedUsedExportsOptimizerPlugin extends RspackBuiltinPlugin {
|
|
7
|
-
name: BuiltinPluginName;
|
|
8
|
-
private sharedOptions;
|
|
9
|
-
private injectUsedExports;
|
|
10
|
-
private manifestOptions;
|
|
11
|
-
constructor(sharedOptions: NormalizedSharedOptions, injectUsedExports?: boolean, manifestOptions?: ModuleFederationManifestPluginOptions);
|
|
12
|
-
private buildOptions;
|
|
13
|
-
raw(): BuiltinPlugin | undefined;
|
|
14
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Compiler } from "../Compiler";
|
|
2
|
-
import type { Plugins } from "../config";
|
|
3
|
-
import type { ModuleFederationPluginOptions } from "../container/ModuleFederationPlugin";
|
|
4
|
-
export interface TreeshakeSharedPluginOptions {
|
|
5
|
-
mfConfig: ModuleFederationPluginOptions;
|
|
6
|
-
plugins?: Plugins;
|
|
7
|
-
reshake?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare class TreeShakeSharedPlugin {
|
|
10
|
-
mfConfig: ModuleFederationPluginOptions;
|
|
11
|
-
outputDir: string;
|
|
12
|
-
plugins?: Plugins;
|
|
13
|
-
reshake?: boolean;
|
|
14
|
-
private _independentSharePlugin?;
|
|
15
|
-
name: string;
|
|
16
|
-
constructor(options: TreeshakeSharedPluginOptions);
|
|
17
|
-
apply(compiler: Compiler): void;
|
|
18
|
-
get buildAssets(): import("./IndependentSharedPlugin").ShareFallback;
|
|
19
|
-
}
|