mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-06-03 14:50:21 +08:00
优化 Vite 配置,移除不再使用的代理规则,更新多个组件以增强远程组件加载逻辑,添加错误处理和加载状态显示,提升用户体验。
This commit is contained in:
@@ -6,14 +6,15 @@ export default defineConfig({
|
||||
plugins: [
|
||||
vue(),
|
||||
federation({
|
||||
name: 'my_plugin',
|
||||
name: 'LogsClean',
|
||||
filename: 'remoteEntry.js',
|
||||
exposes: {
|
||||
'./Page': './src/components/Page.vue',
|
||||
'./Config': './src/components/Config.vue',
|
||||
'./Dashboard': './src/components/Dashboard.vue',
|
||||
},
|
||||
shared: ['vue', 'vuetify']
|
||||
shared: ['vue', 'vuetify'],
|
||||
format: 'esm'
|
||||
})
|
||||
],
|
||||
build: {
|
||||
@@ -25,5 +26,10 @@ export default defineConfig({
|
||||
port: 5001, // 使用不同于主应用的端口
|
||||
cors: true, // 启用CORS
|
||||
origin: 'http://localhost:5001'
|
||||
},
|
||||
preview: {
|
||||
port: 5001, // 保持与server相同的端口
|
||||
cors: true, // 启用CORS
|
||||
origin: 'http://localhost:5001'
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user