Skip to content
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
@ericgio

Description

@ericgio

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:

  1. 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, a lib or cjs folder with the individual CJS components, and an es folder with the original ES versions of the components.
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions