Optional chaining and Nullish coalescing don't work with Typescript

Hello :slight_smile:

I am facing errors when i try to use ? or ?? operators with Ionic Vue (Typescript)
Examples:
user?.name
const value = test ?? ‘Default’

If i try it without lang=“ts” on script it works
Also those features works fine on Vue 3 project generated with vue cli.

Errors:
Module parse failed: Unexpected token

You may need an additional loader to handle the result of these loaders.

Best regards

What version of TypeScript are you using?

It was 3.9.6 and i did update to 4.1.6 still same

Add samsung 12.0 to your .browserslistrc file and restart the build (i.e. rerun whatever command you used to start the local server).

e.g.:

//.browserslistrc
> 1%
last 2 versions
not dead
not ie 11
samsung 12.0   <- add this

Can you create a GitHub repo with an app where this issue happens?

This fixed the issue. Thanks mate. Cheers :partying_face:

Though it’s strange that is working on my regular vue 3 project which has just:

1%
last 2 versions
not dead