-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
35 lines (29 loc) · 1.04 KB
/
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
28
29
30
31
32
33
34
35
// ./vite.config.js
//
// Global Vite configuration file.
// See // https://vitejs.dev/config/ for more information.
// Node native module imports.
import path from "node:path";
// Vite essential and plugin imports.
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
// -----------------------------------------------------------------------------
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
// Source directory alias.
"@src": path.resolve(__dirname, "./src"),
// Static asset directory alias.
"@assets": path.resolve(__dirname, "./src/assets"),
// Pages and routing alias.
"@pages": path.resolve(__dirname, "./src/pages"),
// Other directories alias.
"@hooks": path.resolve(__dirname, "./src/hooks"),
"@contexts": path.resolve(__dirname, "./src/contexts"),
"@components": path.resolve(__dirname, "./src/components"),
"@lib": path.resolve(__dirname, "./src/lib"),
"@utils": path.resolve(__dirname, "./src/utils"),
},
},
});