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 export #110

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).

.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 #110 (821fcbe) into master (a2f2c23) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #110   +/-   ##
=======================================
  Coverage   92.16%   92.16%           
=======================================
  Files          16       16           
  Lines         268      268           
  Branches       59       59           
=======================================
  Hits          247      247           
  Misses          5        5           
  Partials       16       16           
Impacted Files Coverage Δ
src/PrismicToolbar.tsx 93.75% <ø> (ø)
src/lib/pascalCase.ts 80.00% <100.00%> (ø)

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...821fcbe. Read the comment docs.

angeloashmore commented 2 years ago

Closed in favor of #111