create-module-federation 0.0.0-next-20250304120228 → 0.0.0-next-20250305085339

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/index.js CHANGED
@@ -297,18 +297,20 @@ async function create({ name, templates }) {
297
297
  }
298
298
  ]
299
299
  }));
300
+ const mfVersion = "0.0.0";
300
301
  await forgeTemplate({
301
302
  projectType,
302
303
  argv,
303
304
  templateParameters: {
304
- mfName
305
+ mfName,
306
+ mfVersion
305
307
  },
306
308
  distFolder
307
309
  });
308
310
  const nextSteps = [
309
311
  `cd ${targetDir}`,
310
312
  `${pkgManager} install`,
311
- `${pkgManager} run dev`
313
+ `${pkgManager} run ${'lib' === projectType ? 'mf-dev' : 'dev'}`
312
314
  ];
313
315
  (0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.note)(nextSteps.join('\n'), 'Next steps');
314
316
  (0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.outro)('Done.');
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Create a new Module Federation project",
4
4
  "public": true,
5
5
  "sideEffects": false,
6
- "version": "0.0.0-next-20250304120228",
6
+ "version": "0.0.0-next-20250305085339",
7
7
  "license": "MIT",
8
8
  "repository": {
9
9
  "type": "git",
@@ -1,5 +1,8 @@
1
- export default {
2
- name: '{{mfName}}',
1
+ import {createModuleFederationConfig} from '@module-federation/rsbuild-plugin';
2
+ import pkg from './package.json';
3
+
4
+ export default createModuleFederationConfig({
5
+ name: pkg.name,
3
6
  exposes: {
4
7
  '.': './src/index.tsx',
5
8
  },
@@ -11,4 +14,4 @@ export default {
11
14
  singleton: true,
12
15
  },
13
16
  },
14
- }
17
+ })
@@ -24,13 +24,13 @@
24
24
  "pre-commit": "npx lint-staged"
25
25
  },
26
26
  "dependencies": {
27
- "@modern-js/runtime": "2.63.7",
27
+ "@modern-js/runtime": "^2.65.1",
28
28
  "react": "^18.3.1",
29
29
  "react-dom": "^18.3.1"
30
30
  },
31
31
  "devDependencies": {
32
- "@modern-js/app-tools": "2.63.7",
33
- "@modern-js/tsconfig": "2.63.7",
32
+ "@modern-js/app-tools": "^2.65.1",
33
+ "@modern-js/tsconfig": "^2.65.1",
34
34
  "@biomejs/biome": "1.8.3",
35
35
  "typescript": "~5.0.4",
36
36
  "@types/jest": "~29.2.4",
@@ -24,13 +24,13 @@
24
24
  "pre-commit": "npx lint-staged"
25
25
  },
26
26
  "dependencies": {
27
- "@modern-js/runtime": "2.63.7",
27
+ "@modern-js/runtime": "^2.65.1",
28
28
  "react": "^18.3.1",
29
29
  "react-dom": "^18.3.1"
30
30
  },
31
31
  "devDependencies": {
32
- "@modern-js/app-tools": "2.63.7",
33
- "@modern-js/tsconfig": "2.63.7",
32
+ "@modern-js/app-tools": "^2.65.1",
33
+ "@modern-js/tsconfig": "^2.65.1",
34
34
  "@biomejs/biome": "1.8.3",
35
35
  "typescript": "~5.0.4",
36
36
  "@types/jest": "~29.2.4",
@@ -21,9 +21,9 @@
21
21
  "mf-dev": "rslib mf-dev"
22
22
  },
23
23
  "devDependencies": {
24
- "@rsbuild/core": "^1.2.0",
25
- "@rsbuild/plugin-react": "^1.1.0",
26
- "@rslib/core": "^0.3.1",
24
+ "@rsbuild/core": "^1.2.15",
25
+ "@rsbuild/plugin-react": "^1.1.1",
26
+ "@rslib/core": ">=0.5.3",
27
27
  "@storybook/addon-essentials": "^8.4.7",
28
28
  "@storybook/addon-interactions": "^8.4.7",
29
29
  "@storybook/addon-links": "^8.4.7",
@@ -39,7 +39,7 @@
39
39
  "storybook-addon-rslib": "^0.1.7",
40
40
  "storybook-react-rsbuild": "^0.1.7",
41
41
  "typescript": "^5.7.3",
42
- "@module-federation/rsbuild-plugin":"^0.8.9",
42
+ "@module-federation/rsbuild-plugin":"^{{mfVersion}}",
43
43
  "@module-federation/storybook-addon":"^4.0.1"
44
44
  },
45
45
  "peerDependencies": {
@@ -19,13 +19,13 @@
19
19
  "mf-dev": "rslib mf-dev"
20
20
  },
21
21
  "devDependencies": {
22
- "@rsbuild/core": "^1.2.0",
23
- "@rsbuild/plugin-react": "^1.1.0",
24
- "@rslib/core": "^0.3.1",
22
+ "@rsbuild/core": "^1.2.15",
23
+ "@rsbuild/plugin-react": "^1.1.1",
24
+ "@rslib/core": ">=0.5.3",
25
25
  "@types/react": "^18.3.11",
26
26
  "react": "^18.3.1",
27
27
  "typescript": "^5.7.3",
28
- "@module-federation/rsbuild-plugin":"^0.8.9",
28
+ "@module-federation/rsbuild-plugin":"^{{mfVersion}}"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "react": ">=16.9.0",
@@ -8,15 +8,15 @@
8
8
  "preview": "rsbuild preview"
9
9
  },
10
10
  "dependencies": {
11
- "react": "^19.0.0",
12
- "react-dom": "^19.0.0"
11
+ "react": "^18.3.1",
12
+ "react-dom": "^18.3.1"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^1.1.8",
16
- "@rsbuild/plugin-react": "^1.0.7",
17
- "@types/react": "^19.0.0",
18
- "@types/react-dom": "^19.0.0",
15
+ "@rsbuild/core": "^1.2.15",
16
+ "@rsbuild/plugin-react": "^1.1.1",
17
+ "@types/react": "^18.3.11",
18
+ "@types/react-dom": "~18.3.1",
19
19
  "typescript": "^5.7.2",
20
- "@module-federation/rsbuild-plugin":"^0.8.9"
20
+ "@module-federation/rsbuild-plugin":"^{{mfVersion}}"
21
21
  }
22
22
  }