-
-
Notifications
You must be signed in to change notification settings - Fork 375
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
Optional chaining / nullish coalescing with typescipt #1450
Comments
Nullish Coalescing and Optional Chaining should work right out of the box. You don't need to configure babel with custom loaders. That being said, I cannot break the CLI (or those features) with the config you've offered, so your issue is likely some other configuration you've done on top of this. Can you provide a repo? |
I run preact create typescript The doc said that putting such a file will override the original config, so I tried to config babel inside preact.config. |
What it says is:
So creating such a file is how you override parts of the original config, it doesn't replace the original entirely. The default |
doesnt work for me. I am on latest preact & preact-cli |
Are you on preact-cli v4? |
@rschristian I mean latest stable version - 3.5.1 |
I can all but guarantee you're running into #1747. Preact-CLI is not maintained, and as such, I'm not going to mark v4 as "stable", but you absolutely should be using it. Webpack 4 is quite old and you'll see more and more of these issues until you switch. |
If preact-CLI isn't maintained, what is way to setup a preact app going forward? |
Upgraded to preact-CLI 4 and that fixed the mentioned problem! Thanks a lot @rschristian I wish someday I'll be able to use Vite to setup my app :) |
preact-cli 3.03
question / feature request
How to add optional chaining while using typescript?
I am using the default babel-loader config
Added this preact.config.js
but this is the result:
The text was updated successfully, but these errors were encountered: