You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
638 B
23 lines
638 B
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import qiankun from 'vite-plugin-qiankun'
|
|
import { resolve } from 'path'
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
qiankun('high-score-visualization', { // 子应用名称,与主应用注册时一致
|
|
useDevMode: true
|
|
})
|
|
],
|
|
server: {
|
|
port: 7101, // 指定子应用端口
|
|
cors: true,
|
|
origin: 'http://localhost:7101' // 确保端口与主应用配置一致
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve(__dirname, './src')
|
|
}
|
|
},
|
|
base: process.env.NODE_ENV === 'production' ? '/high-score-visualization/' : '/'
|
|
})
|
|
|