fresh
fresh copied to clipboard
Do not assign named exports into existing default export
Fixes: https://github.com/denoland/fresh/issues/3492
Note that this change is potentially breaking, but I don't think the code that might be broken by it was processed correctly in the first place, in case of existing default export, the old implementation was setting static properties on it, this isn't how esm compat works in node.js/with syntheticDefaultExport works for example.
I see that babel might emit this in loose mode:
module.exports = MyClass;
module.exports.default = MyClass;
But I don't see anything that needs to be done when going backwards