feat(react-scripts): allow PUBLIC_URL in develoment mode
-
Review changes -
-
Download -
Email patches
-
Plain diff
Merged
Administrator requested to merge github/fork/iamandrewluca/public-url-in-development into master
Created by: iamandrewluca
Allow PUBLIC_URL
in development mode
-
Feature ( react-dev-utils/getPublicUrlOrPath
) -
Tests -
Docs -
Types DefinitelyTyped/DefinitelyTyped/pull/40982
Public API
-
In development mode browser is opened at desired pathname -
Redirect to desired pathname if does not start with it ( react-dev-utils/redirectServedPathMiddleware
) -
Assets will be served at desired pathname (webpack/webpack-dev-server/pull/2150) -
If desired pathname is a relative path, app will be served at /
Private API
-
Combined paths.publicUrl
andpaths.servedPath
intopaths.publicUrlOrPath
-
Extracted all logic into react-dev-utils/getPublicUrlOrPath
(no side effects) -
Moved evalSourceMapMiddleware
anderrorOverlayMiddleware
first in the middleware chain, redirect does not affect them. -
Moved proxy middleware after redirect (this is the case what most want, proxy should respect PUBLIC_URL
-
Adapted noopServiceWorkerMiddleware
to serve fromservedPath
-
Updated webpack-dev-server@3.9.0
towebpack-dev-server@3.10.0
Blocked by webpack/webpack-dev-server/pull/2150
Blocked by webpack/webpack-dev-server/pull/2374
Blocked by https://github.com/webpack/webpack-dev-server new patch release
Closes #6280
Closes #6135 (closed)
Closes #4158