完成对app-shared 的拆分
This commit is contained in:
@@ -8,6 +8,11 @@ import federation from '@originjs/vite-plugin-federation';
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
server: {
|
||||
port: 1300,
|
||||
host: '0.0.0.0',
|
||||
strictPort: true,
|
||||
},
|
||||
plugins: [
|
||||
vue(),
|
||||
vueJsx(),
|
||||
@@ -15,11 +20,8 @@ export default defineConfig({
|
||||
federation({
|
||||
name: 'mainApp', // 主应用模块名(联邦模块需通过此名引用)
|
||||
remotes: { // 配置远程联邦模块地址(开发/生产需对应)
|
||||
product: 'http://localhost:5001/assets/remoteEntry.js',
|
||||
shared: 'http://localhost:5555/assets/remoteEntry.js'
|
||||
},
|
||||
exposes: {
|
||||
"./productService": "./src/app/di/productModule.ts",
|
||||
product: 'http://localhost:1301/assets/remoteEntry.js',
|
||||
shared: 'http://localhost:1333/assets/remoteEntry.js'
|
||||
},
|
||||
shared: {
|
||||
vue: { requiredVersion: '^3.5.18' },
|
||||
|
||||
Reference in New Issue
Block a user