@rspack-canary/core 1.7.0-canary-4941195f-20251224083309 → 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 -1
- package/dist/builtin-loader/swc/types.d.ts +0 -4
- package/dist/builtin-plugin/index.d.ts +0 -4
- package/dist/config/normalization.d.ts +4 -0
- package/dist/config/types.d.ts +5 -0
- package/dist/container/ModuleFederationManifestPlugin.d.ts +10 -3
- package/dist/container/ModuleFederationPlugin.d.ts +16 -1
- package/dist/exports.d.ts +5 -4
- package/dist/index.js +704 -388
- package/dist/moduleFederationDefaultRuntime.js +1 -1
- 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/package.json +3 -3
- package/dist/builtin-plugin/rsc/Coordinator.d.ts +0 -8
- package/dist/builtin-plugin/rsc/RscClientPlugin.d.ts +0 -10
- package/dist/builtin-plugin/rsc/RscServerPlugin.d.ts +0 -10
- package/dist/builtin-plugin/rsc/index.d.ts +0 -19
package/dist/Compiler.d.ts
CHANGED
|
@@ -78,7 +78,6 @@ export type CompilerHooks = {
|
|
|
78
78
|
entryOption: liteTapable.SyncBailHook<[string, EntryNormalized], any>;
|
|
79
79
|
additionalPass: liteTapable.AsyncSeriesHook<[]>;
|
|
80
80
|
};
|
|
81
|
-
export declare const GET_COMPILER_ID: unique symbol;
|
|
82
81
|
declare class Compiler {
|
|
83
82
|
#private;
|
|
84
83
|
hooks: CompilerHooks;
|
|
@@ -21,10 +21,6 @@ export type SwcLoaderOptions = Config & {
|
|
|
21
21
|
* providing better TypeScript development experience and smaller output bundle size.
|
|
22
22
|
*/
|
|
23
23
|
collectTypeScriptInfo?: CollectTypeScriptInfoOptions;
|
|
24
|
-
/**
|
|
25
|
-
* Enable React Server Components support.
|
|
26
|
-
*/
|
|
27
|
-
reactServerComponents?: boolean;
|
|
28
24
|
};
|
|
29
25
|
};
|
|
30
26
|
export interface TerserCompressOptions {
|
|
@@ -72,10 +72,6 @@ export * from "./RslibPlugin";
|
|
|
72
72
|
export * from "./RstestPlugin";
|
|
73
73
|
export * from "./RuntimeChunkPlugin";
|
|
74
74
|
export * from "./RuntimePlugin";
|
|
75
|
-
export { createRscPlugins, RSC_LAYERS_NAMES } from "./rsc";
|
|
76
|
-
export * from "./rsc/Coordinator";
|
|
77
|
-
export * from "./rsc/RscClientPlugin";
|
|
78
|
-
export * from "./rsc/RscServerPlugin";
|
|
79
75
|
export * from "./SideEffectsFlagPlugin";
|
|
80
76
|
export * from "./SizeLimitsPlugin";
|
|
81
77
|
export * from "./SourceMapDevToolPlugin";
|
|
@@ -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/types.d.ts
CHANGED
|
@@ -2129,6 +2129,11 @@ export type Experiments = {
|
|
|
2129
2129
|
* Enable incremental builds.
|
|
2130
2130
|
*/
|
|
2131
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;
|
|
2132
2137
|
/**
|
|
2133
2138
|
* Enable future default options.
|
|
2134
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
|
@@ -55,7 +55,7 @@ export { EnvironmentPlugin } from "./lib/EnvironmentPlugin";
|
|
|
55
55
|
export { LoaderOptionsPlugin } from "./lib/LoaderOptionsPlugin";
|
|
56
56
|
export { LoaderTargetPlugin } from "./lib/LoaderTargetPlugin";
|
|
57
57
|
export type { OutputFileSystem, WatchFileSystem } from "./util/fs";
|
|
58
|
-
import {
|
|
58
|
+
import { EsmLibraryPlugin, FetchCompileAsyncWasmPlugin, lazyCompilationMiddleware, SubresourceIntegrityPlugin } from "./builtin-plugin";
|
|
59
59
|
export { SubresourceIntegrityPlugin };
|
|
60
60
|
interface Web {
|
|
61
61
|
FetchCompileAsyncWasmPlugin: typeof FetchCompileAsyncWasmPlugin;
|
|
@@ -121,18 +121,21 @@ export declare const container: {
|
|
|
121
121
|
import { ConsumeSharedPlugin } from "./sharing/ConsumeSharedPlugin";
|
|
122
122
|
import { ProvideSharedPlugin } from "./sharing/ProvideSharedPlugin";
|
|
123
123
|
import { SharePlugin } from "./sharing/SharePlugin";
|
|
124
|
+
import { TreeShakeSharedPlugin } from "./sharing/TreeShakeSharedPlugin";
|
|
124
125
|
export type { ConsumeSharedPluginOptions, Consumes, ConsumesConfig, ConsumesItem, ConsumesObject } from "./sharing/ConsumeSharedPlugin";
|
|
125
126
|
export type { ProvideSharedPluginOptions, Provides, ProvidesConfig, ProvidesItem, ProvidesObject } from "./sharing/ProvideSharedPlugin";
|
|
126
127
|
export type { Shared, SharedConfig, SharedItem, SharedObject, SharePluginOptions } from "./sharing/SharePlugin";
|
|
128
|
+
export type { TreeshakeSharedPluginOptions } from "./sharing/TreeShakeSharedPlugin";
|
|
127
129
|
export declare const sharing: {
|
|
128
130
|
ProvideSharedPlugin: typeof ProvideSharedPlugin;
|
|
131
|
+
TreeShakeSharedPlugin: typeof TreeShakeSharedPlugin;
|
|
129
132
|
ConsumeSharedPlugin: typeof ConsumeSharedPlugin;
|
|
130
133
|
SharePlugin: typeof SharePlugin;
|
|
131
134
|
};
|
|
132
135
|
export type { FeatureOptions as LightningcssFeatureOptions, LoaderOptions as LightningcssLoaderOptions } from "./builtin-loader/lightningcss/index";
|
|
133
136
|
export type { SwcLoaderEnvConfig, SwcLoaderEsParserConfig, SwcLoaderJscConfig, SwcLoaderModuleConfig, SwcLoaderOptions, SwcLoaderParserConfig, SwcLoaderTransformConfig, SwcLoaderTsParserConfig } from "./builtin-loader/swc/index";
|
|
134
137
|
export type { CircularDependencyRspackPluginOptions, CopyRspackPluginOptions, CssExtractRspackLoaderOptions, CssExtractRspackPluginOptions, EvalDevToolModulePluginOptions, HtmlRspackPluginOptions, LightningCssMinimizerRspackPluginOptions, RsdoctorPluginData, RsdoctorPluginHooks, SourceMapDevToolPluginOptions, SubresourceIntegrityPluginOptions, SwcJsMinimizerRspackPluginOptions } from "./builtin-plugin";
|
|
135
|
-
export { CircularDependencyRspackPlugin, ContextReplacementPlugin,
|
|
138
|
+
export { CircularDependencyRspackPlugin, ContextReplacementPlugin, CopyRspackPlugin, CssExtractRspackPlugin, EvalDevToolModulePlugin, EvalSourceMapDevToolPlugin, HtmlRspackPlugin, LightningCssMinimizerRspackPlugin, NormalModuleReplacementPlugin, SourceMapDevToolPlugin, SwcJsMinimizerRspackPlugin } from "./builtin-plugin";
|
|
136
139
|
import { EnforceExtension, ResolverFactory, async as resolveAsync, sync as resolveSync } from "@rspack/binding";
|
|
137
140
|
import { createNativePlugin } from "./builtin-plugin";
|
|
138
141
|
import { minify, minifySync, transform, transformSync } from "./swc";
|
|
@@ -170,7 +173,5 @@ interface Experiments {
|
|
|
170
173
|
CssChunkingPlugin: typeof CssChunkingPlugin;
|
|
171
174
|
createNativePlugin: typeof createNativePlugin;
|
|
172
175
|
VirtualModulesPlugin: typeof VirtualModulesPlugin;
|
|
173
|
-
createRscPlugins: typeof createRscPlugins;
|
|
174
|
-
RSC_LAYERS_NAMES: typeof RSC_LAYERS_NAMES;
|
|
175
176
|
}
|
|
176
177
|
export declare const experiments: Experiments;
|