Closed angeloashmore closed 2 years ago
Merging #122 (1b16476) into master (27c502f) will not change coverage. The diff coverage is
n/a
.
@@ 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.
Path | Size |
---|---|
dist/index.mjs | 0 B (-100% 🔽) |
dist/index.cjs | 5.74 KB (0%) |
dist/index.js | 4.08 KB (+100% 🔺) |
Types of changes
Description
This PR removes the explicit ES Module declaration by removing
"type": "module"
frompackage.json
.Declaring the package as an ES Module has caused issues in the following circumstances:
.mjs
extension to resolve correctly during server-rendered requests. This causes issues in build systems that do not recognize.mjs
(e.g. Create React App). This only happens when deployed to Vercel in production. (See #108).mjs
files are unsupported. It works with a.js
file extension, which breaks Next.js support..mjs
with"type": "module"
is supported, but breaks backwards compatibility with CRA 4.The most straightforward solution that ensures everything works out-of-the-box is to remove
"type": "module"
frompackage.json
. When the ecosystem is more aligned behind ESM, we can restore it to a proper ES Module.Fixes #117
Checklist:
🙃