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 +4 -2
- package/package.json +1 -1
- package/templates/lib-common/module-federation.config.ts.handlebars +6 -3
- package/templates/modern-common/package.json +3 -3
- package/templates/modern-common/package.json.handlebars +3 -3
- package/templates/provider-rslib-storybook-ts/package.json.handlebars +4 -4
- package/templates/provider-rslib-ts/package.json.handlebars +4 -4
- package/templates/rsbuild-common/package.json.handlebars +7 -7
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
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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.
|
|
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.
|
|
33
|
-
"@modern-js/tsconfig": "2.
|
|
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.
|
|
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.
|
|
33
|
-
"@modern-js/tsconfig": "2.
|
|
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.
|
|
25
|
-
"@rsbuild/plugin-react": "^1.1.
|
|
26
|
-
"@rslib/core": "
|
|
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":"^
|
|
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.
|
|
23
|
-
"@rsbuild/plugin-react": "^1.1.
|
|
24
|
-
"@rslib/core": "
|
|
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":"^
|
|
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": "^
|
|
12
|
-
"react-dom": "^
|
|
11
|
+
"react": "^18.3.1",
|
|
12
|
+
"react-dom": "^18.3.1"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@rsbuild/core": "^1.
|
|
16
|
-
"@rsbuild/plugin-react": "^1.
|
|
17
|
-
"@types/react": "^
|
|
18
|
-
"@types/react-dom": "
|
|
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":"^
|
|
20
|
+
"@module-federation/rsbuild-plugin":"^{{mfVersion}}"
|
|
21
21
|
}
|
|
22
22
|
}
|