@rspack-canary/core 1.7.0-canary-e20de023-20251223174329 → 1.7.0-canary-c8f933e3-20251224124051
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/Compiler.d.ts +0 -3
- package/dist/builtin-loader/swc/types.d.ts +0 -6
- package/dist/builtin-plugin/{CaseSensitivePlugin.d.ts → WarnCaseSensitiveModulesPlugin.d.ts} +1 -1
- package/dist/builtin-plugin/index.d.ts +1 -1
- package/dist/config/defaults.d.ts +1 -10
- package/dist/config/normalization.d.ts +4 -0
- package/dist/config/target.d.ts +6 -6
- package/dist/config/types.d.ts +5 -1
- package/dist/container/ModuleFederationManifestPlugin.d.ts +10 -3
- package/dist/container/ModuleFederationPlugin.d.ts +16 -1
- package/dist/exports.d.ts +4 -5
- package/dist/index.js +730 -353
- package/dist/moduleFederationDefaultRuntime.js +1 -1
- package/dist/rspack.d.ts +0 -9
- package/dist/sharing/CollectSharedEntryPlugin.d.ts +22 -0
- package/dist/sharing/ConsumeSharedPlugin.d.ts +16 -0
- package/dist/sharing/IndependentSharedPlugin.d.ts +35 -0
- package/dist/sharing/ProvideSharedPlugin.d.ts +19 -0
- package/dist/sharing/SharePlugin.d.ts +36 -0
- package/dist/sharing/SharedContainerPlugin.d.ts +23 -0
- package/dist/sharing/SharedUsedExportsOptimizerPlugin.d.ts +14 -0
- package/dist/sharing/TreeShakeSharedPlugin.d.ts +19 -0
- package/dist/sharing/utils.d.ts +1 -0
- package/dist/util/index.d.ts +0 -1
- package/package.json +3 -3
package/dist/Compiler.d.ts
CHANGED
|
@@ -16,7 +16,6 @@ import type { CompilationParams } from "./Compilation";
|
|
|
16
16
|
import { Compilation } from "./Compilation";
|
|
17
17
|
import { ContextModuleFactory } from "./ContextModuleFactory";
|
|
18
18
|
import type { EntryNormalized, OutputNormalized, RspackOptionsNormalized, RspackPluginInstance } from "./config";
|
|
19
|
-
import type { PlatformTargetProperties } from "./config/target";
|
|
20
19
|
import type { FileSystemInfoEntry } from "./FileSystemInfo";
|
|
21
20
|
import { rspack } from "./index";
|
|
22
21
|
import Cache from "./lib/Cache";
|
|
@@ -127,8 +126,6 @@ declare class Compiler {
|
|
|
127
126
|
get managedPaths(): never;
|
|
128
127
|
get immutablePaths(): never;
|
|
129
128
|
get _lastCompilation(): Compilation | undefined;
|
|
130
|
-
get platform(): PlatformTargetProperties;
|
|
131
|
-
set platform(platform: PlatformTargetProperties);
|
|
132
129
|
/**
|
|
133
130
|
* Note: This is not a webpack public API, maybe removed in future.
|
|
134
131
|
* @internal
|
|
@@ -10,11 +10,6 @@ export type SwcLoaderTsParserConfig = TsParserConfig;
|
|
|
10
10
|
export type SwcLoaderTransformConfig = TransformConfig;
|
|
11
11
|
export type SwcLoaderOptions = Config & {
|
|
12
12
|
isModule?: boolean | "unknown";
|
|
13
|
-
/**
|
|
14
|
-
* Collects information from TypeScript's AST for consumption by subsequent Rspack processes,
|
|
15
|
-
* providing better TypeScript development experience and smaller output bundle size.
|
|
16
|
-
*/
|
|
17
|
-
collectTypeScriptInfo?: CollectTypeScriptInfoOptions;
|
|
18
13
|
/**
|
|
19
14
|
* Experimental features provided by Rspack.
|
|
20
15
|
* @experimental
|
|
@@ -22,7 +17,6 @@ export type SwcLoaderOptions = Config & {
|
|
|
22
17
|
rspackExperiments?: {
|
|
23
18
|
import?: PluginImportOptions;
|
|
24
19
|
/**
|
|
25
|
-
* @deprecated Use top-level `collectTypeScriptInfo` instead.
|
|
26
20
|
* Collects information from TypeScript's AST for consumption by subsequent Rspack processes,
|
|
27
21
|
* providing better TypeScript development experience and smaller output bundle size.
|
|
28
22
|
*/
|
|
@@ -5,7 +5,6 @@ export * from "./AsyncWebAssemblyModulesPlugin";
|
|
|
5
5
|
export * from "./BannerPlugin";
|
|
6
6
|
export * from "./BundlerInfoRspackPlugin";
|
|
7
7
|
export { createNativePlugin, RspackBuiltinPlugin } from "./base";
|
|
8
|
-
export * from "./CaseSensitivePlugin";
|
|
9
8
|
export * from "./ChunkPrefetchPreloadPlugin";
|
|
10
9
|
export * from "./CircularDependencyRspackPlugin";
|
|
11
10
|
export * from "./CommonJsChunkFormatPlugin";
|
|
@@ -80,5 +79,6 @@ export * from "./SplitChunksPlugin";
|
|
|
80
79
|
export * from "./SubresourceIntegrityPlugin";
|
|
81
80
|
export * from "./SwcJsMinimizerPlugin";
|
|
82
81
|
export * from "./URLPlugin";
|
|
82
|
+
export * from "./WarnCaseSensitiveModulesPlugin";
|
|
83
83
|
export * from "./WebWorkerTemplatePlugin";
|
|
84
84
|
export * from "./WorkerPlugin";
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
import type { RspackOptionsNormalized } from "./normalization";
|
|
2
|
-
export declare const applyRspackOptionsDefaults: (options: RspackOptionsNormalized) =>
|
|
3
|
-
platform: false | {
|
|
4
|
-
web: boolean | null | undefined;
|
|
5
|
-
browser: boolean | null | undefined;
|
|
6
|
-
webworker: boolean | null | undefined;
|
|
7
|
-
node: boolean | null | undefined;
|
|
8
|
-
nwjs: boolean | null | undefined;
|
|
9
|
-
electron: boolean | null | undefined;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
2
|
+
export declare const applyRspackOptionsDefaults: (options: RspackOptionsNormalized) => void;
|
|
12
3
|
export declare const applyRspackOptionsBaseDefaults: (options: RspackOptionsNormalized) => void;
|
|
13
4
|
export declare const getPnpDefault: () => boolean;
|
|
@@ -111,6 +111,10 @@ 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;
|
|
114
118
|
futureDefaults?: boolean;
|
|
115
119
|
rspackFuture?: RspackFutureOptions;
|
|
116
120
|
buildHttp?: HttpUriPluginOptions;
|
package/dist/config/target.d.ts
CHANGED
|
@@ -5,17 +5,17 @@
|
|
|
5
5
|
export declare const getDefaultTarget: (context: string) => "browserslist" | "web";
|
|
6
6
|
export type PlatformTargetProperties = {
|
|
7
7
|
/** web platform, importing of http(s) and std: is available */
|
|
8
|
-
web
|
|
8
|
+
web: boolean | null;
|
|
9
9
|
/** browser platform, running in a normal web browser */
|
|
10
|
-
browser
|
|
10
|
+
browser: boolean | null;
|
|
11
11
|
/** (Web)Worker platform, running in a web/shared/service worker */
|
|
12
|
-
webworker
|
|
12
|
+
webworker: boolean | null;
|
|
13
13
|
/** node platform, require of node built-in modules is available */
|
|
14
|
-
node
|
|
14
|
+
node: boolean | null;
|
|
15
15
|
/** nwjs platform, require of legacy nw.gui is available */
|
|
16
|
-
nwjs
|
|
16
|
+
nwjs: boolean | null;
|
|
17
17
|
/** electron platform, require of some electron built-in modules is available */
|
|
18
|
-
electron
|
|
18
|
+
electron: boolean | null;
|
|
19
19
|
};
|
|
20
20
|
export type ElectronContextTargetProperties = {
|
|
21
21
|
/** in main context */
|
package/dist/config/types.d.ts
CHANGED
|
@@ -2103,7 +2103,6 @@ export type Experiments = {
|
|
|
2103
2103
|
outputModule?: boolean;
|
|
2104
2104
|
/**
|
|
2105
2105
|
* Enable top-level await.
|
|
2106
|
-
* @deprecated This option is deprecated, top-level await is enabled by default.
|
|
2107
2106
|
* @default true
|
|
2108
2107
|
*/
|
|
2109
2108
|
topLevelAwait?: boolean;
|
|
@@ -2130,6 +2129,11 @@ export type Experiments = {
|
|
|
2130
2129
|
* Enable incremental builds.
|
|
2131
2130
|
*/
|
|
2132
2131
|
incremental?: IncrementalPresets | Incremental;
|
|
2132
|
+
/**
|
|
2133
|
+
* Enable multi-threaded code splitting algorithm.
|
|
2134
|
+
* @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
|
|
2135
|
+
*/
|
|
2136
|
+
parallelCodeSplitting?: boolean;
|
|
2133
2137
|
/**
|
|
2134
2138
|
* Enable future default options.
|
|
2135
2139
|
* @default false
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
|
|
2
2
|
import { RspackBuiltinPlugin } from "../builtin-plugin/base";
|
|
3
3
|
import type { Compiler } from "../Compiler";
|
|
4
|
+
import { type ModuleFederationPluginOptions } from "./ModuleFederationPlugin";
|
|
4
5
|
export type RemoteAliasMap = Record<string, {
|
|
5
6
|
name: string;
|
|
6
7
|
entry?: string;
|
|
@@ -15,7 +16,7 @@ export type ManifestSharedOption = {
|
|
|
15
16
|
requiredVersion?: string;
|
|
16
17
|
singleton?: boolean;
|
|
17
18
|
};
|
|
18
|
-
|
|
19
|
+
type InternalManifestPluginOptions = {
|
|
19
20
|
name?: string;
|
|
20
21
|
globalName?: string;
|
|
21
22
|
filePath?: string;
|
|
@@ -25,13 +26,19 @@ export type ModuleFederationManifestPluginOptions = {
|
|
|
25
26
|
exposes?: ManifestExposeOption[];
|
|
26
27
|
shared?: ManifestSharedOption[];
|
|
27
28
|
};
|
|
29
|
+
export type ModuleFederationManifestPluginOptions = boolean | Pick<InternalManifestPluginOptions, "disableAssetsAnalyze" | "filePath" | "fileName">;
|
|
30
|
+
export declare function getFileName(manifestOptions: ModuleFederationManifestPluginOptions): {
|
|
31
|
+
statsFileName: string;
|
|
32
|
+
manifestFileName: string;
|
|
33
|
+
};
|
|
28
34
|
/**
|
|
29
35
|
* JS-side post-processing plugin: reads mf-manifest.json and mf-stats.json, executes additionalData callback and merges/overwrites manifest.
|
|
30
36
|
* To avoid cross-NAPI callback complexity, this plugin runs at the afterProcessAssets stage to ensure Rust-side MfManifestPlugin has already output its artifacts.
|
|
31
37
|
*/
|
|
32
38
|
export declare class ModuleFederationManifestPlugin extends RspackBuiltinPlugin {
|
|
33
39
|
name: BuiltinPluginName;
|
|
34
|
-
private
|
|
35
|
-
constructor(opts:
|
|
40
|
+
private rawOpts;
|
|
41
|
+
constructor(opts: ModuleFederationPluginOptions);
|
|
36
42
|
raw(compiler: Compiler): BuiltinPlugin;
|
|
37
43
|
}
|
|
44
|
+
export {};
|
|
@@ -1,15 +1,30 @@
|
|
|
1
1
|
import type { Compiler } from "../Compiler";
|
|
2
|
+
import type { ExternalsType } from "../config";
|
|
2
3
|
import { type ModuleFederationManifestPluginOptions } from "./ModuleFederationManifestPlugin";
|
|
3
4
|
import type { ModuleFederationPluginV1Options } from "./ModuleFederationPluginV1";
|
|
4
5
|
export interface ModuleFederationPluginOptions extends Omit<ModuleFederationPluginV1Options, "enhanced"> {
|
|
5
6
|
runtimePlugins?: RuntimePlugins;
|
|
6
7
|
implementation?: string;
|
|
7
8
|
shareStrategy?: "version-first" | "loaded-first";
|
|
8
|
-
manifest?:
|
|
9
|
+
manifest?: ModuleFederationManifestPluginOptions;
|
|
10
|
+
injectUsedExports?: boolean;
|
|
11
|
+
independentShareDir?: string;
|
|
12
|
+
treeshakeSharedExcludedPlugins?: string[];
|
|
9
13
|
}
|
|
10
14
|
export type RuntimePlugins = string[] | [string, Record<string, unknown>][];
|
|
11
15
|
export declare class ModuleFederationPlugin {
|
|
12
16
|
private _options;
|
|
17
|
+
private _treeShakeSharedPlugin?;
|
|
13
18
|
constructor(_options: ModuleFederationPluginOptions);
|
|
14
19
|
apply(compiler: Compiler): void;
|
|
15
20
|
}
|
|
21
|
+
interface RemoteInfo {
|
|
22
|
+
alias: string;
|
|
23
|
+
name?: string;
|
|
24
|
+
entry?: string;
|
|
25
|
+
externalType: ExternalsType;
|
|
26
|
+
shareScope: string;
|
|
27
|
+
}
|
|
28
|
+
type RemoteInfos = Record<string, RemoteInfo[]>;
|
|
29
|
+
export declare function getRemoteInfos(options: ModuleFederationPluginOptions): RemoteInfos;
|
|
30
|
+
export {};
|
package/dist/exports.d.ts
CHANGED
|
@@ -47,11 +47,7 @@ export declare const util: {
|
|
|
47
47
|
cleverMerge: <First, Second>(first: First, second: Second) => First | Second | (First & Second);
|
|
48
48
|
};
|
|
49
49
|
export type { BannerPluginArgument, DefinePluginOptions, EntryOptions, ProgressPluginArgument, ProvidePluginOptions } from "./builtin-plugin";
|
|
50
|
-
export { BannerPlugin,
|
|
51
|
-
/**
|
|
52
|
-
* @deprecated Use `rspack.CaseSensitivePlugin` instead
|
|
53
|
-
*/
|
|
54
|
-
CaseSensitivePlugin as WarnCaseSensitiveModulesPlugin, DefinePlugin, DynamicEntryPlugin, EntryPlugin, ExternalsPlugin, HotModuleReplacementPlugin, IgnorePlugin, type IgnorePluginOptions, NoEmitOnErrorsPlugin, ProgressPlugin, ProvidePlugin, RuntimePlugin } from "./builtin-plugin";
|
|
50
|
+
export { BannerPlugin, DefinePlugin, DynamicEntryPlugin, EntryPlugin, ExternalsPlugin, HotModuleReplacementPlugin, IgnorePlugin, type IgnorePluginOptions, NoEmitOnErrorsPlugin, ProgressPlugin, ProvidePlugin, RuntimePlugin, WarnCaseSensitiveModulesPlugin } from "./builtin-plugin";
|
|
55
51
|
export { DllPlugin, type DllPluginOptions } from "./lib/DllPlugin";
|
|
56
52
|
export { DllReferencePlugin, type DllReferencePluginOptions, type DllReferencePluginOptionsContent, type DllReferencePluginOptionsManifest, type DllReferencePluginOptionsSourceType } from "./lib/DllReferencePlugin";
|
|
57
53
|
export { default as EntryOptionPlugin } from "./lib/EntryOptionPlugin";
|
|
@@ -125,11 +121,14 @@ export declare const container: {
|
|
|
125
121
|
import { ConsumeSharedPlugin } from "./sharing/ConsumeSharedPlugin";
|
|
126
122
|
import { ProvideSharedPlugin } from "./sharing/ProvideSharedPlugin";
|
|
127
123
|
import { SharePlugin } from "./sharing/SharePlugin";
|
|
124
|
+
import { TreeShakeSharedPlugin } from "./sharing/TreeShakeSharedPlugin";
|
|
128
125
|
export type { ConsumeSharedPluginOptions, Consumes, ConsumesConfig, ConsumesItem, ConsumesObject } from "./sharing/ConsumeSharedPlugin";
|
|
129
126
|
export type { ProvideSharedPluginOptions, Provides, ProvidesConfig, ProvidesItem, ProvidesObject } from "./sharing/ProvideSharedPlugin";
|
|
130
127
|
export type { Shared, SharedConfig, SharedItem, SharedObject, SharePluginOptions } from "./sharing/SharePlugin";
|
|
128
|
+
export type { TreeshakeSharedPluginOptions } from "./sharing/TreeShakeSharedPlugin";
|
|
131
129
|
export declare const sharing: {
|
|
132
130
|
ProvideSharedPlugin: typeof ProvideSharedPlugin;
|
|
131
|
+
TreeShakeSharedPlugin: typeof TreeShakeSharedPlugin;
|
|
133
132
|
ConsumeSharedPlugin: typeof ConsumeSharedPlugin;
|
|
134
133
|
SharePlugin: typeof SharePlugin;
|
|
135
134
|
};
|