-
Notifications
You must be signed in to change notification settings - Fork 585
/
Copy pathvite.config.ts
39 lines (38 loc) · 1.15 KB
/
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
39
import path from 'node:path'
import react from '@vitejs/plugin-react-swc'
import {defineConfig} from 'vite'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@/': `${path.resolve(__dirname, 'src')}/`,
},
},
build: {
rollupOptions: {
output: {
minifyInternalExports: true,
manualChunks: {
// remeda: ['remeda'],
// motion: ['framer-motion'],
// bignumber: ['bignumber.js'],
// other: ['react-helmet-async', 'react-error-boundary'],
// toaster: ['sonner'],
react: ['react', 'react-dom'],
i18n: ['i18next', 'react-i18next', 'i18next-browser-languagedetector', 'i18next-http-backend'],
fetch: ['@tanstack/react-query', '@trpc/react-query', '@trpc/client'],
css: ['tailwind-merge', 'clsx'],
reactRouter: ['react-router-dom'],
dev: ['@tanstack/react-query-devtools', 'react-json-tree'],
// sorter: ['match-sorter'],
// icons: ['react-icons', 'lucide-react'],
// qr: ['react-qr-code'],
// pin: ['rci'],
colorThief: ['colorthief'],
},
},
external: ['@radix-ui/react-label', '@radix-ui/react-radio-group'],
},
},
})