-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
41 lines (40 loc) · 1013 Bytes
/
vite.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
import ElementPlus from 'unplugin-element-plus/vite'
import VitePluginCompression from 'vite-plugin-compression'
// https://vitejs.dev/config/
export default defineConfig({
// 构建配置
build: {
rollupOptions: {
input: {
index: path.resolve(__dirname, 'index.html'),
blog: path.resolve(__dirname, 'blog.html'),
classification: path.resolve(__dirname, 'classification.html'),
auth: path.resolve(__dirname, 'auth.html')
}
}
},
// 共享配置
base: './',
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
'c': path.resolve(__dirname, 'src/components'),
'core': path.resolve(__dirname, 'src/core')
}
},
plugins: [
vue(),
ElementPlus(),
VitePluginCompression()
],
css: {
preprocessorOptions: {
scss: {
additionalData: `@import "@/assets/css/variables.scss";`
}
}
},
})