-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
51 lines (48 loc) · 1014 Bytes
/
vite.config.ts
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
42
43
44
45
46
47
48
49
50
51
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import svgLoader from 'vite-svg-loader';
import viteCompression from 'vite-plugin-compression';
import path from 'path';
export default defineConfig(() => {
return {
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
assets: path.resolve(__dirname, 'src/assets/'),
},
},
css: {
preprocessorOptions: {
scss: {
api: 'modern-compiler',
additionalData: `
@use "@/assets/scss/vite/colors";
@use "@/assets/scss/vite/class";
@use "@/assets/scss/vite/vars";
@use "@/assets/scss/vite/zindex";
`,
},
},
},
plugins: [
vue(),
svgLoader({
svgoConfig: {
multipass: true,
js2svg: {
pretty: false,
indent: 0,
},
plugins: [
'sortAttrs',
'removeDimensions',
'removeTitle',
'removeMetadata',
'convertPathData',
],
},
}),
viteCompression({ algorithm: 'brotliCompress' }),
],
};
});