Closed aheissenberger closed 3 years ago
Latest commit: 8d18bf2649dac10708969d2c3a596ffde2b728b1
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Hiya - sorry for the delay on this PR, ~I'm actually thinking we might be better off detecting this and warning, rather than relying on docs~ ... I'm silly, and you already did this. Cheers!
@developit There is no changeset generated for this PR.
Hmm.. Can't wait this change to be published... :bow:
This is published.
The old implementation will not allow to use a filename with the extension ".cjs" in the "main" field and does not create a Common JS file with a ".cjs" ending.
If a package.json contains "type":"module" all files with ".js" will throw an error if they are imported with an
require
function.This fix:
.cjs
when creating the base name.js
to.cjs
when"type":"module"
exists inpackage.json
This solves #801