优化 Vite 配置,移除不再使用的代理规则,更新多个组件以增强远程组件加载逻辑,添加错误处理和加载状态显示,提升用户体验。

This commit is contained in:
jxxghp
2025-05-06 21:34:49 +08:00
parent 05cc160311
commit 703204c69a
7 changed files with 214 additions and 447 deletions

View File

@@ -181,24 +181,6 @@ const props = defineProps({
npm run build
```
### 输出文件
构建后会在`dist`目录生成以下核心文件:
- `remoteEntry.js` - 模块联邦入口文件
- `Page.js` - 详情页面组件
- `Config.js` - 配置页面组件
- `Dashboard.js` - 仪表板组件
### 部署要求
这些文件需要部署到后端并通过以下URL可访问
- `/api/v1/plugin/file/{插件ID}/dist/remoteEntry.js`
- `/api/v1/plugin/file/{插件ID}/dist/Page.js`
- `/api/v1/plugin/file/{插件ID}/dist/Config.js`
- `/api/v1/plugin/file/{插件ID}/dist/Dashboard.js`
## 7. 后端API要求
### 7.1 注册远程组件API