-
-
Notifications
You must be signed in to change notification settings - Fork 590
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(commonjs): resolve export "exports" not found #1363
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to merge 🎉
Currently thinking about this, maybe I know a solution that is even more CommonJS spec compliant, let me check. Will convert it to draft for a moment. |
Turns out my other idea did not really work out. As I already got the go for this, I will merge this one now. |
@lukastaegert would you consider merging a patch to replace |
The code in question is theoretically included for every single CommonJS module. Using |
Yes, that’s our coping strategy for the time being. Thanks! |
This reverts commit 39a39d7.
Rollup Plugin Name:
commonjs
This PR contains:
Are tests included?
Breaking Changes?
If yes, then include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.
List any relevant issue numbers:
Description
Previously, this plugin relied on "synthetic named exports" to get a reference for the
module.exports
export of a module in a way that would update ifmodule.exports
is reassigned.This apparently caused issues, so this PR changes that to instead use a getter and setter that updates
exports
ifmodule.exports
is reassigned.