Implementierung - SEO - 01.08.2025
This commit is contained in:
+23
-3
@@ -104,12 +104,32 @@ export default defineConfig({
|
||||
},
|
||||
build: {
|
||||
sourcemap: true,
|
||||
cssCodeSplit: true,
|
||||
minify: 'terser',
|
||||
terserOptions: {
|
||||
compress: {
|
||||
drop_console: true,
|
||||
drop_debugger: true
|
||||
}
|
||||
},
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: {
|
||||
'react-vendor': ['react', 'react-dom'],
|
||||
'mdx-vendor': ['@mdx-js/react']
|
||||
}
|
||||
'react-vendor': ['react', 'react-dom', 'react-router-dom'],
|
||||
'mdx-vendor': ['@mdx-js/react'],
|
||||
'i18n-vendor': ['i18next', 'react-i18next'],
|
||||
'ui-vendor': ['framer-motion', 'lucide-react']
|
||||
},
|
||||
// Optimierte Asset-Dateinamen
|
||||
assetFileNames: (assetInfo) => {
|
||||
let extType = assetInfo.name.split('.').at(-1);
|
||||
if (/webp|png|jpe?g|svg|gif|tiff|bmp|ico/i.test(extType)) {
|
||||
extType = 'img';
|
||||
}
|
||||
return `assets/${extType}/[name]-[hash][extname]`;
|
||||
},
|
||||
chunkFileNames: 'assets/js/[name]-[hash].js',
|
||||
entryFileNames: 'assets/js/[name]-[hash].js',
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user