29 lines
750 B
TypeScript
29 lines
750 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
clearScreen: false,
|
|
server: {
|
|
port: 1420,
|
|
strictPort: true,
|
|
},
|
|
envPrefix: ['VITE_', 'TAURI_'],
|
|
build: {
|
|
target: process.env.TAURI_PLATFORM == 'windows' ? 'chrome105' : 'safari13',
|
|
minify: !process.env.TAURI_DEBUG ? 'esbuild' : false,
|
|
sourcemap: !!process.env.TAURI_DEBUG,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
'react-vendor': ['react', 'react-dom'],
|
|
'chart-vendor': ['recharts'],
|
|
'motion-vendor': ['framer-motion'],
|
|
}
|
|
}
|
|
}
|
|
},
|
|
})
|