30 lines
589 B
TypeScript
30 lines
589 B
TypeScript
|
import { fileURLToPath, URL } from 'node:url'
|
||
|
|
||
|
import { defineConfig } from 'vite'
|
||
|
import { viteMockServe } from 'vite-plugin-mock'
|
||
|
import vue from '@vitejs/plugin-vue'
|
||
|
|
||
|
// https://vitejs.dev/config/
|
||
|
export default defineConfig({
|
||
|
plugins: [
|
||
|
vue(),
|
||
|
viteMockServe({
|
||
|
mockPath: 'mock',
|
||
|
enable: true
|
||
|
})
|
||
|
],
|
||
|
resolve: {
|
||
|
alias: {
|
||
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||
|
}
|
||
|
},
|
||
|
css: {
|
||
|
preprocessorOptions: {
|
||
|
scss: {
|
||
|
javascriptEnabled: true,
|
||
|
additionalData: '@import "@/style/variable.scss";'
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
})
|