Skip to content

Conversation

@Windvis
Copy link
Contributor

@Windvis Windvis commented Jan 29, 2025

ember-cli uses babel-remove-types for removing types from .gts files and if some of the imported references are only used in the <template> context, babel assumes they are unused and removes them.

By enabling the onlyRemoveTypeImports option of @babel/plugin-transform-typescript those imports are now no longer stripped.

Context on why this is needed:

ember-cli uses `babel-remove-types` to remove types from .gts files and if some of the imported references are only used in the `<template>` context, babel assumes they are unused and removes them.

By enabling the `onlyRemoveTypeImports` option of `@babel/plugin-transform-typescript` those imports are now no longer stripped.

Co-Authored-By: Bert De Block <[email protected]>
@Windvis Windvis force-pushed the only-remove-type-imports branch from 6302333 to fdf4822 Compare January 29, 2025 11:27
@mansona mansona added the bug Something isn't working label Jan 29, 2025
@mansona mansona merged commit 694283d into ember-cli:main Jan 29, 2025
7 checks passed
@github-actions github-actions bot mentioned this pull request Jan 29, 2025
@Windvis Windvis deleted the only-remove-type-imports branch January 29, 2025 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants