-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
29 lines (27 loc) · 873 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
import react from '@vitejs/plugin-react-swc'
import dotenv from "dotenv"
import path from 'path'
import { defineConfig, loadEnv } from 'vite'
dotenv.config()
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '')
return {
define: {
'process.env': JSON.stringify(env),
},
plugins: [react()],
base: "./",
resolve: {
alias: {
'pages': path.resolve(__dirname, 'src/pages'),
'components': path.resolve(__dirname, 'src/components'),
'assets': path.resolve(__dirname, 'src/assets'),
'images': path.resolve(__dirname, 'src/images'),
'styles': path.resolve(__dirname, 'src/styles'),
'store': path.resolve(__dirname, 'src/store'),
'types': path.resolve(__dirname, 'src/types'),
'utils': path.resolve(__dirname, 'src/utils'),
},
},
}
})