完成 微前端拆分

This commit is contained in:
编码猿
2025-09-18 01:50:50 +08:00
parent 7bc20d517b
commit ca24ab9922
27 changed files with 59 additions and 384 deletions

View File

@@ -1 +1,10 @@
# 临时占位,上传空文件夹,保存文件结构用,后面删除
npm install
npm run build
npm run serve
构建与部署:
- 在构建生产环境时,先构建主模块,并将其产出(特别是 remoteEntry.js 和对应的资产文件)部署到服务器,并获取其 URL。
- 然后,在子模块的 vite.config.ts 中,将 remotes 的 URL 更新为生产环境主模块 remoteEntry.js 的绝对 URL。
- 最后再构建子模块。

View File

@@ -0,0 +1,3 @@
declare module 'mainApp/productService' {
export const product: any;
}