Skip to content

Typescript NodeNext path alias with extension #191

Closed as duplicate of#275
Closed as duplicate of#275
@WoodyWoodsta

Description

@WoodyWoodsta

I have a typescript project with moduleResolution: 'NodeNext'. In my tsconfig.json, I have set up an alias which points directly to a file. In the ES spec, this would be with the file extension, and thus should be in the alias target:

tsconfig.json

{
	"paths": {
		"alias": ["path/to/specific/file.mjs"]
	}
}

Eslint complains, if I try:

import something from 'alias';

with "Unable to resolve path to module 'alias'".

Am I configuring this incorrectly, or is this not yet supported?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions