-
Notifications
You must be signed in to change notification settings - Fork 845
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
Support Babel/Typescript "faux modules" as well as native ESM #936
Conversation
@anonrig please verify |
@fox1t maybe you can take a look as well |
@mcollina I started having seg fault. A pretty vague message, I'll investigate. sh: line 1: 815 Segmentation fault: 11 node build/index.js |
module.exports.final = final | ||
module.exports.levels = mappings() | ||
module.exports.stdSerializers = serializers | ||
module.exports.stdTimeFunctions = Object.assign({}, time) | ||
module.exports.symbols = symbols | ||
module.exports.version = version |
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.
I don't understand how this is any different than the prior code.
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.
Node.js now makes static analysis of your exports and if it finds module.exports
it adds them as named export in the ESM context. The result in JS is the same as before, but writing it like this helps module interop!
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.
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.
ahahahah <3
OK, seg fault was due to another error by couchbase. It seems that this PR fixes the typescript bug. thanks @mcollina 👍 |
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.
LGTM!
758721e
to
bc60603
Compare
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Fixes #935