still-silicon-valley-sdy/vite.config.ts

30 lines
589 B
TypeScript
Raw Normal View History

2024-06-12 14:58:17 +08:00
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";'
}
}
}
})