Exporting a `type` in TS causes the export to be renamed `type`
PaulBGD opened this issue · comments
PaulBGD commented
It seems like if I have something like:
export { Component, type Props as ComponentProps } from './Component'
It gets rewritten as
export { type } from "/src/.../Component/index.tsx";
This causes an error in the browser, due to the file not actually exporting type
.
EDIT: after testing, it seems like it might be that a export type Props = {}
in the Component file might be the issue? I'm not quite sure.
n028 commented
Hey! Thanks for your feedback. I'm afraid I was not able to reproduce the issue. When the plugin processes the files being served to the browser, all types should already be stripped out, so there shouldn't be any residual type import/export! If you could provide a simple repro, I'd be happy to take a closer look!