Skip to content
New issue

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

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: Add proper support for ES modules via a Rollup build step #350

Merged
merged 3 commits into from
Jan 8, 2022
Merged

Conversation

pdubroy
Copy link
Contributor

@pdubroy pdubroy commented Jan 8, 2022

Fixes #185. Now that Ohm can be built with Rollup (see #344), we can ship a proper ES module via a Rollup build step.

@@ -4,7 +4,7 @@
// Imports
// --------------------------------------------------------------------

const pexprs = require('./pexprs');
const pexprs = require('./pexprs-main');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to add this to avoid a warning about circular dependencies from Rollup.

@pdubroy
Copy link
Contributor Author

pdubroy commented Jan 8, 2022

@megabuz: Please take a look and let me know if this looks like a reasonable approach to you.

@pdubroy pdubroy mentioned this pull request Jan 8, 2022
@pdubroy
Copy link
Contributor Author

pdubroy commented Jan 8, 2022

Published this as ohm-js@16.2.0-pre.esm.

@pdubroy
Copy link
Contributor Author

pdubroy commented Jan 8, 2022

Going to merge this now since it seems to fix the problem. Happy to address anything else in a follow-up.

@pdubroy pdubroy merged commit 4634cda into master Jan 8, 2022
@pdubroy pdubroy deleted the esm branch January 8, 2022 16:08
@megabuz
Copy link
Contributor

megabuz commented Jan 8, 2022

Thank you! I'm glad ohm receives better ESM support.
I'm going to test it in my project.

It's working, nice!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ES6+ module
2 participants