@module-federation/rsbuild-plugin 0.23.0 → 0.24.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/cli/index.d.ts +2 -1
- package/dist/index.js +3 -0
- package/dist/index.mjs +2 -2
- package/dist/utils/ssr.d.ts +4 -0
- package/package.json +5 -5
package/dist/cli/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ModuleFederationPlugin, PLUGIN_NAME } from '@module-federation/enhanced/rspack';
|
|
1
|
+
import { ModuleFederationPlugin, TreeShakingSharedPlugin, PLUGIN_NAME } from '@module-federation/enhanced/rspack';
|
|
2
2
|
import { SSR_DIR, StatsAssetResource } from '../utils';
|
|
3
3
|
import type { moduleFederationPlugin } from '@module-federation/sdk';
|
|
4
4
|
import type { RsbuildPlugin, Rspack } from '@rsbuild/core';
|
|
@@ -30,3 +30,4 @@ declare const isSSRConfig: (bundlerConfigName?: string) => boolean;
|
|
|
30
30
|
declare const isRspressSSGConfig: (bundlerConfigName?: string) => bundlerConfigName is "node";
|
|
31
31
|
export declare const pluginModuleFederation: (moduleFederationOptions: ModuleFederationOptions, rsbuildOptions?: RSBUILD_PLUGIN_OPTIONS) => RsbuildPlugin;
|
|
32
32
|
export { createModuleFederationConfig } from '@module-federation/sdk';
|
|
33
|
+
export { TreeShakingSharedPlugin };
|
package/dist/index.js
CHANGED
|
@@ -41,6 +41,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
41
41
|
PLUGIN_NAME: ()=>rspack_namespaceObject.PLUGIN_NAME,
|
|
42
42
|
SSR_DIR: ()=>SSR_DIR,
|
|
43
43
|
isMFFormat: ()=>isMFFormat,
|
|
44
|
+
TreeShakingSharedPlugin: ()=>rspack_namespaceObject.TreeShakingSharedPlugin,
|
|
44
45
|
createModuleFederationConfig: ()=>sdk_namespaceObject.createModuleFederationConfig
|
|
45
46
|
});
|
|
46
47
|
const enhanced_namespaceObject = require("@module-federation/enhanced");
|
|
@@ -518,6 +519,7 @@ const pluginModuleFederation = (moduleFederationOptions, rsbuildOptions)=>({
|
|
|
518
519
|
exports.PLUGIN_NAME = __webpack_exports__.PLUGIN_NAME;
|
|
519
520
|
exports.RSBUILD_PLUGIN_MODULE_FEDERATION_NAME = __webpack_exports__.RSBUILD_PLUGIN_MODULE_FEDERATION_NAME;
|
|
520
521
|
exports.SSR_DIR = __webpack_exports__.SSR_DIR;
|
|
522
|
+
exports.TreeShakingSharedPlugin = __webpack_exports__.TreeShakingSharedPlugin;
|
|
521
523
|
exports.createModuleFederationConfig = __webpack_exports__.createModuleFederationConfig;
|
|
522
524
|
exports.isMFFormat = __webpack_exports__.isMFFormat;
|
|
523
525
|
exports.pluginModuleFederation = __webpack_exports__.pluginModuleFederation;
|
|
@@ -525,6 +527,7 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
|
525
527
|
"PLUGIN_NAME",
|
|
526
528
|
"RSBUILD_PLUGIN_MODULE_FEDERATION_NAME",
|
|
527
529
|
"SSR_DIR",
|
|
530
|
+
"TreeShakingSharedPlugin",
|
|
528
531
|
"createModuleFederationConfig",
|
|
529
532
|
"isMFFormat",
|
|
530
533
|
"pluginModuleFederation"
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parseOptions } from "@module-federation/enhanced";
|
|
2
|
-
import { ModuleFederationPlugin, PLUGIN_NAME } from "@module-federation/enhanced/rspack";
|
|
2
|
+
import { ModuleFederationPlugin, PLUGIN_NAME, TreeShakingSharedPlugin } from "@module-federation/enhanced/rspack";
|
|
3
3
|
import { TEMP_DIR, createLogger, createModuleFederationConfig, encodeName, getManifestFileName, isRequiredVersion } from "@module-federation/sdk";
|
|
4
4
|
import util from "util";
|
|
5
5
|
import fs_extra from "fs-extra";
|
|
@@ -467,4 +467,4 @@ const pluginModuleFederation = (moduleFederationOptions, rsbuildOptions)=>({
|
|
|
467
467
|
});
|
|
468
468
|
}
|
|
469
469
|
});
|
|
470
|
-
export { PLUGIN_NAME, RSBUILD_PLUGIN_MODULE_FEDERATION_NAME, SSR_DIR, createModuleFederationConfig, isMFFormat, pluginModuleFederation };
|
|
470
|
+
export { PLUGIN_NAME, RSBUILD_PLUGIN_MODULE_FEDERATION_NAME, SSR_DIR, TreeShakingSharedPlugin, createModuleFederationConfig, isMFFormat, pluginModuleFederation };
|
package/dist/utils/ssr.d.ts
CHANGED
|
@@ -44,4 +44,8 @@ export declare function createSSRMFConfig(mfConfig: moduleFederationPlugin.Modul
|
|
|
44
44
|
disableAlias?: boolean;
|
|
45
45
|
};
|
|
46
46
|
async?: boolean | moduleFederationPlugin.AsyncBoundaryOptions;
|
|
47
|
+
treeShakingDir?: string;
|
|
48
|
+
injectTreeShakingUsedExports?: boolean;
|
|
49
|
+
treeShakingSharedExcludePlugins?: string[];
|
|
50
|
+
treeShakingSharedPlugins?: string[];
|
|
47
51
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/rsbuild-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "Module Federation plugin for Rsbuild",
|
|
5
5
|
"homepage": "https://module-federation.io",
|
|
6
6
|
"bugs": {
|
|
@@ -50,16 +50,16 @@
|
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"fs-extra": "11.3.0",
|
|
53
|
-
"@module-federation/
|
|
54
|
-
"@module-federation/
|
|
55
|
-
"@module-federation/
|
|
53
|
+
"@module-federation/sdk": "0.24.0",
|
|
54
|
+
"@module-federation/enhanced": "0.24.0",
|
|
55
|
+
"@module-federation/node": "2.7.29"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@rslib/core": "^0.12.4",
|
|
59
59
|
"@rsbuild/core": "^1.3.21"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
|
-
"@rsbuild/core": "^1.3.21"
|
|
62
|
+
"@rsbuild/core": "^1.3.21 || ^2.0.0-0"
|
|
63
63
|
},
|
|
64
64
|
"peerDependenciesMeta": {
|
|
65
65
|
"@rsbuild/core": {
|