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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ESM/CJS import tests #63

Closed
sangaline opened this issue Jan 22, 2024 · 0 comments · Fixed by #84
Closed

Add ESM/CJS import tests #63

sangaline opened this issue Jan 22, 2024 · 0 comments · Fixed by #84
Assignees

Comments

@sangaline
Copy link
Contributor

We should add explicit tests that the ESM and CJS build outputs can be imported. It's easy for a CJS-only library to sneak in and break the ESM build.

@sangaline sangaline self-assigned this Jan 22, 2024
sangaline added a commit that referenced this issue Mar 8, 2024
This adds some basic tests to make sure that the ESM and CJS builds are
working. It's easy to accidentally add a library that doesn't work with one of
the builds, or to do something that pushes the library under a `default`
property on the CJS build. I've added and reverted a few commits here that
demonstrate these issues and the tests catching them.

In particular, see these commits which introduce different errors:

* a182acf - Introduce an ESM-only dependency
* 019fd03 - Force the CJS build to export the library under `.default`
* 495f335 - Use a CJS only library as an ESM import

Closes #63

Merges #84

LGTM given by: @katiemckeon
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 a pull request may close this issue.

1 participant