Typescript 4 supports nullish assignment (??=). CRA 4 released yesterday says it supports TS 4. That operator works in the code editor, but when running yarn start I get:
Module parse failed: Unexpected token (14:10)
File was processed with these loaders:
* ./node_modules/@pmmmwh/react-refresh-webpack-plugin/loader/index.js
* ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
To reproduce the problem I just create a new app with CRA with Typescript support. Then just add the following lines to App.tsx:
const test = { a: 1 };
test.a ??= 2;
Any ideas? I don't know much about Babel/Webpack.