Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Open
eemeli opened this issue Nov 29, 2024 · 0 comments

Comments

@eemeli
Copy link
Contributor

eemeli commented Nov 29, 2024

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.

@eemeli eemeli changed the title [@rollup/plugin-typescript] Using rewriteRelativeImportExtension with synamic imports leaves out helper function [@rollup/plugin-typescript] Using rewriteRelativeImportExtension with dynamic imports leaves out helper function Nov 29, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant