babel-plugin-transform-commonjs
babel-plugin-transform-commonjs copied to clipboard
Support importsOnly option
Thank you for creating this transform. It's helpful on a project where we're using Relay Modern (11). Relay generates TypeScript modules that for some reason occasionally include require
statements. We're using this transform to make these modules pure ES6 modules.
In our case, we're finding the export feature to be unhelpful because it creates multiple default exports. We get something that looks like this,
export default node;
export default module.exports;
export default module.exports
is added by this transform but unnecessary.
It would be very helpful if it was possible to only change the import statements but not add the exports.
Hi sorry, only just now saw this. If we solved the issue with multiple default exports, would that be sufficient vs adding the importsOnly
option?