vitejs / vite-plugin-react-swc

Speed up your Vite dev server with SWC
MIT License
781 stars 50 forks source link

feat: support decorators in JSX files #66

Closed huyingx closed 1 year ago

huyingx commented 1 year ago

issues: Support decorators in JS files #60

ArnaudBarre commented 1 year ago

Thanks for the PR. But like for decorator metadata, this requires also to run SWC at build time. I need to decide on a new API to let more flexibility on the SWC configurations while making it more clear when SWC is used for build and when not.

But I'm still unsure with I want to enable this inside this plugin. It would allow/require to name a files .jsx to use decorators even without JSX syntax in there.

ArnaudBarre commented 1 year ago

This will not be supported. See https://github.com/vitejs/vite-plugin-react-swc/issues/60#issuecomment-1484278954 for more info