Created by: EnoahNetzach
Solves https://github.com/facebookincubator/create-react-app/issues/936, introducing the possibility to specify the PUBLIC_URL
env variable while running npm run build
.
With this PR the %PUBLIC_URL%
in static assets and the output.publicPath
variable set in webpack configs follow the following behavior:
- "homepage" specified in
package.json
,PUBLIC_URL
not set: only thepathname
is used from "homepage" (as it is right now); -
PUBLIC_URL
set, "homepage" might be set: the full url specified in the env variable is used