react-mathlive icon indicating copy to clipboard operation
react-mathlive copied to clipboard

Failed to Compile due to babel-loaders

Open joaortizro opened this issue 4 years ago • 4 comments

when installing on a new react project , babel loaders suggest to add extra configuration.

Screenshot_20210806_154750

joaortizro avatar Aug 06 '21 20:08 joaortizro

anyone having the same problems?

joaortizro avatar Aug 20 '21 20:08 joaortizro

This is a duplicate of https://github.com/arnog/mathlive/issues/1123

arnog avatar Aug 21 '21 07:08 arnog

@arnog it seems it's a problem with the react-scripts versions, i've tried 3.3.0,3.4.0 and 3.4.1 and still no success, but there was a change , now the error is on the ''??" operator, will dig futher and report any updates

joaortizro avatar Aug 21 '21 23:08 joaortizro

@joaortizro yes, it's due to some tools in the react-cli toolchain still using webpack-4, which does not support the ?? operator. The fix is in the mathlive depot, which is to target es2019 instead of the current version of Javascript. But maybe you can find a way to configure react-cli to use webpack-5.

arnog avatar Aug 22 '21 07:08 arnog