I'm trying
PUBLIC_URL=http://example.com npm run build
with a project built using the latest create-react-script.
However, the occurrences of %PUBLIC_URL%
in public/index.html
are replaced with an empty string, not the expected value PUBLIC_URL
.
public/index.html
contains code like
<script src="%PUBLIC_URL%/static/js/jarvis.widget.min.js"></script>
Hours of searching the internet and stack overflow show that very little is written about PUBLIC_URL
. I cloned create-react-app from GitHub and have been browsing the code but have not yet been enlightened.
Does anyone have any suggestions as to what I'm doing wrong?
See Question&Answers more detail:os