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

Discussion: Config option for including .js on import paths #138

Open
corydeppen opened this issue Feb 5, 2024 · 1 comment
Open

Discussion: Config option for including .js on import paths #138

corydeppen opened this issue Feb 5, 2024 · 1 comment
Labels
RFC A discussion about a future feature

Comments

@corydeppen
Copy link

Summary

When Fuse generates files in a Node project with the module compiler option set to NodeNext, the import paths cause a TS error:

Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './tada.js'?

Code Generator has an emitLegacyCommonJSImports option for controlling whether to add the .js extension to import paths. If gql.tada will be preferred over codegen going forward, would it be possible to include a way to control the import paths in generated Fuse files?

@corydeppen corydeppen added the RFC A discussion about a future feature label Feb 5, 2024
@JoviDeCroock
Copy link
Member

JoviDeCroock commented Feb 5, 2024

That's a good point, we can def include that when we check the tsconfig - I reckon we'll need to fix this in the LSP though 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC A discussion about a future feature
Projects
None yet
Development

No branches or pull requests

2 participants