Skip to content

Commit

Permalink
rollback chunk config
Browse files Browse the repository at this point in the history
  • Loading branch information
fxi committed Nov 25, 2024
1 parent 9f0e8fe commit 50e98b4
Showing 1 changed file with 1 addition and 44 deletions.
45 changes: 1 addition & 44 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,48 +15,5 @@ export default defineConfig({
tailwind({
applyBaseStyles: false,
}),
],
vite: {
build: {
chunkSizeWarningLimit: 800,
rollupOptions: {
output: {
manualChunks: (id) => {
// React core
if (id.includes('node_modules/react/') ||
id.includes('node_modules/react-dom/')) {
return 'vendor-react';
}

// Charting libraries
if (id.includes('node_modules/recharts/') ||
id.includes('node_modules/d3-')) {
return 'vendor-charts';
}

// UI Component libraries
if (id.includes('node_modules/@radix-ui/') ||
id.includes('node_modules/lucide-react/')) {
return 'vendor-ui';
}

// Data utilities
if (id.includes('/src/lib/utils/')) {
return 'data-utils';
}

// UI components
if (id.includes('/src/components/ui/')) {
return 'ui-components';
}

// Data components
if (id.includes('/src/components/data/') && !id.includes('DataExplorer')) {
return 'data-components';
}
}
}
}
}
}
]
});

0 comments on commit 50e98b4

Please sign in to comment.