Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

172
Visualizações
Adding React JS to existing website with debugging capability

I am following the steps at https://reactjs.org/docs/add-react-to-a-website.html to add React to an existing website. The process involves adding the scripts:

<script src="https://unpkg.com/react@17/umd/react.production.min.js" crossorigin></script>
<script src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js" crossorigin></script>

Then, enabling JSX by installing Babel:

npm init -y
npm install babel-cli@6 babel-preset-react-app@3

Finally, running Babel:

npx babel --watch src --out-dir . --presets react-app/prod

These steps work great, but if there is a syntax error in any of the JSX files in src, then Babel will fail to transpile the JSX file, and the transpiled JS file will never be written, so I am unable to debug the issue. Additionally, if there is a runtime error in the transpiled JS file, Google Chrome Developer Console will show the errors from the resulting transpiled JS file, and not the original JSX file. What is the simplest way to get the JSX syntax/runtime errors showing up in Google Chrome Developer Console?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda