generated from christopher-caldwell/react-big-calendar-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
38 lines (35 loc) · 795 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
32
33
34
35
36
37
38
import reactRefresh from '@vitejs/plugin-react-refresh'
import Checker from 'vite-plugin-checker'
import { resolve } from 'path'
function pathResolve(dir: string) {
return resolve(__dirname, '.', dir)
}
// https://vitejs.dev/config/
const config = () => ({
envDir: pathResolve('env'),
esbuild: {
jsxFactory: '_jsx',
jsxFragment: '_jsxFragment',
jsxInject: `import { createElement as _jsx, Fragment as _jsxFragment } from 'react'`,
},
resolve: {
alias: [
{
find: /@\//,
replacement: pathResolve('src') + '/',
},
],
},
plugins: [
reactRefresh(),
Checker({
typescript: true,
overlay: false,
eslint: {
files: 'src',
extensions: ['.ts', '.tsx'],
},
}),
],
})
export default config