Add production build optimizations to Vite configuration; set target, output directory, and minification options for improved performance
This commit is contained in:
@@ -17,6 +17,31 @@ export default defineConfig({
|
||||
changeOrigin: true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
build: {
|
||||
// Produktions-Build-Optimierungen
|
||||
target: 'es2015',
|
||||
outDir: 'dist',
|
||||
assetsDir: 'assets',
|
||||
sourcemap: false,
|
||||
minify: 'terser',
|
||||
terserOptions: {
|
||||
compress: {
|
||||
drop_console: true, // Console-Logs in Produktion entfernen
|
||||
drop_debugger: true
|
||||
}
|
||||
},
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: {
|
||||
// Code-Splitting für bessere Performance
|
||||
'vue-vendor': ['vue', 'vue-router', 'pinia']
|
||||
}
|
||||
}
|
||||
},
|
||||
chunkSizeWarningLimit: 1000
|
||||
},
|
||||
// Base-URL für Produktion
|
||||
base: '/'
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user