Skip to content

[dev-server-esbuild] Unable to resolve packages with correct extensions when imported in an .ts file using node's exports #1376

Closed
@motss

Description

@motss

When files being imported in an .ts file, the resolver automatically assumes all the imports must be ended with .ts when some could be .js. It seems like the dev server does not support node's exports quite well.

Actual behavior

Packages that use exports in node resolves with .ts when it gets imported in a .ts file.

Expected behavior

Packages that use exports in node must be resolved with the correct extensions when it gets imported in a .ts file

Steps to reproduce

Clone this repo and run the project to reproduce the stated problem.

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