Hi everyone! My apologies if this isn't the right channel, it's my first post here.
I’m working with Nuxt 3 and I’m struggling to split some large vendor chunks. Despite using manualChunks, my vendor-others is still 1.1MB and vendor-export is 1.3MB.
Here is my current configuration in nuxt.config.ts:
TypeScript
export default defineNuxtConfig({
vite: {
build: {
rollupOptions: {
output: {
manualChunks(id) {
if (id.includes('node_modules')) {
if (id.includes('primevue')) return 'vendor-primevue';
if (id.includes('apexcharts')) return 'vendor-charts';
if (id.includes('exceljs') || id.includes('jspdf')) return 'vendor-export';
return 'vendor-others';
}
}
}
}
}
}
})
Even with this, the chunks remain huge. Does anyone have any Nuxt-specific advice on how to further split these or handle heavy libraries like exceljs more efficiently?
Thank you so much for your help!