Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use .mjs module export #110

Closed
wants to merge 4 commits into from
Closed

Conversation

angeloashmore
Copy link
Member

@angeloashmore angeloashmore commented Jan 14, 2022

Types of changes

  • Chore (a non-breaking change which is related to package maintenance)
  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

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:

  • My change requires an update to the official documentation.
  • All TSDoc comments are up-to-date and new ones have been added where necessary.
  • All new and existing tests are passing.

馃

This is done to (hopefully) solve a problem on Vercel production deploys
where `React.createContext` is `undefined`.
@codecov-commenter
Copy link

codecov-commenter commented Jan 14, 2022

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
Copy link
Member Author

Closed in favor of #111

@angeloashmore angeloashmore deleted the aa/fix-react-imports branch January 14, 2022 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants