33 lines
702 B
TypeScript
33 lines
702 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react-swc'
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks(id) {
|
|
if (id.includes('supertokens-auth-react')) {
|
|
return 'auth-vendor'
|
|
}
|
|
if (id.includes('react-router-dom') || id.includes('@tanstack/react-query')) {
|
|
return 'app-vendor'
|
|
}
|
|
if (id.includes('lucide-react')) {
|
|
return 'icon-vendor'
|
|
}
|
|
return undefined
|
|
},
|
|
},
|
|
},
|
|
},
|
|
server: {
|
|
port: 4273,
|
|
},
|
|
preview: {
|
|
port: 4274,
|
|
},
|
|
test: {
|
|
environment: 'jsdom',
|
|
},
|
|
})
|