-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove @babel/preset-typescript
#95
Comments
I didn't write this plugin so I can't speak to it. But assuming we don't do the TS conversion the expectation is the downstream tool does? Can we make that assumption. I'm open to this if we know Vite will just handle this for the files we process. I wonder if there are any other implications. I trust you if you've tested this. |
The transform step in the link I gave is actually based on what Prefresh does in their Vite plugin: https://github.com/preactjs/prefresh/blob/main/packages/vite/src/index.js#L27-L34 so if anything, they have tested this more realistically. It works as I've tested. My only concern really here is if anyone actually uses the |
Hi. I actually use typescript option for this: solid({
typescript: {
allowDeclareFields: true,
},
}) Otherwise, my build fails because
Can I use |
yes you can. The new setup just enables Babel to understand TypeScript syntax. |
typescript
is unused by the majority I believetypescript
parsing can be bypassed byparserOpts.plugin = ['typescript']
, you can see an example here: https://github.com/lxsmnsyc/solid-styled/blob/main/packages/vite/src/index.ts#L66-L69typescript
preset performs the TS-to-JS compilation, I don't think we want thisThe text was updated successfully, but these errors were encountered: