forked from pwltr/tauthy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
31 lines (29 loc) · 878 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 { join } from 'path'
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
const PACKAGE_ROOT = __dirname
export default defineConfig({
root: PACKAGE_ROOT,
build: {
target: 'ESNext',
rollupOptions: {
output: {
entryFileNames: `assets/[name].js`,
chunkFileNames: `assets/[name].js`,
assetFileNames: `assets/[name].[ext]`,
},
},
},
resolve: {
alias: {
'@mui/styled-engine': '@mui/styled-engine-sc',
'~/': join(PACKAGE_ROOT, 'src') + '/',
'~/components/': join(PACKAGE_ROOT, 'src') + '/components/',
'~/hooks/': join(PACKAGE_ROOT, 'src') + '/hooks/',
'~/locales/': join(PACKAGE_ROOT, 'src') + '/locales/',
'~/styles/': join(PACKAGE_ROOT, 'src') + '/styles/',
'~/utils/': join(PACKAGE_ROOT, 'src') + '/utils/',
},
},
plugins: [react()],
})