cyber/vite.config.js

37 lines
669 B
JavaScript
Raw Normal View History

2025-02-14 23:14:54 +08:00
import { defineConfig } from 'vite'
2025-02-14 23:14:54 +08:00
import vue from '@vitejs/plugin-vue'
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
2025-02-14 23:14:54 +08:00
export default defineConfig({
css: {
preprocessorOptions: {
scss: {
additionalData: `@import "./src/assets/styles/element/index.scss";` // 你的全局 SCSS 文件路径
}
}
},
plugins: [
vue(),
AutoImport({
resolvers: [ElementPlusResolver()],
}),
Components({
resolvers: [ElementPlusResolver()],
}),
],
})