Skip to content
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 importsOnly option #23

Open
taras opened this issue Nov 30, 2021 · 1 comment
Open

Support importsOnly option #23

taras opened this issue Nov 30, 2021 · 1 comment

Comments

@taras
Copy link

taras commented Nov 30, 2021

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.

@tbranyen
Copy link
Owner

tbranyen commented Jan 5, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants