-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
33 lines (31 loc) · 1.02 KB
/
vite.config.js
File metadata and controls
33 lines (31 loc) · 1.02 KB
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
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
import eslint from 'vite-plugin-eslint';
import path from 'path';
import url from 'url';
const __filename = url.fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
eslint({
cache: false,
include: ['./src/**/*.js', './src/**/*.jsx'],
exclude: [],
}),
],
resolve: {
alias: {
'@': path.resolve(__dirname, './src/'),
components: `${path.resolve(__dirname, './src/components/')}`,
pages: path.resolve(__dirname, './src/pages'),
public: `${path.resolve(__dirname, './public/')}`,
services: `${path.resolve(__dirname, './src/services/')}`,
stores: `${path.resolve(__dirname, './src/stores/')}`,
utils: `${path.resolve(__dirname, './src/utils')}`,
hooks: `${path.resolve(__dirname, './src/hooks')}`,
types: `${path.resolve(__dirname, './src/@types')}`,
},
},
});