Git Repo information in package.json
is added as PUBLIC_URL
, causing broken build.
#9547
Labels
package.json
is added as PUBLIC_URL
, causing broken build.
#9547
Describe the bug
When I add git information to
package.json
, it somehow gets added to PUBLIC_URL, so that the built html has bad references like<link href="https://github.com/sw-yx/hi/static/css/main.5f361e03.chunk.css" rel="stylesheet" />
and<link rel="icon" href="https://github.com/sw-yx/h/favicon.ico" />
(which is even worse!!!).i think this is a bug.
Did you try recovering your dependencies?
yarn 1.22.4
Which terms did you search for in User Guide?
PUBLIC_URL, prefix
Environment
Steps to reproduce
npm create react-app
gh create repo
npm init -y
<- this adds repo details topackage.json
yarn build
when you check
build/index.html
, you find the bug:The bug is that
/sw-yx/hi
is inserted asPUBLIC_URL
where it should not be, and even worse, in parts of it the last letter is snipped off.Expected behavior
nothing in package.json should impact what PUBLIC_URL is
Actual behavior
Reproducible demo
https://github.com/sw-yx/hi
The text was updated successfully, but these errors were encountered: