mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-11 11:56:48 +08:00
接口初始化 第一版
This commit is contained in:
28
vite.config.js
Normal file
28
vite.config.js
Normal file
@@ -0,0 +1,28 @@
|
||||
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')}
|
||||
]
|
||||
}
|
||||
})
|
||||
)
|
||||
Reference in New Issue
Block a user