Next.js Discord

Discord Forum

next js dev server includes all my monorepo package code in app router.

Unanswered
Najmus Sakib posted this in #help-forum
Open in Discord
Avatar
I have a web app running in next js. That is using ui and builder package from packages.

when i using a component from builder the page is including all of my component from ui and builder packages even I am not using them, so it is not correctly treeshaking.

I removed all my barrel files and tried still same. how to solve this?

This is the relevant issue created on 2020 and still not fixed?
https://github.com/vercel/next.js/issues/12557#issuecomment-1196931845

Nextjs version: 14.2.23
App router.

apps
-web
pacakges
- ui
- builder

my builder is using ui and web is using ui and builder both.

0 Replies