@module-federation/storybook-addon 6.0.0 → 6.0.2
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/README.md +11 -9
- package/dist/package.json +4 -4
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -79,21 +79,23 @@ export default config;
|
|
|
79
79
|
|
|
80
80
|
### For the [NX](https://nx.dev/getting-started/intro) projects:
|
|
81
81
|
|
|
82
|
-
Replace
|
|
82
|
+
Replace Nx module federation wiring in `webpack.config.js` with a plain webpack config that uses `withModuleFederation`.
|
|
83
83
|
Example:
|
|
84
84
|
|
|
85
85
|
```javascript
|
|
86
|
-
const
|
|
87
|
-
const
|
|
86
|
+
const path = require('path');
|
|
87
|
+
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
88
88
|
const { withModuleFederation } = require('@module-federation/storybook-addon');
|
|
89
|
-
|
|
90
89
|
const baseConfig = require('./module-federation.config');
|
|
91
90
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
91
|
+
module.exports = withModuleFederation(baseConfig, { dts: false })({
|
|
92
|
+
mode: 'development',
|
|
93
|
+
context: __dirname,
|
|
94
|
+
entry: {
|
|
95
|
+
main: path.resolve(__dirname, 'src/main.ts'),
|
|
96
|
+
},
|
|
97
|
+
plugins: [new HtmlWebpackPlugin({ template: path.resolve(__dirname, 'src/index.html') })],
|
|
98
|
+
});
|
|
97
99
|
```
|
|
98
100
|
|
|
99
101
|
In file `./storybook/main.js`:
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/storybook-addon",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.2",
|
|
4
4
|
"description": "Storybook addon to consume remote module federated apps/components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -58,12 +58,12 @@
|
|
|
58
58
|
"@rsbuild/core": "2.0.0-beta.2",
|
|
59
59
|
"@storybook/node-logger": "7.6.20",
|
|
60
60
|
"@storybook/core": "^8.4.6",
|
|
61
|
-
"webpack": "5.
|
|
61
|
+
"webpack": "5.104.1",
|
|
62
62
|
"webpack-virtual-modules": "0.6.2"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"@rsbuild/core": "2.0.0-
|
|
66
|
-
"@module-federation/sdk": "^2.
|
|
65
|
+
"@rsbuild/core": "^1.0.1 || ^2.0.0-0",
|
|
66
|
+
"@module-federation/sdk": "^2.1.0",
|
|
67
67
|
"@nx/react": ">= 16.0.0",
|
|
68
68
|
"@nx/webpack": ">= 16.0.0",
|
|
69
69
|
"@nx/module-federation": ">= 16.0.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/storybook-addon",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.2",
|
|
4
4
|
"description": "Storybook addon to consume remote module federated apps/components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -49,21 +49,21 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@module-federation/enhanced": "2.
|
|
53
|
-
"@module-federation/sdk": "2.
|
|
52
|
+
"@module-federation/enhanced": "2.1.0",
|
|
53
|
+
"@module-federation/sdk": "2.1.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"jest-fixed-jsdom": "^0.0.9",
|
|
57
57
|
"@rsbuild/core": "2.0.0-beta.2",
|
|
58
58
|
"@storybook/node-logger": "7.6.20",
|
|
59
59
|
"@storybook/core": "^8.4.6",
|
|
60
|
-
"webpack": "5.
|
|
60
|
+
"webpack": "5.104.1",
|
|
61
61
|
"webpack-virtual-modules": "0.6.2",
|
|
62
|
-
"@module-federation/utilities": "3.1.
|
|
62
|
+
"@module-federation/utilities": "3.1.85"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"@rsbuild/core": "2.0.0-
|
|
66
|
-
"@module-federation/sdk": "^2.
|
|
65
|
+
"@rsbuild/core": "^1.0.1 || ^2.0.0-0",
|
|
66
|
+
"@module-federation/sdk": "^2.1.0",
|
|
67
67
|
"@nx/react": ">= 16.0.0",
|
|
68
68
|
"@nx/webpack": ">= 16.0.0",
|
|
69
69
|
"@nx/module-federation": ">= 16.0.0",
|