Skip to content

[BUG] Missing "main" and "module" entries in "package.json" #1000

@tsmock

Description

@tsmock

Describe the bug
Missing "main" and "module" entries in "package.json" causes nodejs (npm/yarnpkg) to not find the correct entries

Version of Package
v5.10.5

Regression from #984 . See https://github.com/ReactTooltip/react-tooltip/pull/984/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L21 .

"main" and "module" are still required for compatibility with other tools, such as nodejs. See https://rollupjs.org/introduction/#publishing-es-modules .

Additional context
I believe you want

  "main": "dist/react-tooltip.min.cjs",
  "module": "dist/react-tooltip.min.mjs",

(the original entries were

  "main": "dist/react-tooltip.cjs.min.js",
  "module": "dist/react-tooltip.esm.min.js",

)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions