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

187
Visualizações
overwrite tsconfig.json from the package

I have React app install a third-party package using Typsecript, running my react app current get an error message like below:

Class constructor Name cannot be invoked without 'new'

I did try to decare a variable with new for that, does not work.

so I dig deeper turn out the third package we use to extend of component have this setting in the tsconfig.json

{
    "compilerOptions": {
        "target": "es5",
    }
}

Is any way I can overwrite this setting in my current react app since I don't can't change that package?

Thanks!

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I do not believe that this is possible, since if you did not create the app with the typescript template react-scripts will not use typescript. You have two options here: use cra to make a new app using the --template typescript option and copy your code, or run npm run eject or yarn eject to expose the configuration files for webpack and add the loader yourself, although this is risky because it risks messing up the project configurations.

about 4 years ago · Santiago Trujillo Relatório
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