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';
18
18
const isTest = scriptName . indexOf ( 'test' ) >= 0 ? true : false ;
19
19
console . log ( '***** webpack runs in ' + ENV + ( isTest ? ' (test)' : '' ) + ' environment\n' ) ;
20
20
21
+ const devServerPort = 5005 ;
22
+ const devServerHost = 'localhost' ;
21
23
let configEnv ;
22
24
23
25
if ( ENV === 'development' ) {
@@ -55,9 +57,9 @@ if (ENV === 'development') {
55
57
]
56
58
} ,
57
59
proxy : {
58
- " /dist" : {
59
- target : " http://localhost:5005" ,
60
- pathRewrite : { " ^/dist" : "" }
60
+ ' /dist' : {
61
+ target : ' http://' + devServerHost + ':' + devServerPort ,
62
+ pathRewrite : { ' ^/dist' : '' }
61
63
}
62
64
} ,
63
65
inline : true ,
@@ -67,7 +69,8 @@ if (ENV === 'development') {
67
69
errors : true ,
68
70
warnings : true
69
71
} ,
70
- port : 5005 ,
72
+ port : devServerPort ,
73
+ host : devServerHost ,
71
74
publicPath : '/'
72
75
} : { } ,
73
76
You can’t perform that action at this time.
0 commit comments