-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.cjs
38 lines (36 loc) · 1.21 KB
/
vite.config.cjs
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
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
// https://vitejs.dev/config/
export default defineConfig({
// root: path.join(__dirname, "src"),
base: "./",
root: './',
build: {
outDir: path.join(__dirname, 'build')
},
resolve: {
alias: {
'@ROOT': path.resolve(__dirname),
'@': path.resolve(__dirname, 'src'),
'@assets': path.resolve(__dirname, 'src', 'assets'),
'@css': path.resolve(__dirname, 'src', 'assets', 'css'),
'@fonts': path.resolve(__dirname, 'src/assets/fonts'),
'@icons': path.resolve(__dirname, 'src', 'assets', 'icons'),
'@images': path.resolve(__dirname, 'src', 'assets', 'images'),
'@components': path.resolve(__dirname, 'src', 'components'),
'@contexts': path.resolve(__dirname, 'src', 'contexts'),
'@data': path.resolve(__dirname, 'src', 'data'),
'@layouts': path.resolve(__dirname, 'src', 'layouts'),
'@pages': path.resolve(__dirname, 'src', 'pages'),
'@plugins': path.resolve(__dirname, 'src', 'plugins'),
'@utils': path.resolve(__dirname, 'src', 'utils'),
},
},
plugins: [
react({
// Hot Reload
include: '**/*.jsx',
}),
],
});