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

Introduce CommonJS module #7

Merged
merged 2 commits into from
Sep 27, 2021
Merged

Introduce CommonJS module #7

merged 2 commits into from
Sep 27, 2021

Conversation

alexeyraspopov
Copy link
Owner

Per discussion in #5 and #2, here is an alternative CJS support implementation.

  • No build step (fewer things to manage)
  • Smaller CJS output due to different module exports output in .cjs file

cc @ai

@alexeyraspopov alexeyraspopov merged commit f22da89 into main Sep 27, 2021
@alexeyraspopov alexeyraspopov deleted the feature/CJSSupport branch September 27, 2021 14:58
@ai
Copy link
Contributor

ai commented Sep 27, 2021

Looks nice. I just recommend adding tests that ESM and CJS versions are equal. It saves me a lot.

https://github.com/ai/nanocolors/blob/main/test/cjs.test.js

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.

3 participants