完成对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

@@ -6,12 +6,16 @@ import federation from '@originjs/vite-plugin-federation';
import {fileURLToPath, URL} from "node:url";
export default defineConfig({
server: {
port: 1301,
host: '0.0.0.0',
strictPort: true,
},
plugins: [
federation({
name: 'product',
remotes: {
mainApp: "http://localhost:5000/assets/remoteEntry.js",
shared: 'http://localhost:5555/assets/remoteEntry.js'
shared: 'http://localhost:1333/assets/remoteEntry.js'
},
exposes: { // 暴露给主应用的资源(按功能分组)
'./ProductDomain': './src/domains/product/index.ts', // 领域层(实体、服务、接口等)