How do we configure babel proposal decorators with Solid's vite plugin?
I've got this Stackblitz:
https://stackblitz.com/edit/solidjs-templates-wyjc1i?file=index.html,src%2Findex.tsx,vite.config.ts,package.json
No luck configuring decorators like so:
Stackblitz terminal shows this error:
Ask me why I have tooling fatigue. ๐ Buildless for the win.
5 Replies
Ah, I was missing brakcets, that's all. This,
needs to be
take note that at some point we will be removing babel plugins, since we are delegating the remaining transforms to esbuild. No worries though, esbuild supports decorators
Esbuild does not support "standard decorators" yet, only old TypeScript legacy (experimental) decorators, if I read this correctly:
https://github.com/evanw/esbuild/issues/104
GitHub
Feature request: Decorators support ยท Issue #104 ยท evanw/esbuild
error: Decorators are not supported yet Any plan to support decorators?
As long as we can still plug in Babel while esbuild doesn't have new decorators, then it'll be ok. But hopefully esbuild will have it soon!
@lxsmnsyc ๐ค are Babel plugins being dropped in general? Or just in Vite? I currently use Babel on its own for compiling JSX
Vite. We can't drop it in general.
and we are not dropping Babel in Vite, we are. dropping the process of compiling TS with Babel