Files
homepage/vite.config.ts
Alexander Bocken 8af2fc3f3b
All checks were successful
CI / update (push) Successful in 1m22s
build: keep console.error/warn/info in production builds
Changed drop_console from true to ['log', 'debug'] to retain
error and warning logs for debugging while reducing bundle size.
2026-01-20 12:16:14 +01:00

34 lines
650 B
TypeScript

import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
export default defineConfig({
server: {
allowedHosts: ["bocken.org"]
},
plugins: [sveltekit()],
build: {
minify: 'terser',
terserOptions: {
compress: {
drop_console: ['log', 'debug'],
drop_debugger: true
}
},
rollupOptions: {
output: {
manualChunks: (id) => {
// Separate large dependencies into their own chunks
if (id.includes('node_modules')) {
if (id.includes('chart.js')) {
return 'chart';
}
if (id.includes('@auth/sveltekit')) {
return 'auth';
}
}
}
}
}
}
});