Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

99
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!