This repository was archived by the owner on Dec 5, 2024. It is now read-only.
This repository was archived by the owner on Dec 5, 2024. It is now read-only.
Feature Request: Clarify package contents & allow for better tree shaking #127
Closed
Description
Hi guys, thanks for the great libraries (both react-popper and popper.js).
I ran into this issue today and couldn't figure out at first why it was happening until I realized that the package contents weren't quite what I expected. I was able to solve the issue, but am no longer able (as far as I can tell) to easily tree shake the components I'm not using.
My request/suggestion is twofold:
- Change the package folder structure to make it more clear what the contents are. The most common approach I've seen is to provide a
dist
folder containing the minified and unminified UMD builds, alib
orcjs
folder with the individual CJS components, and anes
folder with the original ES versions of the components. - For both the CJS and ES versions, provide the separate components instead of combining them into a single module so consumers can easily exclude unused code using something like
babel-plugin-transform-imports
.
I'm happy to submit a PR for this if this is something you're open to. Thanks for considering my request.