Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd support for native ESM modules #2137
Comments
|
This would be great Switching from I see many In some cases, this also introduced circular dependencies, like A more complicated case is something like if (...) {
// ...
} else {
Object.defineProperty(module.exports, 'native', {
// ...
get() {
Object.defineProperty(module.exports, 'native', {
// ...
})
// ...
},
})
}where the export definition is not only delayed, but also later overwritten. |
Hi and thank you for the great library and endless support!
It would be great to have this library export native named exports so we could import it natively on new Node versions.
Here is an example of how you would do it now, without that support: Urigo/typescript-node-es-modules-example@9830417#diff-f41e9d04a45c83f3b6f6e630f10117feR10-R11