mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-06 09:26:46 +08:00
67 lines
2.2 KiB
JavaScript
67 lines
2.2 KiB
JavaScript
/*
|
|
* @Author: lixg lixg@dongwu-inc.com
|
|
* @Date: 2022-11-21 17:28:10
|
|
* @LastEditors: lixg lixg@dongwu-inc.com
|
|
* @LastEditTime: 2022-11-22 12:45:57
|
|
* @FilePath: /fe-stu/vite.config.js
|
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
*/
|
|
import {defineConfig} from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import legacy from '@vitejs/plugin-legacy'
|
|
import {viteMockServe} from 'vite-plugin-mock'
|
|
import topLevelAwait from "vite-plugin-top-level-await";
|
|
|
|
const path = require('path')
|
|
|
|
export default defineConfig(({command}) =>
|
|
({
|
|
base: '/fe-student',
|
|
plugins: [
|
|
vue(),
|
|
// legacy({
|
|
// targets: ['chrome 64', 'defaults', 'not IE 11']
|
|
// }),
|
|
topLevelAwait({
|
|
promiseExportName: '__tla',
|
|
promiseImportName: i => `__tla_${i}`
|
|
}),
|
|
// viteMockServe({
|
|
// mockPath: './src/mock/mocks',
|
|
// })
|
|
],
|
|
resolve: {
|
|
alias: [
|
|
{find: '@', replacement: path.resolve(__dirname, 'src')}
|
|
]
|
|
}, server: {
|
|
proxy: {
|
|
'/file/upload': {
|
|
target: 'http://111.231.196.214:30001',
|
|
changeOrigin: true,
|
|
},
|
|
'/stu': {
|
|
target: 'http://111.231.196.214:12013/manageApi',
|
|
changeOrigin: true,
|
|
},
|
|
'/queryVoteSubmitDetailById': {
|
|
target: 'http://111.231.196.214:12013/manageApi',
|
|
changeOrigin: true,
|
|
},
|
|
'/work': {
|
|
target: 'http://111.231.196.214:12013/manageApi',
|
|
changeOrigin: true,
|
|
},
|
|
'/discuss': {
|
|
target: 'http://111.231.196.214:12013/manageApi',
|
|
changeOrigin: true,
|
|
},
|
|
'/discussSubmit': {
|
|
target: 'http://111.231.196.214:12013/manageApi',
|
|
changeOrigin: true,
|
|
},
|
|
}
|
|
}
|
|
})
|
|
)
|