CRA 2.0: urls in static files not correct when homepage="."
Created by: bradfordlemley
Is this a bug report?
Yes
Steps to Reproduce
- Use react-scripts@2.0.0-next.3e165448
- In app's package.json, set
"homepage": "."
- In App.css, add a url to a static file, e.g.,
background-image: url(./logo.svg)
yarn build
Expected Behavior
build/static/css/main.[hash].chunk.css should have:
background-image:url(../../static/media/logo.5d5d9eef.svg)
Actual Behavior
build/static/css/main.[hash].chunk.css has:
background-image:url(static/media/logo.5d5d9eef.svg)