File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ export interface ServeTaskOptions {
3232 open ?: boolean ;
3333 vendorChunk ?: boolean ;
3434 hmr ?: boolean ;
35+ inlineClient ?: string ;
3536}
3637
3738const ServeCommand = Command . extend ( {
@@ -103,6 +104,12 @@ const ServeCommand = Command.extend({
103104 default : false ,
104105 description : 'Enable hot module replacement' ,
105106 } ,
107+ {
108+ name : 'inline-client' ,
109+ type : String ,
110+ aliases : [ 'ic' ] ,
111+ description : '(Defaults to "http://host:port")'
112+ }
106113 ] ,
107114
108115 run : function ( commandOptions : ServeTaskOptions ) {
@@ -117,6 +124,9 @@ const ServeCommand = Command.extend({
117124
118125 commandOptions . liveReloadHost = commandOptions . liveReloadHost || commandOptions . host ;
119126
127+ commandOptions . inlineClient = commandOptions . inlineClient ||
128+ `http://${ commandOptions . host } :${ commandOptions . port } /` ;
129+
120130 return this . _checkExpressPort ( commandOptions )
121131 . then ( this . _autoFindLiveReloadPort . bind ( this ) )
122132 . then ( ( opts : ServeTaskOptions ) => {
Original file line number Diff line number Diff line change @@ -35,8 +35,9 @@ export default Task.extend({
3535 // This allows for live reload of page when changes are made to repo.
3636 // https://webpack.github.io/docs/webpack-dev-server.html#inline-mode
3737 let entryPoints = [
38- `webpack-dev-server/client?http:// ${ serveTaskOptions . host } : ${ serveTaskOptions . port } /`
38+ `webpack-dev-server/client?${ serveTaskOptions . inlineClient } /`
3939 ] ;
40+
4041 if ( serveTaskOptions . hmr ) {
4142 const webpackHmrLink = 'https://webpack.github.io/docs/hot-module-replacement.html' ;
4243 ui . writeLine ( oneLine `
You can’t perform that action at this time.
0 commit comments