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?
Summary
When Fuse generates files in a Node project with the
module
compiler option set toNodeNext
, 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?