initHeader
This commit is contained in:
@@ -3,6 +3,9 @@ import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import path from 'path'
|
||||
|
||||
import AutoImport from 'unplugin-auto-import/vite'
|
||||
import Components from 'unplugin-vue-components/vite'
|
||||
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
||||
|
||||
export default defineConfig((config) => {
|
||||
return {
|
||||
@@ -13,6 +16,16 @@ export default defineConfig((config) => {
|
||||
iconDirs: [path.resolve(process.cwd(), 'src/assets/icons')],
|
||||
symbolId: 'icon-[dir]-[name]',
|
||||
}),
|
||||
AutoImport({
|
||||
resolvers: [ElementPlusResolver({
|
||||
importStyle: "sass",
|
||||
})]
|
||||
}),
|
||||
Components({
|
||||
resolvers: [ElementPlusResolver({
|
||||
importStyle: "sass",
|
||||
})]
|
||||
}),
|
||||
],
|
||||
// 基础配置
|
||||
base: './',
|
||||
@@ -30,6 +43,10 @@ export default defineConfig((config) => {
|
||||
},
|
||||
javascriptEnabled: true,
|
||||
},
|
||||
scss: {
|
||||
// 引入index.scss覆盖文件
|
||||
additionalData: `@use "@/theme/index.scss" as *;`,
|
||||
}
|
||||
},
|
||||
},
|
||||
build: {
|
||||
|
||||
Reference in New Issue
Block a user