33 lines
665 B
JavaScript
33 lines
665 B
JavaScript
import { fileURLToPath, URL } from 'node:url'
|
|
|
|
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
|
}
|
|
},
|
|
server: {
|
|
proxy: {
|
|
'/api/trophic': {
|
|
target: 'https://survey.femalesportshealth.cn',
|
|
changeOrigin: true,
|
|
secure: false
|
|
}
|
|
}
|
|
}
|
|
})
|
|
|
|
// export default defineConfig({
|
|
// plugins: [vue()],
|
|
// server: {
|
|
// port: 3000,
|
|
// host: '0.0.0.0', // 监听所有网络接口
|
|
// cors: true, // 启用跨域
|
|
// }
|
|
// })
|