How to correctly use manualChunks in nuxt.config.ts (nuxt 3.15.4)

  vite: {
    build: {
      rollupOptions: {
        output: {
          manualChunks: (id: string) => {
            console.log('manualChunks function called with id:', id)
            
            if (id.includes('@sentry/nuxt')) {
              return 'sentry'
            }

            return undefined
          },
        },
      },
    },
  },


never seen a console output, nor a chunk named sentry when running npm run build
Was this page helpful?