-
Notifications
You must be signed in to change notification settings - Fork 16
/
vite.config.ts
31 lines (30 loc) · 873 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
31
import { defineConfig, splitVendorChunkPlugin } from 'vite';
import react from '@vitejs/plugin-react';
import { resolve } from 'path';
import AutoImport from 'unplugin-auto-import/vite';
// https://vitejs.dev/config/
/** @type {import('vite').UserConfig} */
export default defineConfig({
server: {
port: 3000
},
resolve: {
alias: {
'@': resolve(__dirname, './src')
}
},
plugins: [
react(),
splitVendorChunkPlugin(),
AutoImport({
imports: ['react'],
dts: 'src/auto-imports.d.ts',
dirs: ['src/hooks', 'src/store/reducer'],
eslintrc: {
enabled: true, // Default `false`
filepath: './.eslintrc-auto-import.json', // Default `./.eslintrc-auto-import.json`
globalsPropValue: true // Default `true`, (true | false | 'readonly' | 'readable' | 'writable' | 'writeable')
}
})
]
});