-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
26 lines (24 loc) · 950 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
import { defineConfig, loadEnv } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
// https://vitejs.dev/config/
export default ({ mode }) => {
process.env = { ...process.env, ...loadEnv(mode, process.cwd()) };
return defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'@components': path.resolve(__dirname, './src/components'),
'@config': path.resolve(__dirname, './src/config'),
'@constants': path.resolve(__dirname, './src/constants'),
'@interfaces': path.resolve(__dirname, './src/interfaces'),
'@sass': path.resolve(__dirname, './src/sass'),
'@screens': path.resolve(__dirname, './src/screens'),
'@utils': path.resolve(__dirname, './src/utils'),
'@hooks': path.resolve(__dirname, './src/hooks'),
'@appRedux': path.resolve(__dirname, './src/redux')
}
},
});
};