create-module-federation 0.0.0-next-20250305092648 → 0.0.0-next-20250305095557
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/package.json
CHANGED
|
@@ -2,6 +2,7 @@ import { pluginReact } from '@rsbuild/plugin-react';
|
|
|
2
2
|
import { defineConfig } from '@rslib/core';
|
|
3
3
|
import { pluginModuleFederation } from '@module-federation/rsbuild-plugin';
|
|
4
4
|
import moduleFederationConfig from './module-federation.config';
|
|
5
|
+
import pkg from './package.json';
|
|
5
6
|
|
|
6
7
|
const shared = {
|
|
7
8
|
dts: {
|
|
@@ -33,6 +34,11 @@ export default defineConfig({
|
|
|
33
34
|
...shared,
|
|
34
35
|
format: 'mf',
|
|
35
36
|
output: {
|
|
37
|
+
// set unpkg cdn as assetPrefix if you want to publish
|
|
38
|
+
assetPrefix:
|
|
39
|
+
process.env.NODE_ENV === 'production'
|
|
40
|
+
? `https://unpkg.com/${pkg.name}@latest/dist/mf/`
|
|
41
|
+
: undefined,
|
|
36
42
|
distPath: {
|
|
37
43
|
root: './dist/mf',
|
|
38
44
|
},
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "new-provider",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"scripts": {
|
|
5
|
-
"reset": "npx rimraf node_modules ./**/node_modules",
|
|
6
|
-
"dev": "modern dev",
|
|
7
|
-
"build": "modern build",
|
|
8
|
-
"start": "modern start",
|
|
9
|
-
"serve": "modern serve",
|
|
10
|
-
"new": "modern new",
|
|
11
|
-
"lint": "biome check",
|
|
12
|
-
"prepare": "simple-git-hooks",
|
|
13
|
-
"upgrade": "modern upgrade"
|
|
14
|
-
},
|
|
15
|
-
"engines": {
|
|
16
|
-
"node": ">=16.18.1"
|
|
17
|
-
},
|
|
18
|
-
"lint-staged": {
|
|
19
|
-
"*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [
|
|
20
|
-
"biome check --files-ignore-unknown=true"
|
|
21
|
-
]
|
|
22
|
-
},
|
|
23
|
-
"simple-git-hooks": {
|
|
24
|
-
"pre-commit": "npx lint-staged"
|
|
25
|
-
},
|
|
26
|
-
"dependencies": {
|
|
27
|
-
"@modern-js/runtime": "^2.65.1",
|
|
28
|
-
"react": "^18.3.1",
|
|
29
|
-
"react-dom": "^18.3.1"
|
|
30
|
-
},
|
|
31
|
-
"devDependencies": {
|
|
32
|
-
"@modern-js/app-tools": "^2.65.1",
|
|
33
|
-
"@modern-js/tsconfig": "^2.65.1",
|
|
34
|
-
"@biomejs/biome": "1.8.3",
|
|
35
|
-
"typescript": "~5.0.4",
|
|
36
|
-
"@types/jest": "~29.2.4",
|
|
37
|
-
"@types/node": "~18.11.9",
|
|
38
|
-
"@types/react": "^18.3.11",
|
|
39
|
-
"@types/react-dom": "~18.3.1",
|
|
40
|
-
"lint-staged": "~13.1.0",
|
|
41
|
-
"simple-git-hooks": "^2.11.1",
|
|
42
|
-
"rimraf": "^6.0.1",
|
|
43
|
-
"@module-federation/modern-js": "^0.8.9"
|
|
44
|
-
}
|
|
45
|
-
}
|