U
U
Username2018-11-15 15:10:29
React
Username, 2018-11-15 15:10:29

How to add publicId to create-react-app?

Good afternoon!
There is a react application that is deployed to the server npm run build, after which a JS file is created.
When placing a js file on other domains, images are not loaded from the server.
How to write public url?
https://facebook.github.io/create-react-app/docs/u...
How to force adding public url when importing images this way?

import logoImg from './img/logo.svg';

<img src={logoImg} />

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question