mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-08 02:16:47 +08:00
37 lines
924 B
JavaScript
37 lines
924 B
JavaScript
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,
|
|
}
|
|
|
|
}
|
|
}
|
|
})
|
|
)
|