File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -49,9 +49,19 @@ module.exports = function(argv, cwd) {
49
49
runtimeConfig . useHotModuleReplacement = argv . hot || false ;
50
50
runtimeConfig . devServerKeepPublicPath = argv . keepPublicPath || false ;
51
51
52
- var host = argv . host ? argv . host : 'localhost' ;
53
- var port = argv . port ? argv . port : '8080' ;
54
- runtimeConfig . devServerUrl = `http${ runtimeConfig . devServerHttps ? 's' : '' } ://${ host } :${ port } /` ;
52
+ if ( typeof argv . public !== 'undefined' ) {
53
+ if ( argv . public . includes ( '://' ) ) {
54
+ runtimeConfig . devServerUrl = argv . public ;
55
+ } else if ( runtimeConfig . devServerHttps ) {
56
+ runtimeConfig . devServerUrl = `https://${ argv . public } ` ;
57
+ } else {
58
+ runtimeConfig . devServerUrl = `http://${ argv . public } ` ;
59
+ }
60
+ } else {
61
+ var host = argv . host ? argv . host : 'localhost' ;
62
+ var port = argv . port ? argv . port : '8080' ;
63
+ runtimeConfig . devServerUrl = `http${ runtimeConfig . devServerHttps ? 's' : '' } ://${ host } :${ port } /` ;
64
+ }
55
65
56
66
break ;
57
67
}
You can’t perform that action at this time.
0 commit comments