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

fix(package): allow require() for commonjs use #565

Merged
merged 2 commits into from
Apr 15, 2021
Merged

Conversation

saschanaz
Copy link
Member

Okay, it turns out @ExE-Boss was right, and simple exports blocks CommonJS imports. I should have read #556 (comment) more carefully, especially https://nodejs.org/api/packages.html#packages_conditional_exports 😬

Somehow I thought Node would wrap ES modules to CommonJS as they do vise versa, but it doesn't.

@saschanaz saschanaz requested a review from marcoscaceres April 15, 2021 22:05
@marcoscaceres
Copy link
Member

TIL also!

@saschanaz
Copy link
Member Author

Thanks for quick review ♥

@saschanaz saschanaz merged commit f7d3308 into main Apr 15, 2021
@saschanaz saschanaz deleted the allow-commonjs branch April 15, 2021 22:53
@saschanaz saschanaz mentioned this pull request Apr 18, 2021
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.

2 participants