Skip to content

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

@corydeppen

Description

@corydeppen

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFCA discussion about a future feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions