Skip to content

Relative import paths need explicit file extensions in ECMAScript imports #269

@FyiurAmron

Description

@FyiurAmron

While trying to use with a Node16+ module type app, I get the following (e.g.):

error TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './..\google\protobuf\timestamp.js'?

import * as dependency_3 from "./..\\google\\protobuf\\timestamp";

Obviously there are workarounds to allow this to interact (defining a separate project etc.), but is it possible to have a boolean flag that would either emit those as "filename.js" or, by default, "filename" as it did previously?

(unless I'm missing something, it's impossible now... at least I couldn't find any such option yet)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions