ChunDe's picture
fix: Prevent thumbnail drag from triggering upload mode and fix canvas corner radius
72660a6
raw
history blame
836 Bytes
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
server: {
port: 3000,
open: true
},
build: {
// Optimize chunks for better caching
rollupOptions: {
output: {
manualChunks: {
// Split vendor code
'react-vendor': ['react', 'react-dom'],
'konva-vendor': ['react-konva', 'konva'],
},
// Add content hash to filenames for better caching
assetFileNames: 'assets/[name]-[hash][extname]',
chunkFileNames: 'assets/[name]-[hash].js',
entryFileNames: 'assets/[name]-[hash].js',
}
},
// Increase chunk size warning limit
chunkSizeWarningLimit: 1000,
// Optimize assets
assetsInlineLimit: 4096, // Inline assets < 4kb as base64
}
})