Skip to content

[@rollup/plugin-typescript] Using rewriteRelativeImportExtension with dynamic imports leaves out helper function #1820

@eemeli

Description

@eemeli

Expected Behavior

Using the new rewriteRelativeImportExtension option introduced in TypeScript 5.7 should work with dynamic imports.

Actual Behavior

If rewriteRelativeImportExtension: true is set in the TS config, a dynamic import() in a .ts source will have its argument wrapped with a __rewriteRelativeImportExtension() helper function, but the helper function itself is not included in the compiled output.

Additional Information

Building the same file with just tsc works, and includes the helper in the output.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions