Open jimzer opened 2 years ago
Your question is very similar to https://github.com/kentcdodds/mdx-bundler/issues/165 , you should check it.
I've actually noticed that I have a similar experience with local components – unused ones aren't eliminated from the resulting bundle
First of all, thank you for this awesome bundler!
mdx-bundler
version: v8.0.1node
version: v14.18.1yarn
version: v1.22.17Relevant code or config
I use Next JS, here is my bundler configuration
What you did:
I import a library of components into my MDX page like so:
What happened:
The whole
@components/core
library is bundled into my web page.Problem description:
I expected that tree shaking would eliminate all the unused exported components. Is it normal that it did not work? Maybe it's not possible to get the MDX content tree shaked?