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) {
4949 runtimeConfig . useHotModuleReplacement = argv . hot || false ;
5050 runtimeConfig . devServerKeepPublicPath = argv . keepPublicPath || false ;
5151
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+ }
5565
5666 break ;
5767 }
You can’t perform that action at this time.
0 commit comments