File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ const ENV = scriptName.indexOf('dev') === 0 ? 'development' : 'production';
1818const isTest = scriptName . indexOf ( 'test' ) >= 0 ? true : false ;
1919console . log ( '***** webpack runs in ' + ENV + ( isTest ? ' (test)' : '' ) + ' environment\n' ) ;
2020
21+ const devServerPort = 5005 ;
22+ const devServerHost = 'localhost' ;
2123let configEnv ;
2224
2325if ( ENV === 'development' ) {
@@ -55,9 +57,9 @@ if (ENV === 'development') {
5557 ]
5658 } ,
5759 proxy : {
58- " /dist" : {
59- target : " http://localhost:5005" ,
60- pathRewrite : { " ^/dist" : "" }
60+ ' /dist' : {
61+ target : ' http://' + devServerHost + ':' + devServerPort ,
62+ pathRewrite : { ' ^/dist' : '' }
6163 }
6264 } ,
6365 inline : true ,
@@ -67,7 +69,8 @@ if (ENV === 'development') {
6769 errors : true ,
6870 warnings : true
6971 } ,
70- port : 5005 ,
72+ port : devServerPort ,
73+ host : devServerHost ,
7174 publicPath : '/'
7275 } : { } ,
7376
You can’t perform that action at this time.
0 commit comments