forked from TomokiMiyauci/vite-preact
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
25 lines (23 loc) · 845 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
import preactRefresh from '@prefresh/vite';
import { resolve } from 'path';
import type { UserConfig } from 'vite';
const config: UserConfig = {
esbuild: {
jsxFactory: 'h',
jsxFragment: 'Fragment',
},
plugins: [preactRefresh()],
resolve: {
alias: [
{ find: '@Screens', replacement: resolve('./src/Screens/') },
{ find: '@Components', replacement: resolve('./src/Components/') },
{ find: '@Types', replacement: resolve('./src/Types/') },
{ find: '@Hooks', replacement: resolve('./src/Hooks/') },
{ find: '@Contexts', replacement: resolve('./src/Contexts/') },
{ find: '@Styles', replacement: resolve('./src/Styles/') },
{ find: '@Assets', replacement: resolve('./src/Assets/') },
{ find: '@Utils', replacement: resolve('./src/Utils/') },
],
},
};
export default config;