@module-federation/storybook-addon 3.0.1 → 3.0.3

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 CHANGED
@@ -61,7 +61,7 @@ const config: StorybookConfig = {
61
61
  },
62
62
  addons: [
63
63
  {
64
- name: '@module-federation/storybook-addon/preset.js',
64
+ name: '@module-federation/storybook-addon/preset',
65
65
  options: {
66
66
  // add remote here and then you can load remote in your story
67
67
  remotes: {
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/storybook-addon",
3
- "version": "3.0.1",
3
+ "version": "3.0.3",
4
4
  "description": "Storybook addon to consume remote module federated apps/components",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/module-federation/core/tree/main/packages/storybook-addon",
@@ -18,11 +18,19 @@
18
18
  "README.md"
19
19
  ],
20
20
  "author": "Fiodorov Andrei <hello@fyodorovandrei.com> (https://github.com/fyodorovandrei)",
21
+ "main": "dist/src/index.js",
22
+ "module": "dist/src/index.js",
23
+ "types": "dist/src/index.d.ts",
21
24
  "exports": {
22
25
  ".": {
23
26
  "import": "./dist/src/index.js",
24
27
  "require": "./dist/src/index.js",
25
- "types": "./dist/src/indexd.ts"
28
+ "types": "./dist/src/index.d.ts"
29
+ },
30
+ "./preset": {
31
+ "import": "./dist/preset.js",
32
+ "require": "./dist/preset.js",
33
+ "types": "./dist/preset.d.ts"
26
34
  },
27
35
  "./*": "./*"
28
36
  },
@@ -33,9 +41,11 @@
33
41
  ]
34
42
  }
35
43
  },
36
- "devDependencies": {
44
+ "dependencies": {
37
45
  "@module-federation/enhanced": "workspace:*",
38
- "@module-federation/sdk": "workspace:*",
46
+ "@module-federation/sdk": "workspace:*"
47
+ },
48
+ "devDependencies": {
39
49
  "@module-federation/utilities": "workspace:*",
40
50
  "@rsbuild/core": "^1.0.19",
41
51
  "@storybook/core-common": "7.6.20",
@@ -44,7 +54,7 @@
44
54
  "webpack-virtual-modules": "0.6.2"
45
55
  },
46
56
  "peerDependencies": {
47
- "@module-federation/utilities": "^3.1.21",
57
+ "@module-federation/utilities": "^3.1.23",
48
58
  "@nx/react": "~16.0.0 || ~17.0.0 || ~17.2.0",
49
59
  "@nx/webpack": "~16.0.0 || ~17.0.0 || ~17.2.0",
50
60
  "@storybook/core-common": "^6.5.16 || ^7.0.0",
@@ -52,7 +62,5 @@
52
62
  "webpack": "^5.75.0",
53
63
  "webpack-virtual-modules": "^0.5.0 || ^0.6.0"
54
64
  },
55
- "main": "./src/index.js",
56
- "type": "commonjs",
57
- "types": "./src/index.d.ts"
65
+ "type": "commonjs"
58
66
  }
@@ -0,0 +1,6 @@
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) => Promise<RsbuildConfig>;
5
+ };
6
+ export default _default;
package/dist/preset.js CHANGED
@@ -1,16 +1,15 @@
1
- const {
2
- withModuleFederation,
3
- } = require('./src/utils/with-module-federation-enhanced-rsbuild');
4
-
5
- module.exports = {
6
- rsbuildFinal: (config, options) => {
7
- const { remotes, shared, name, shareStrategy } = options;
8
-
9
- return withModuleFederation(config, {
10
- name,
11
- remotes,
12
- shared,
13
- shareStrategy,
14
- });
15
- },
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const with_module_federation_enhanced_rsbuild_1 = require("./src/utils/with-module-federation-enhanced-rsbuild");
4
+ exports.default = {
5
+ rsbuildFinal: (config, options) => {
6
+ const { remotes, shared, name, shareStrategy } = options;
7
+ return (0, with_module_federation_enhanced_rsbuild_1.withModuleFederation)(config, {
8
+ name,
9
+ remotes,
10
+ shared,
11
+ shareStrategy,
12
+ });
13
+ },
16
14
  };
15
+ //# 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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/storybook-addon",
3
- "version": "3.0.1",
3
+ "version": "3.0.3",
4
4
  "description": "Storybook addon to consume remote module federated apps/components",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/module-federation/core/tree/main/packages/storybook-addon",
@@ -18,11 +18,19 @@
18
18
  "README.md"
19
19
  ],
20
20
  "author": "Fiodorov Andrei <hello@fyodorovandrei.com> (https://github.com/fyodorovandrei)",
21
+ "main": "dist/src/index.js",
22
+ "module": "dist/src/index.js",
23
+ "types": "dist/src/index.d.ts",
21
24
  "exports": {
22
25
  ".": {
23
26
  "import": "./dist/src/index.js",
24
27
  "require": "./dist/src/index.js",
25
- "types": "./dist/src/indexd.ts"
28
+ "types": "./dist/src/index.d.ts"
29
+ },
30
+ "./preset": {
31
+ "import": "./dist/preset.js",
32
+ "require": "./dist/preset.js",
33
+ "types": "./dist/preset.d.ts"
26
34
  },
27
35
  "./*": "./*"
28
36
  },
@@ -33,18 +41,20 @@
33
41
  ]
34
42
  }
35
43
  },
44
+ "dependencies": {
45
+ "@module-federation/enhanced": "0.7.0",
46
+ "@module-federation/sdk": "0.7.0"
47
+ },
36
48
  "devDependencies": {
37
49
  "@rsbuild/core": "^1.0.19",
38
50
  "@storybook/core-common": "7.6.20",
39
51
  "@storybook/node-logger": "7.6.20",
40
52
  "webpack": "5.93.0",
41
53
  "webpack-virtual-modules": "0.6.2",
42
- "@module-federation/enhanced": "0.6.15",
43
- "@module-federation/sdk": "0.6.15",
44
- "@module-federation/utilities": "3.1.21"
54
+ "@module-federation/utilities": "3.1.23"
45
55
  },
46
56
  "peerDependencies": {
47
- "@module-federation/utilities": "^3.1.21",
57
+ "@module-federation/utilities": "^3.1.23",
48
58
  "@nx/react": "~16.0.0 || ~17.0.0 || ~17.2.0",
49
59
  "@nx/webpack": "~16.0.0 || ~17.0.0 || ~17.2.0",
50
60
  "@storybook/core-common": "^6.5.16 || ^7.0.0",