prismicio / prismic-react

React components and hooks to fetch and present Prismic content
https://prismic.io/docs/technologies/homepage-reactjs
Apache License 2.0
154 stars 40 forks source link

fix: remove ESM `package.json` declaration (fixes `'Element' is not exported from '@prismicio/richtext'`) #122

Closed angeloashmore closed 2 years ago

angeloashmore commented 2 years ago

Types of changes

Description

This PR removes the explicit ES Module declaration by removing "type": "module" from package.json.

Declaring the package as an ES Module has caused issues in the following circumstances:

The most straightforward solution that ensures everything works out-of-the-box is to remove "type": "module" from package.json. When the ecosystem is more aligned behind ESM, we can restore it to a proper ES Module.

Fixes #117

Checklist:

🙃

codecov-commenter commented 2 years ago

Codecov Report

Merging #122 (1b16476) into master (27c502f) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #122   +/-   ##
=======================================
  Coverage   92.25%   92.25%           
=======================================
  Files          16       16           
  Lines         271      271           
  Branches       60       60           
=======================================
  Hits          250      250           
  Misses          5        5           
  Partials       16       16           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 27c502f...1b16476. Read the comment docs.

github-actions[bot] commented 2 years ago

size-limit report 📦

Path Size
dist/index.mjs 0 B (-100% 🔽)
dist/index.cjs 5.74 KB (0%)
dist/index.js 4.08 KB (+100% 🔺)