You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey folks, quick question: I have an external component library that I'm including in my NextJS app as dependency. For some reason, it is not being properly tree-shaken. In the component lib, I have an esm module bundle ( pointed to the module field in pkgjson) and a cjs bundle (pointed to the main field in pkgjson). Anytime a component is included in a bundle in the NextJS app, it brings along all other unused components. Does anyone have an idea as to what the issue may be? Do I need to tell webpack to specifically use the module field for this package (per #9323) ?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey folks, quick question: I have an external component library that I'm including in my NextJS app as dependency. For some reason, it is not being properly tree-shaken. In the component lib, I have an esm module bundle ( pointed to the
module
field in pkgjson) and a cjs bundle (pointed to themain
field in pkgjson). Anytime a component is included in a bundle in the NextJS app, it brings along all other unused components. Does anyone have an idea as to what the issue may be? Do I need to tell webpack to specifically use themodule
field for this package (per #9323) ?Beta Was this translation helpful? Give feedback.
All reactions