mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-24 18:23:00 +08:00
提交
This commit is contained in:
36
vite.config.js
Normal file
36
vite.config.js
Normal file
@@ -0,0 +1,36 @@
|
||||
import {defineConfig} from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import legacy from '@vitejs/plugin-legacy'
|
||||
import {viteMockServe} from 'vite-plugin-mock'
|
||||
|
||||
const path = require('path')
|
||||
|
||||
export default defineConfig(({command}) =>
|
||||
({
|
||||
plugins: [
|
||||
vue(),
|
||||
legacy({
|
||||
targets: ['chrome 52', 'defaults', 'not IE 11']
|
||||
}),
|
||||
viteMockServe({
|
||||
mockPath: './src/mock/mocks',
|
||||
injectCode: `
|
||||
console.log(111111111)
|
||||
`,
|
||||
})
|
||||
],
|
||||
resolve: {
|
||||
alias: [
|
||||
{find: '@', replacement: path.resolve(__dirname, 'src')}
|
||||
]
|
||||
}, server: {
|
||||
proxy: {
|
||||
'/file/upload': {
|
||||
target: 'http://111.231.196.214:30001',
|
||||
changeOrigin: true,
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
)
|
||||
Reference in New Issue
Block a user