Skip to content

Dynamic import of .ts files do not get transpiled #4294

@martijnvankreij-dev

Description

@martijnvankreij-dev

I am using the latest version of esbuild to bundle an application that dynamically tries to import a given .js file. When running I receive the following warning: [WARNING] The glob pattern import("./**/*.js") did not match any files [empty-glob]

I was assuming that esbuild would transpile the .ts files to .js files and that the import wouldn't be a problem. Is this by design, and are there workarounds? Making the .ts files also entrypoints doesn't seem to make a difference.

The minimal reproduction can be seen here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions