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: use .mjs module exports #111

Closed angeloashmore closed 2 years ago

angeloashmore commented 2 years ago

Types of changes

Description

This PR updates the module exports to use .mjs rather than .js. This fixes an issue with Next.js 12 when deploying to Vercel (note that the problem only occurs in production). See #108 for more details.

.mjs originally was not used because it broken CRA 4. CRA 5 includes updates that resolves this issue (most likely the change to Webpack 5).

Related issues:

Checklist:

codecov-commenter commented 2 years ago

Codecov Report

Merging #111 (c485fc1) into master (a2f2c23) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #111   +/-   ##
=======================================
  Coverage   92.16%   92.16%           
=======================================
  Files          16       16           
  Lines         268      268           
  Branches       59       59           
=======================================
  Hits          247      247           
  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 a2f2c23...c485fc1. Read the comment docs.