-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
33 lines (31 loc) · 1 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
import path from 'path'
import {defineConfig} from 'vite'
import reactRefresh from '@vitejs/plugin-react-refresh'
import EnvironmentPlugin from "vite-plugin-environment"
import createSvgSpritePlugin from 'vite-plugin-svg-sprite'
export default defineConfig({
plugins: [
reactRefresh(),
EnvironmentPlugin('all', {prefix: ''}),
createSvgSpritePlugin({
symbolId: '[name]_[hash]',
}),
],
resolve: {
alias: {
'components': path.resolve(__dirname, './src/app/components'),
'pages': path.resolve(__dirname, './src/app/pages'),
'state': path.resolve(__dirname, './src/state'),
'assets': path.resolve(__dirname, './src/assets'),
'lib': path.resolve(__dirname, './src/lib'),
'styles': path.resolve(__dirname, './src/styles')
},
},
css: {
preprocessorOptions: {
scss: {
rootpath: 'http://localhost:3000/src/assets/',
}
}
}
})