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

108
Visualizações
Relative path in dev incorrectly translated in staging

I have this situation in React that in development I point to a logo in footer with a relative path wchich is:

import logo from "../../public/assets/images/logo-white.svg";

And this path is not working on the staging server, after debugging i found out that the assets part is missing in the path, in devtools the path is:

/images/logo-white.svg?49346bf607b2345c88562df1dde21b97

when I add the assets part before slash it works, I cannot use absolute path in component and I don't know what can I do to fix it.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You could use it like this for production: process.env.PUBLIC_URL + '/images/logo-white.svg'

You can find the detailed documentation on when and how to use the public folder in the React docs

about 4 years ago · Juan Pablo Isaza 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