Skip to content

The only_remove_type_imports: true is not strip import specifiers with type #8140

@underfin

Description

@underfin

reproduction

import { transform } from 'rolldown/experimental'

const result = transform('foo.ts', 'import { ref, type Ref } from "vue";', {
  typescript: {
    onlyRemoveTypeImports: true,
  },
})
console.log(result.code) // import { ref, type Ref } from "vue";

The output should be import { ref } from "vue"; (related babel/babel#15348)

refer: rolldown/rolldown#3244

Metadata

Metadata

Assignees

Labels

C-bugCategory - Bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions