diff --git a/vite.config.ts b/vite.config.ts index 81ff0535..615b93c5 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -18,13 +18,24 @@ export default defineConfig(({ mode }) => { return { build: { - chunkSizeWarningLimit: 900, outDir, rollupOptions: { input: { - main: resolve(__dirname, 'index.html'), + index: resolve(__dirname, 'index.html'), _scrivito_extensions: resolve(__dirname, '_scrivito_extensions.html'), }, + output: { + manualChunks: { + react: [ + 'react-bootstrap', + 'react-dropzone', + 'react-helmet-async', + 'react-toastify', + ], + scrivito: ['scrivito-neoletter-form-widgets'], + index: ['src/main.tsx', 'vite/modulepreload-polyfill'], + }, + }, }, }, define: {