Skip to content

Why use process.env.PUBLIC_URL in links and paths? #165

Answered by Can-Sahin
vmundhra asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, it's not needed normally but I host the example application on GitHub pages as well. Check the npm script. Otherwise the links don't work.

"publish:github": "cross-env PUBLIC_URL='/react-boilerplate-cra-template' yarn build && gh-pages -d build",

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rounakcodes
Comment options

Answer selected by vmundhra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants