完成对app-shared 的拆分

This commit is contained in:
编码猿
2025-09-18 04:12:50 +08:00
parent 327e80d71e
commit cc23a6e1f0
12 changed files with 43 additions and 39 deletions

View File

@@ -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' },