concludio / react-mathlive

A react wrapper-component for mathlive.js
MIT License
25 stars 16 forks source link

Failed to Compile due to babel-loaders #36

Open joaortizro opened 3 years ago

joaortizro commented 3 years ago

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

Screenshot_20210806_154750

joaortizro commented 3 years ago

anyone having the same problems?

arnog commented 3 years ago

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

joaortizro commented 3 years ago

@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

arnog commented 3 years ago

@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.