@module-federation/storybook-addon 0.0.0-feat-node-support-1702930274548 → 0.0.0-fix-lazy-comile-20250928105735

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 ScriptedAlchemy LLC (Zack Jackson) Zhou Shaw (zhouxiao)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,163 @@
1
+ # Storybook addon for Module Federation
2
+
3
+ This addon enables to consume remote Module Federated apps/components
4
+
5
+ ## Install
6
+
7
+ ```shell
8
+ # with NPM
9
+ npm install @module-federation/storybook-addon
10
+
11
+ # with Yarn
12
+ yarn add @module-federation/storybook-addon
13
+ ```
14
+
15
+ ## Configuration
16
+
17
+ In file `./storybook/main.js`:
18
+
19
+ ```js
20
+ const moduleFederationConfig = {
21
+ // Module Federation config
22
+ };
23
+
24
+ const storybookConfig = {
25
+ stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
26
+ addons: [
27
+ // other addons,
28
+ {
29
+ name: '@module-federation/storybook-addon',
30
+ options: {
31
+ moduleFederationConfig,
32
+ },
33
+ },
34
+ ],
35
+ framework: '@storybook/react',
36
+ core: {
37
+ builder: '@storybook/builder-webpack5', // is required webpack 5 builder
38
+ },
39
+ };
40
+
41
+ module.exports = storybookConfig;
42
+ ```
43
+
44
+ ---
45
+
46
+ ### Rsbuild App or Rslib Module
47
+
48
+ ```js
49
+ import { dirname, join } from 'node:path';
50
+ import type { StorybookConfig } from 'storybook-react-rsbuild';
51
+
52
+ function getAbsolutePath(value: string): any {
53
+ return dirname(require.resolve(join(value, 'package.json')));
54
+ }
55
+
56
+ const config: StorybookConfig = {
57
+ stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
58
+ framework: {
59
+ name: getAbsolutePath('storybook-react-rsbuild'),
60
+ options: {},
61
+ },
62
+ addons: [
63
+ {
64
+ name: '@module-federation/storybook-addon/preset',
65
+ options: {
66
+ // add remote here and then you can load remote in your story
67
+ remotes: {
68
+ 'rslib-module':
69
+ 'rslib-module@http://localhost:3000/mf/mf-manifest.json',
70
+ },
71
+ },
72
+ },
73
+ ],
74
+ };
75
+
76
+ export default config;
77
+
78
+ ```
79
+
80
+ ### For the [NX](https://nx.dev/getting-started/intro) projects:
81
+
82
+ Replace NX utils `withModuleFederation` in `webpack.config.js` with our utils `withModuleFederation`.
83
+ Example:
84
+
85
+ ```javascript
86
+ const { composePlugins, withNx } = require('@nx/webpack');
87
+ const { withReact } = require('@nx/react');
88
+ const { withModuleFederation } = require('@module-federation/storybook-addon');
89
+
90
+ const baseConfig = require('./module-federation.config');
91
+
92
+ const config = {
93
+ ...baseConfig,
94
+ };
95
+
96
+ module.exports = composePlugins(withNx(), withReact(), withModuleFederation(config));
97
+ ```
98
+
99
+ In file `./storybook/main.js`:
100
+
101
+ ```js
102
+ const nxModuleFederationConfig = {
103
+ // Module Federation config
104
+ };
105
+
106
+ const storybookConfig = {
107
+ stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
108
+ addons: [
109
+ // other addons,
110
+ {
111
+ name: '@module-federation/storybook-addon',
112
+ options: {
113
+ nxModuleFederationConfig,
114
+ },
115
+ },
116
+ ],
117
+ framework: '@storybook/react',
118
+ core: {
119
+ builder: '@storybook/builder-webpack5', // is required webpack 5 builder
120
+ },
121
+ };
122
+
123
+ module.exports = storybookConfig;
124
+ ```
125
+
126
+ ## Usage
127
+
128
+ ```jsx
129
+ import React, { Suspense } from 'react';
130
+
131
+ const LazyButton = React.lazy(() => import('remote/Button'));
132
+
133
+ const Button = (props) => (
134
+ <Suspense fallback={<p>Please wait...</p>}>
135
+ <LazyButton {...props} />
136
+ </Suspense>
137
+ );
138
+
139
+ export default {
140
+ title: 'ModuleFederation/Button',
141
+ component: Button,
142
+ argTypes: {
143
+ variant: {
144
+ control: 'select',
145
+ options: ['primary', 'secondary'],
146
+ },
147
+ },
148
+ };
149
+
150
+ const Template = (args) => <Button {...args} />;
151
+
152
+ export const Primary = Template.bind({ variant: 'primary' });
153
+ Primary.args = {
154
+ variant: 'primary',
155
+ children: 'Button',
156
+ };
157
+
158
+ export const Secondary = Template.bind({});
159
+ Secondary.args = {
160
+ variant: 'secondary',
161
+ children: 'Button',
162
+ };
163
+ ```
@@ -0,0 +1,100 @@
1
+ {
2
+ "name": "@module-federation/storybook-addon",
3
+ "version": "0.0.0-fix-lazy-comile-20250928105735",
4
+ "description": "Storybook addon to consume remote module federated apps/components",
5
+ "type": "commonjs",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/module-federation/core.git",
10
+ "directory": "packages/storybook-addon"
11
+ },
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "keywords": [
16
+ "module-federation",
17
+ "typescript",
18
+ "storybook",
19
+ "rsbuild",
20
+ "storybook-rsbuild",
21
+ "addon"
22
+ ],
23
+ "files": [
24
+ "dist/",
25
+ "README.md"
26
+ ],
27
+ "author": "Fiodorov Andrei <hello@fyodorovandrei.com> (https://github.com/fyodorovandrei)",
28
+ "main": "dist/src/index.js",
29
+ "types": "dist/src/index.d.ts",
30
+ "exports": {
31
+ ".": {
32
+ "types": "./dist/src/index.d.ts",
33
+ "default": "./dist/src/index.js"
34
+ },
35
+ "./preset": {
36
+ "types": "./dist/preset.d.ts",
37
+ "default": "./dist/preset.js"
38
+ },
39
+ "./*": "./*"
40
+ },
41
+ "typesVersions": {
42
+ "*": {
43
+ ".": [
44
+ "./dist/index.d.ts"
45
+ ],
46
+ "preset": [
47
+ "./dist/preset.d.ts"
48
+ ]
49
+ }
50
+ },
51
+ "dependencies": {
52
+ "@module-federation/enhanced": "workspace:*",
53
+ "@module-federation/sdk": "workspace:*"
54
+ },
55
+ "devDependencies": {
56
+ "jest-fixed-jsdom": "^0.0.9",
57
+ "@module-federation/utilities": "workspace:*",
58
+ "@rsbuild/core": "^1.3.21",
59
+ "@storybook/node-logger": "7.6.20",
60
+ "@storybook/core": "^8.4.6",
61
+ "webpack": "5.94.0",
62
+ "webpack-virtual-modules": "0.6.2"
63
+ },
64
+ "peerDependencies": {
65
+ "@rsbuild/core": "^1.0.1",
66
+ "@module-federation/sdk": "0.0.0-fix-lazy-comile-20250928105735",
67
+ "@nx/react": ">= 16.0.0",
68
+ "@nx/webpack": ">= 16.0.0",
69
+ "@storybook/core": ">= 8.2.0",
70
+ "@storybook/node-logger": "^6.5.16 || ^7.0.0 || ^8.0.0",
71
+ "webpack": "^5.75.0",
72
+ "webpack-virtual-modules": "0.6.2"
73
+ },
74
+ "peerDependenciesMeta": {
75
+ "@rsbuild/core": {
76
+ "optional": true
77
+ },
78
+ "@module-federation/sdk": {
79
+ "optional": true
80
+ },
81
+ "@nx/react": {
82
+ "optional": true
83
+ },
84
+ "@nx/webpack": {
85
+ "optional": true
86
+ },
87
+ "@storybook/core": {
88
+ "optional": true
89
+ },
90
+ "@storybook/node-logger": {
91
+ "optional": true
92
+ },
93
+ "webpack": {
94
+ "optional": true
95
+ },
96
+ "webpack-virtual-modules": {
97
+ "optional": true
98
+ }
99
+ }
100
+ }
@@ -0,0 +1,7 @@
1
+ import type { RsbuildConfig } from '@rsbuild/core';
2
+ import type { moduleFederationPlugin } from '@module-federation/sdk';
3
+ declare const _default: {
4
+ rsbuildFinal: (config: RsbuildConfig, options: moduleFederationPlugin.ModuleFederationPluginOptions) => RsbuildConfig;
5
+ };
6
+ export default _default;
7
+ export { PLUGIN_NAME } from './src/utils/with-module-federation-enhanced-rsbuild';
package/dist/preset.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PLUGIN_NAME = void 0;
4
+ const with_module_federation_enhanced_rsbuild_1 = require("./src/utils/with-module-federation-enhanced-rsbuild");
5
+ exports.default = {
6
+ rsbuildFinal: (config, options) => {
7
+ const { remotes, shared, name, shareStrategy } = options;
8
+ return (0, with_module_federation_enhanced_rsbuild_1.withModuleFederation)(config, {
9
+ name,
10
+ remotes,
11
+ shared,
12
+ shareStrategy,
13
+ });
14
+ },
15
+ };
16
+ var with_module_federation_enhanced_rsbuild_2 = require("./src/utils/with-module-federation-enhanced-rsbuild");
17
+ Object.defineProperty(exports, "PLUGIN_NAME", { enumerable: true, get: function () { return with_module_federation_enhanced_rsbuild_2.PLUGIN_NAME; } });
18
+ //# sourceMappingURL=preset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preset.js","sourceRoot":"","sources":["../preset.ts"],"names":[],"mappings":";;;AAAA,iHAA2F;AAK3F,kBAAe;IACb,YAAY,EAAE,CACZ,MAAqB,EACrB,OAA6D,EAC7D,EAAE;QACF,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;QAEzD,OAAO,IAAA,8DAAoB,EAAC,MAAM,EAAE;YAClC,IAAI;YACJ,OAAO;YACP,MAAM;YACN,aAAa;SACd,CAAC,CAAC;IACL,CAAC;CACF,CAAC;AACF,+GAAkF;AAAzE,sIAAA,WAAW,OAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC"}
@@ -1,12 +1,12 @@
1
- import { Configuration } from 'webpack';
2
- import { ModuleFederationPluginOptions } from '@module-federation/utilities';
3
- import { ModuleFederationConfig } from '@nx/webpack';
1
+ import { type Configuration } from 'webpack';
4
2
  import withModuleFederation from '../utils/with-module-federation';
