Glif-Lora-Autocaption / vite.config.js
saq1b's picture
refactor(vite.config.js): enhance build configuration with manual chunking and dependency optimization
aca7242
raw
history blame contribute delete
730 Bytes
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
server: {
port: 7860,
host: '0.0.0.0',
allowedHosts: ["saq1b-glif-lora-autocaption.hf.space"]
},
build: {
rollupOptions: {
output: {
manualChunks: {
'chakra': ['@chakra-ui/react', '@emotion/react', '@emotion/styled', 'framer-motion'],
'utils': ['jszip', 'file-saver', 'axios']
}
}
},
chunkSizeWarningLimit: 1000
},
optimizeDeps: {
include: ['@chakra-ui/react', '@emotion/react', '@emotion/styled', 'framer-motion']
}
});