Skip to content

vue-tsc can not find vue files if module resolution is node12 or nodenext #1394

@kalvenschraut

Description

@kalvenschraut

Reproduction can be found here

I have been trying to migrate my codebase to use typescripts new esm modules and for that I need to use node12 or nodenext module resolution. Everything seems to work fine, but due to typescript needing extensions to correctly resolve files now, it appears vue-tsc is unable to find the vue files anymore. I did notice having vue.js did fix the issue for vue-tsc, but then I can't build with vite.

I can't seem to find any other alternative solutions to this problem, maybe I have to change something in my code base?

A possible solution to the problem maybe changing the file import path to vue.js with vue-tsc before calling tsc? If this is the desired direction, and if pointed in the right direction I can take a look at doing a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions