Next.js bundle size is exploding as a result of dynamic component lookup, how to solve?
问题 tldr: Check the repo - common.js includes all dependencies, even though, only one is used on the respective page. http://localhost:3000/components/ComponentOne http://localhost:3000/components/ComponentTwo Livedemo: click here More Details: I have an app (find attached a grossly simplified version) where based on a user input a different component is rendered. Finding the component to be rendered happens via a component-map. It makes sense that the common.js includes all dependencies for the