1
0
forked from noxious/client

Prod. env improvements

This commit is contained in:
2025-02-10 15:26:47 +01:00
parent 5d4de60f90
commit 31a91c3f9f
2 changed files with 27 additions and 4 deletions

View File

@ -7,8 +7,30 @@ import viteCompression from 'vite-plugin-compression';
export default defineConfig({
plugins: [
vue(),
viteCompression()
viteCompression({
algorithm: 'gzip',
ext: '.gz',
threshold: 10240 // Only compress files larger than 10KB
})
],
build: {
minify: 'terser', // Better minification
terserOptions: {
compress: {
drop_console: true, // Remove console.log in production
drop_debugger: true
}
},
rollupOptions: {
output: {
manualChunks: {
'vendor': ['vue'], // Split vendor chunks
// Add other large dependencies here
}
}
},
chunkSizeWarningLimit: 1000, // Increase chunk size warning limit if needed
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))