3
+ import type { moduleFederationPlugin } from '@module-federation/sdk';
4
+ import type { ModuleFederationConfig } from '@nx/webpack';
5
5
  export type Preset = string | {
6
6
  name: string;
7
7
  };
8
8
  type Options = {
9
- moduleFederationConfig?: ModuleFederationPluginOptions;
9
+ moduleFederationConfig?: moduleFederationPlugin.ModuleFederationPluginOptions;
10
10
  nxModuleFederationConfig?: ModuleFederationConfig;
11
11
  presets: {
12
12
  apply<T>(preset: Preset): Promise<T>;
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
@@ -33,7 +43,7 @@ const process = __importStar(require("process"));
33
43
  const webpack_virtual_modules_1 = __importDefault(require("webpack-virtual-modules"));
34
44
  const webpack_1 = require("webpack");
35
45
  const node_logger_1 = require("@storybook/node-logger");
36
- const core_common_1 = require("@storybook/core-common");
46
+ const common_1 = require("@storybook/core/common");
37
47
  const with_module_federation_1 = __importDefault(require("../utils/with-module-federation"));
38
48
  exports.withModuleFederation = with_module_federation_1.default;
39
49
  const correctImportPath_1 = require("../utils/correctImportPath");
@@ -58,18 +68,16 @@ const webpack = async (webpackConfig, options) => {
58
68
  }
59
69
  if (moduleFederationConfig) {
60
70
  node_logger_1.logger.info(`=> [MF] Push Module Federation plugin`);
71
+ // @ts-ignore enhanced add new remoteType 'module-import'
61
72
  plugins.push(new ModuleFederationPlugin(moduleFederationConfig));
62
73
  }
63
74
  const entries = await presets.apply('entries');
64
75
  const bootstrap = entries.map((entryFile) => `import '${(0, correctImportPath_1.correctImportPath)(context, entryFile)}';`);
65
- const index = plugins.findIndex(
66
- //@ts-ignore
67
- (plugin) => plugin.constructor.name === 'VirtualModulesPlugin');
76
+ const index = plugins.findIndex((plugin) => plugin?.constructor.name === 'VirtualModulesPlugin');
68
77
  if (index !== -1) {
69
78
  node_logger_1.logger.info(`=> [MF] Detected plugin VirtualModulesPlugin`);
70
- /* eslint-disable @typescript-eslint/no-explicit-any */
71
79
  const plugin = plugins[index];
72
- const virtualEntries = plugin._staticModules; // TODO: Exist another way to get virtual modules? Or maybe it's good idea to open a PR adding a method to get modules?
80
+ const virtualEntries = plugin.getModuleList('static');
73
81
  const virtualEntriesPaths = Object.keys(virtualEntries);
74
82
  node_logger_1.logger.info(`=> [MF] Write files from VirtualModulesPlugin`);
75
83
  for (const virtualEntryPath of virtualEntriesPaths) {
@@ -90,7 +98,7 @@ const webpack = async (webpackConfig, options) => {
90
98
  filePathFromProjectRootDir === '/storybook-stories.js') {
91
99
  const isStorybookVersion7 = filePathFromProjectRootDir === '/storybook-stories.js';
92
100
  const nonNormalizedStories = await presets.apply('stories');
93
- const stories = (0, core_common_1.normalizeStories)(nonNormalizedStories, {
101
+ const stories = (0, common_1.normalizeStories)(nonNormalizedStories, {
94
102
  configDir: options.configDir,
95
103
  workingDir: context,
96
104
  });
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storybook-addon.js","sourceRoot":"","sources":["../../../src/lib/storybook-addon.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAoB;AACpB,+BAAqC;AACrC,iDAAmC;AACnC,sFAA2D;AAC3D,qCAIiB;AACjB,wDAAgD;AAChD,mDAA0D;AAC1D,6FAAmE;AAmB1D,+BAnBF,gCAAoB,CAmBE;AAlB7B,kEAA+D;AAK/D,MAAM,EAAE,sBAAsB,EAAE,GAAG,mBAAS,CAAC;AAetC,MAAM,OAAO,GAAG,KAAK,EAC1B,aAA4B,EAC5B,OAAgB,EACQ,EAAE;IAC1B,MAAM,EAAE,OAAO,GAAG,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,aAAa,CAAC;IAChE,MAAM,EAAE,sBAAsB,EAAE,OAAO,EAAE,wBAAwB,EAAE,GAAG,OAAO,CAAC;IAC9E,MAAM,OAAO,GAAG,cAAc,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAEhD,iIAAiI;IACjI,MAAM,cAAc,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAC7D,oBAAM,CAAC,IAAI,CAAC,mBAAmB,cAAc,mBAAmB,CAAC,C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AAK,EAAE,CAAC,cAAc,CAAC;QACvB,OAAO;KACR,CAAC;AACJ,CAAC,CAAC;AA5IW,QAAA,OAAO,WA4IlB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"correctImportPath.js","sourceRoot":"","sources":["../../../src/utils/correctImportPath.ts"],"names":[],"mappings":";;;AAAO,MAAM,iBAAiB,GAAG,CAAC,OAAe,EAAE,SAAiB,EAAE,EAAE;IACtE,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE,CAAC;QACnC,IAAI,OAAO,EAAE,QAAQ,KAAK,OAAO,EAAE,CAAC;YAClC,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,IAAI,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE,CAAC;YACpE,OAAO,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACvC,CAAC;QAED,8DAA8D;QAC9D,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;QAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACtD,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAE3C,IAAI,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;YACvC,OAAO,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5C,CAAC;QAED,OAAO,KAAK,QAAQ,EAAE,CAAC;IACzB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAtBW,QAAA,iBAAiB,qBAsB5B"}
@@ -0,0 +1,5 @@
1
+ import type { RsbuildConfig } from '@rsbuild/core';
2
+ import type { moduleFederationPlugin } from '@module-federation/sdk';
3
+ export declare const PLUGIN_NAME = "module-federation-storybook-addon";
4
+ export declare const withModuleFederation: (rsbuildConfig: RsbuildConfig, options: moduleFederationPlugin.ModuleFederationPluginOptions) => RsbuildConfig;
5
+ export default withModuleFederation;
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.withModuleFederation = exports.PLUGIN_NAME = void 0;
7
+ const node_fs_1 = __importDefault(require("node:fs"));
8
+ const node_path_1 = __importDefault(require("node:path"));
9
+ const rspack_1 = require("@module-federation/enhanced/rspack");
10
+ const sdk_1 = require("@module-federation/sdk");
11
+ const correctImportPath_1 = require("./correctImportPath");
12
+ const tempDirPath = node_path_1.default.resolve(process.cwd(), `node_modules/${sdk_1.TEMP_DIR}`);
13
+ exports.PLUGIN_NAME = 'module-federation-storybook-addon';
14
+ // add bootstrap for host project
15
+ const bootstrapPath = node_path_1.default.resolve(process.cwd(), `node_modules/${sdk_1.TEMP_DIR}/storybook-bootstrap.js`);
16
+ const generateBootstrap = (context, entryPath) => {
17
+ return `import('${(0, correctImportPath_1.correctImportPath)(context, entryPath)}');`;
18
+ };
19
+ const writeBootstrap = (context, entryPath) => {
20
+ if (!node_fs_1.default.existsSync(tempDirPath)) {
21
+ node_fs_1.default.mkdirSync(tempDirPath);
22
+ }
23
+ if (node_fs_1.default.existsSync(bootstrapPath)) {
24
+ node_fs_1.default.unlinkSync(bootstrapPath);
25
+ }
26
+ node_fs_1.default.writeFileSync(bootstrapPath, generateBootstrap(context, entryPath));
27
+ };
28
+ const withModuleFederation = (rsbuildConfig, options) => {
29
+ rsbuildConfig.plugins ??= [];
30
+ rsbuildConfig.source ??= {};
31
+ rsbuildConfig.source.entry ??= {};
32
+ const entry = rsbuildConfig.source.entry;
33
+ const context = rsbuildConfig.root || process.cwd();
34
+ for (const entryName in entry) {
35
+ if (Array.isArray(entry[entryName])) {
36
+ writeBootstrap(context, entry[entryName][0]);
37
+ entry[entryName] = [bootstrapPath];
38
+ }
39
+ }
40
+ const rsbuildPlugin = {
41
+ name: 'module-federation-storybook-plugin',
42
+ setup: function (api) {
43
+ api.modifyRsbuildConfig((config, { mergeRsbuildConfig }) => {
44
+ const mfConfig = {
45
+ dev: {
46
+ // remoteEntry already includes one hmr runtime, and an additional one is not necessary.
47
+ hmr: false,
48
+ },
49
+ };
50
+ return mergeRsbuildConfig(config, mfConfig);
51
+ });
52
+ api.modifyBundlerChain(async (chain) => {
53
+ chain.plugin(exports.PLUGIN_NAME).use(rspack_1.ModuleFederationPlugin, [
54
+ {
55
+ name: options.name || exports.PLUGIN_NAME,
56
+ shared: {
57
+ react: {
58
+ singleton: true,
59
+ },
60
+ 'react-dom': {
61
+ singleton: true,
62
+ },
63
+ ...options.shared,
64
+ },
65
+ remotes: {
66
+ ...options.remotes,
67
+ },
68
+ shareStrategy: options.shareStrategy,
69
+ },
70
+ ]);
71
+ });
72
+ },
73
+ };
74
+ rsbuildConfig.plugins.push(rsbuildPlugin);
75
+ return rsbuildConfig;
76
+ };
77
+ exports.withModuleFederation = withModuleFederation;
78
+ exports.default = exports.withModuleFederation;
79
+ //# sourceMappingURL=with-module-federation-enhanced-rsbuild.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"with-module-federation-enhanced-rsbuild.js","sourceRoot":"","sources":["../../../src/utils/with-module-federation-enhanced-rsbuild.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAyB;AACzB,0DAA6B;AAC7B,+DAA4E;AAC5E,gDAAkD;AAElD,2DAAwD;AAKxD,MAAM,WAAW,GAAG,mBAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,gBAAgB,cAAQ,EAAE,CAAC,CAAC;AAC/D,QAAA,WAAW,GAAG,mCAAmC,CAAC;AAC/D,iCAAiC;AACjC,MAAM,aAAa,GAAG,mBAAI,CAAC,OAAO,CAChC,OAAO,CAAC,GAAG,EAAE,EACb,gBAAgB,cAAQ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C;IACH,CAAC;IAED,MAAM,aAAa,GAAkB;QACnC,IAAI,EAAE,oCAAoC;QAC1C,KAAK,EAAE,UAAU,GAAG;YAClB,GAAG,CAAC,mBAAmB,CAAC,CAAC,MAAM,EAAE,EAAE,kBAAkB,EAAE,EAAE,EAAE;gBACzD,MAAM,QAAQ,GAAkB;oBAC9B,GAAG,EAAE;wBACH,wFAAwF;wBACxF,GAAG,EAAE,KAAK;qBACX;iBACF,CAAC;gBACF,OAAO,kBAAkB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;YAC9C,CAAC,CAAC,CAAC;YAEH,GAAG,CAAC,kBAAkB,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;gBACrC,KAAK,CAAC,MAAM,CAAC,mBAAW,CAAC,CAAC,GAAG,CAAC,+BAAsB,EAAE;oBACpD;wBACE,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,mBAAW;wBACjC,MAAM,EAAE;4BACN,KAAK,EAAE;gCACL,SAAS,EAAE,IAAI;6BAChB;4BACD,WAAW,EAAE;gCACX,SAAS,EAAE,IAAI;6BAChB;4BACD,GAAG,OAAO,CAAC,MAAM;yBAClB;wBACD,OAAO,EAAE;4BACP,GAAG,OAAO,CAAC,OAAO;yBACnB;wBACD,aAAa,EAAE,OAAO,CAAC,aAAa;qBACrC;iBACF,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;IAEF,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC1C,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC;AAtDW,QAAA,oBAAoB,wBAsD/B;AAEF,kBAAe,4BAAoB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const utils_1 = require("@nx/react/src/module-federation/utils");
3
+ const utils_1 = require("@nx/module-federation/src/with-module-federation/webpack/utils");
4
4
  const webpack_1 = require("webpack");
5
5
  const { ModuleFederationPlugin } = webpack_1.container;
6
6
  const updateMappedRemotes = (remotes) => {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"with-module-federation.js","sourceRoot":"","sources":["../../../src/utils/with-module-federation.ts"],"names":[],"mappings":";;AAAA,0FAA2G;AAC3G,qCAAmD;AAInD,MAAM,EAAE,sBAAsB,EAAE,GAAG,mBAAS,CAAC;AAE7C,MAAM,mBAAmB,GAAG,CAAC,OAA+B,EAAE,EAAE;IAC9D,MAAM,UAAU,GAA2B,EAAE,CAAC;IAE9C,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACnC,UAAU,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;IAC7C,CAAC,CAAC,CAAC;IAEH,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEF,MAAM,oBAAoB,GAAG,KAAK,EAAE,OAA+B,EAAE,EAAE;IACrE,MAAM,EAAE,aAAa,EAAE,kBAAkB,EAAE,GACzC,MAAM,IAAA,iCAAyB,EAAC,OAAO,CAAC,CAAC;IAE3C,OAAO,CAAC,MAAqB,EAAE,EAAE;QAC/B,MAAM,CAAC,WAAW,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;QAE7C,MAAM,CAAC,YAAY,GAAG;YACpB,YAAY,EAAE,KAAK;SACpB,CAAC;QAEF,MAAM,CAAC,MAAM,GAAG;YACd,UAAU,EAAE,MAAM;SACnB,CAAC;QAEF,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC;QACtC,MAAM,CAAC,OAAO,CAAC,IAAI,CACjB,IAAI,sBAAsB,CAAC;YACzB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,QAAQ,EAAE,gBAAgB;YAC1B,MAAM,EAAE,kBAAkB;YAC1B,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,OAAO,EAAE,mBAAmB,CAAC,aAAa,CAAC;SAC5C,CAAC,CACH,CAAC;QAEF,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,oBAAoB,CAAC"}
package/package.json CHANGED
@@ -1,9 +1,14 @@
1
1
  {
2
2
  "name": "@module-federation/storybook-addon",
3
- "version": "0.0.0-feat-node-support-1702930274548",
3
+ "version": "0.0.0-fix-lazy-comile-20250928105735",
4
4
  "description": "Storybook addon to consume remote module federated apps/components",
5
+ "type": "commonjs",
5
6
  "license": "MIT",
6
- "repository": "https://github.com/module-federation/universe/tree/main/packages/storybook-addon",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/module-federation/core.git",
10
+ "directory": "packages/storybook-addon"
11
+ },
7
12
  "publishConfig": {
8
13
  "access": "public"
9
14
  },
@@ -11,27 +16,85 @@
11
16
  "module-federation",
12
17
  "typescript",
13
18
  "storybook",
19
+ "rsbuild",
20
+ "storybook-rsbuild",
14
21
  "addon"
15
22
  ],
23
+ "files": [
24
+ "dist/",
25
+ "README.md"
26
+ ],
16
27
  "author": "Fiodorov Andrei <hello@fyodorovandrei.com> (https://github.com/fyodorovandrei)",
28
+ "main": "dist/src/index.js",
29
+ "types": "dist/src/index.d.ts",
30
+ "exports": {
31
+ ".": {
32
+ "types": "./dist/src/index.d.ts",
33
+ "default": "./dist/src/index.js"
34
+ },
35
+ "./preset": {
36
+ "types": "./dist/preset.d.ts",
37
+ "default": "./dist/preset.js"
38
+ },
39
+ "./*": "./*"
40
+ },
41
+ "typesVersions": {
42
+ "*": {
43
+ ".": [
44
+ "./dist/index.d.ts"
45
+ ],
46
+ "preset": [
47
+ "./dist/preset.d.ts"
48
+ ]
49
+ }
50
+ },
51
+ "dependencies": {
52
+ "@module-federation/enhanced": "0.0.0-fix-lazy-comile-20250928105735",
53
+ "@module-federation/sdk": "0.0.0-fix-lazy-comile-20250928105735"
54
+ },
17
55
  "devDependencies": {
18
- "@storybook/core-common": "7.4.6",
19
- "@storybook/node-logger": "7.4.6",
20
- "webpack": "5.88.2",
21
- "webpack-virtual-modules": "0.6.1",
22
- "@module-federation/utilities": "3.0.0",
23
- "@nx/react": "^17.1.3",
24
- "@nx/webpack": "^17.1.3"
56
+ "jest-fixed-jsdom": "^0.0.9",
57
+ "@rsbuild/core": "^1.3.21",
58
+ "@storybook/node-logger": "7.6.20",
59
+ "@storybook/core": "^8.4.6",
60
+ "webpack": "5.94.0",
61
+ "webpack-virtual-modules": "0.6.2",
62
+ "@module-federation/utilities": "0.0.0-fix-lazy-comile-20250928105735"
25
63
  },
26
64
  "peerDependencies": {
27
- "@storybook/core-common": "^6.5.16 || ^7.0.0",
28
- "@storybook/node-logger": "^6.5.16 || ^7.0.0",
65
+ "@rsbuild/core": "^1.0.1",
66
+ "@module-federation/sdk": "0.0.0-fix-lazy-comile-20250928105735",
67
+ "@nx/react": ">= 16.0.0",
68
+ "@nx/webpack": ">= 16.0.0",
69
+ "@storybook/core": ">= 8.2.0",
70
+ "@storybook/node-logger": "^6.5.16 || ^7.0.0 || ^8.0.0",
29
71
  "webpack": "^5.75.0",
30
- "webpack-virtual-modules": "^0.5.0 || ^0.6.0",
31
- "@module-federation/utilities": "3.0.0",
32
- "@nx/react": "~16.0.0 || ~17.0.0",
33
- "@nx/webpack": "~16.0.0 || ~17.0.0"
72
+ "webpack-virtual-modules": "0.6.2"
34
73
  },
35
- "main": "./src/index.js",
36
- "type": "commonjs"
37
- }
74
+ "peerDependenciesMeta": {
75
+ "@rsbuild/core": {
76
+ "optional": true
77
+ },
78
+ "@module-federation/sdk": {
79
+ "optional": true
80
+ },
81
+ "@nx/react": {
82
+ "optional": true
83
+ },
84
+ "@nx/webpack": {
85
+ "optional": true
86
+ },
87
+ "@storybook/core": {
88
+ "optional": true
89
+ },
90
+ "@storybook/node-logger": {
91
+ "optional": true
92
+ },
93
+ "webpack": {
94
+ "optional": true
95
+ },
96
+ "webpack-virtual-modules": {
97
+ "optional": true
98
+ }
99
+ }
100
+ }
package/src/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/storybook-addon/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"storybook-addon.js","sourceRoot":"","sources":["../../../../../packages/storybook-addon/src/lib/storybook-addon.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAoB;AACpB,+BAAqC;AACrC,iDAAmC;AACnC,sFAA2D;AAC3D,qCAAmD;AACnD,wDAAgD;AAChD,wDAA0D;AAI1D,6FAAmE;AAgB1D,+BAhBF,gCAAoB,CAgBE;AAf7B,kEAA+D;AAE/D,MAAM,EAAE,sBAAsB,EAAE,GAAG,mBAAS,CAAC;AAetC,MAAM,OAAO,GAAG,KAAK,EAC1B,aAA4B,EAC5B,OAAgB,EACQ,EAAE;IAC1B,MAAM,EAAE,OAAO,GAAG,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,aAAa,CAAC;IAChE,MAAM,EAAE,sBAAsB,EAAE,OAAO,EAAE,wBAAwB,EAAE,GAAG,OAAO,CAAC;IAC9E,MAAM,OAAO,GAAG,cAAc,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAEhD,iIAAiI;IACjI,MAAM,cAAc,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAC7D,oBAAM,CAAC,IAAI,CAAC,mBAAmB,cAAc,mBAAmB,CAAC,CAAC;IAElE,IAAI,cAAc,KAAK,GAAG,EAAE;QAC1B,MAAM,IAAI,KAAK,CACb,qEAAqE,CACtE,CAAC;KACH;IAED,IAAI,wBAAwB,EAAE;QAC5B,oBAAM,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;QAE/C,MAAM,GAAG,GAAG,MAAM,IAAA,gCAAoB,EAAC,wBAAwB,CAAC,CAAC;QAEjE,aAAa,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AAC,CAAC;oBAClD,CAAC,CAAC,CAAC;iBACJ;aACF;YAED,IAAI,CAAC,YAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;gBAC5B,YAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;aAC7C;YAED,YAAE,CAAC,aAAa,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;YACxC,SAAS,CAAC,IAAI,CAAC,WAAW,IAAA,qCAAiB,EAAC,OAAO,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;SACtE;KACF;IAED;;;;SAIK;IACL,MAAM,mBAAmB,GAAG,IAAI,iCAAoB,CAAC;QACnD,cAAc,EAAE,6BAA6B;QAC7C,kBAAkB,EAAE,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;KACzC,CAAC,CAAC;IAEH,IAAI,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;QAChB,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;KACnC;SAAM;QACL,OAAO,CAAC,KAAK,CAAC,GAAG,mBAAmB,CAAC;QACrC,MAAM,GAAG,SAAS,CAAC;KACpB;IACD,oBAAM,CAAC,IAAI,CACT,WAAW,MAAM,uDAAuD,CACzE,CAAC;IAEF,OAAO;QACL,GAAG,aAAa;QAChB,KAAK,EAAE,CAAC,cAAc,CAAC;QACvB,OAAO;KACR,CAAC;AACJ,CAAC,CAAC;AA5IW,QAAA,OAAO,WA4IlB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"correctImportPath.js","sourceRoot":"","sources":["../../../../../packages/storybook-addon/src/utils/correctImportPath.ts"],"names":[],"mappings":";;;AAAO,MAAM,iBAAiB,GAAG,CAAC,OAAe,EAAE,SAAiB,EAAE,EAAE;IACtE,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE;QAClC,IAAI,OAAO,EAAE,QAAQ,KAAK,OAAO,EAAE;YACjC,OAAO,SAAS,CAAC;SAClB;QAED,IAAI,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE;YACnE,OAAO,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;SACtC;QAED,8DAA8D;QAC9D,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;QAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACtD,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAE3C,IAAI,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE;YACtC,OAAO,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;SAC3C;QAED,OAAO,KAAK,QAAQ,EAAE,CAAC;KACxB;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAtBW,QAAA,iBAAiB,qBAsB5B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"with-module-federation.js","sourceRoot":"","sources":["../../../../../packages/storybook-addon/src/utils/with-module-federation.ts"],"names":[],"mappings":";;AAAA,iEAAkF;AAClF,qCAAmD;AAInD,MAAM,EAAE,sBAAsB,EAAE,GAAG,mBAAS,CAAC;AAE7C,MAAM,mBAAmB,GAAG,CAAC,OAA+B,EAAE,EAAE;IAC9D,MAAM,UAAU,GAA2B,EAAE,CAAC;IAE9C,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACnC,UAAU,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;IAC7C,CAAC,CAAC,CAAC;IAEH,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEF,MAAM,oBA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