-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvite.config.ts
30 lines (29 loc) · 872 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
30
import react from '@vitejs/plugin-react';
import path from 'path';
import { defineConfig } from 'vite';
import svgr from 'vite-plugin-svgr';
export default defineConfig({
resolve: {
alias: {
'~': path.resolve(__dirname, './src'),
'@assets': path.resolve(__dirname, './src/assets'),
'@components': path.resolve(__dirname, './src/components'),
'@ui': path.resolve(__dirname, './src/components/ui'),
'@api': path.resolve(__dirname, './src/api'),
'@hooks': path.resolve(__dirname, './src/hooks'),
'@scripts': path.resolve(__dirname, './src/scripts'),
'@store': path.resolve(__dirname, './src/store'),
'@pages': path.resolve(__dirname, './src/pages'),
'@styles': path.resolve(__dirname, './src/styles'),
},
},
plugins: [react(), svgr({})],
server: {
port: 3000,
},
build: {
rollupOptions: {
external: [/^node:\w+/],
},
},
});