-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
27 lines (24 loc) · 969 Bytes
/
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
import tailwindcss from '@tailwindcss/vite';
import react from '@vitejs/plugin-react';
import path from 'path';
import { fileURLToPath } from 'url';
import { defineConfig } from 'vite';
// who ever chooses to updated the aliases please update in the order of the folder structure in the src folder
// this is to make it easier to find the aliases
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), tailwindcss()],
resolve: {
alias: {
'@assets': path.resolve(__dirname, 'src/assets'),
'@components': path.resolve(__dirname, 'src/components'),
'@data': path.resolve(__dirname, 'src/data'),
'@pages': path.resolve(__dirname, 'src/pages'),
'@store': path.resolve(__dirname, 'src/store'),
'@slices': path.resolve(__dirname, 'src/store/slices'),
'@': path.resolve(__dirname, 'src'),
},
},
});