File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
packages/react-scripts/scripts Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -91,12 +91,18 @@ checkBrowsers(paths.appPath, isInteractive)
9191 // We have not found a port.
9292 return ;
9393 }
94+
9495 const config = configFactory ( 'development' ) ;
9596 const protocol = process . env . HTTPS === 'true' ? 'https' : 'http' ;
9697 const appName = require ( paths . appPackageJson ) . name ;
9798 const useTypeScript = fs . existsSync ( paths . appTsConfig ) ;
9899 const tscCompileOnError = process . env . TSC_COMPILE_ON_ERROR === 'true' ;
99- const urls = prepareUrls ( protocol , HOST , port ) ;
100+ const urls = prepareUrls (
101+ protocol ,
102+ HOST ,
103+ port ,
104+ paths . publicUrlOrPath . slice ( 0 , - 1 )
105+ ) ;
100106 const devSocket = {
101107 warnings : warnings =>
102108 devServer . sockWrite ( devServer . sockets , 'warnings' , warnings ) ,
@@ -116,7 +122,11 @@ checkBrowsers(paths.appPath, isInteractive)
116122 } ) ;
117123 // Load proxy config
118124 const proxySetting = require ( paths . appPackageJson ) . proxy ;
119- const proxyConfig = prepareProxy ( proxySetting , paths . appPublic ) ;
125+ const proxyConfig = prepareProxy (
126+ proxySetting ,
127+ paths . appPublic ,
128+ paths . publicUrlOrPath
129+ ) ;
120130 // Serve webpack assets generated by the compiler over a web server.
121131 const serverConfig = createDevServerConfig (
122132 proxyConfig ,
You can’t perform that action at this time.
0 commit comments