-
Notifications
You must be signed in to change notification settings - Fork 5
/
vite.config.ts
55 lines (53 loc) · 1.92 KB
/
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
52
53
54
55
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from 'path'
import sassDts from 'vite-plugin-sass-dts'
// https://vitejs.dev/config/
export default defineConfig({
css: {
preprocessorOptions: {
scss: {
additionalData: `@use "@/stylesheets" as common;`,
importer(...args) {
if (args[0] !== '@/stylesheets') {
return
}
return {
file: `${path.resolve(
__dirname,
'./src/assets/stylesheets'
)}`,
}
},
},
},
},
plugins: [
react(),
// sassDts({
// allGenerate: false,
// global: {
// generate: false,
// outFile: path.resolve(__dirname, "./style.d.ts"),
// },
// }),
],
resolve: {
alias: {
'@views': path.resolve(__dirname, 'src/views'),
'@components': path.resolve(__dirname, 'src/components'),
'@layouts': path.resolve(__dirname, 'src/layouts'),
'@enums': path.resolve(__dirname, 'src/enums'),
'@interfaces': path.resolve(__dirname, 'src/interfaces'),
'@services': path.resolve(__dirname, 'src/services'),
'@types': path.resolve(__dirname, 'src/types'),
'@helpers': path.resolve(__dirname, 'src/helpers'),
'@store': path.resolve(__dirname, 'src/store'),
'@redux-slices': path.resolve(__dirname, 'src/redux-slices'),
'@config': path.resolve(__dirname, 'src/config'),
'@assets': path.resolve(__dirname, 'src/assets'),
'@common': path.resolve(__dirname,'src/assets/stylesheets/_index.scss'),
'@locales': path.resolve(__dirname,'src/locales')
},
},
})