-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
46 lines (44 loc) · 1.37 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import checker from 'vite-plugin-checker';
import path from 'path';
export default defineConfig({
base: '/',
publicDir: 'public',
logLevel: 'warn',
plugins: [
react({ include: '**/*.tsx' }),
checker({
typescript: true,
eslint: {
// for example, lint .ts and .tsx
lintCommand: 'eslint "./src/**/*.{ts,tsx}"',
},
}),
],
preview: {
port: 3000,
},
server: {
port: 3000,
},
resolve: {
alias: {
'@app': path.resolve(__dirname, './src/app'),
'@pages': path.resolve(__dirname, './src/pages'),
'@pages/*': path.resolve(__dirname, './src/pages'),
'@widgets': path.resolve(__dirname, './src/widgets'),
'@widgets/*': path.resolve(__dirname, './src/widgets'),
'@hooks': path.resolve(__dirname, './src/shared/lib/hooks'),
'@features': path.resolve(__dirname, './src/features'),
'@entities': path.resolve(__dirname, './src/entities'),
'@shared/assets': path.resolve(__dirname, './src/shared/ui/assets'),
'@shared/constants': path.resolve(
__dirname,
'./src/shared/lib/constants'
),
'@shared/helpers': path.resolve(__dirname, './src/shared/lib/helpers'),
'@shared': path.resolve(__dirname, './src/shared'),
},
},
});