-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
45 lines (42 loc) · 1.7 KB
/
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
42
43
44
import { fileURLToPath, URL } from 'node:url';
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import svgLoader from 'vite-svg-loader';
// https://vitejs.dev/config/
export default defineConfig( {
plugins: [ vue(), svgLoader( {
svgo: false
} ) ],
server: {
port: 8080,
},
preview: {
port: 8081
},
resolve: {
alias: {
'@': fileURLToPath( new URL( './src', import.meta.url ) ),
'@nodeModules': fileURLToPath( new URL( './node_modules', import.meta.url ) ),
'@assets': fileURLToPath( new URL( './src/assets', import.meta.url ) ),
'@components': fileURLToPath( new URL( './src/components', import.meta.url ) ),
'@layouts': fileURLToPath( new URL( './src/layouts', import.meta.url ) ),
'@helpers': fileURLToPath( new URL( './src/helpers', import.meta.url ) ),
'@routes': fileURLToPath( new URL( './src/routes', import.meta.url ) ),
'@scss': fileURLToPath( new URL( './src/scss', import.meta.url ) ),
'@views': fileURLToPath( new URL( './src/views', import.meta.url ) ),
'@utils': fileURLToPath( new URL( './src/utils', import.meta.url ) ),
'@themeColors': fileURLToPath( new URL( './src/scss/theme/_colors.scss', import.meta.url ) ),
'@themeMixins': fileURLToPath( new URL( './src/scss/mixins/_index.scss', import.meta.url ) ),
}
},
css: {
preprocessorOptions: {
scss: {
additionalData: `
@import '@scss/theme/_colors.scss';
@import '@scss/mixins/_index.scss';
`
}
}
}
} );