File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ export interface ServeTaskOptions {
32
32
open ?: boolean ;
33
33
vendorChunk ?: boolean ;
34
34
hmr ?: boolean ;
35
+ inlineClient ?: string ;
35
36
}
36
37
37
38
const ServeCommand = Command . extend ( {
@@ -103,6 +104,12 @@ const ServeCommand = Command.extend({
103
104
default : false ,
104
105
description : 'Enable hot module replacement' ,
105
106
} ,
107
+ {
108
+ name : 'inline-client' ,
109
+ type : String ,
110
+ aliases : [ 'ic' ] ,
111
+ description : '(Defaults to "http://host:port")'
112
+ }
106
113
] ,
107
114
108
115
run : function ( commandOptions : ServeTaskOptions ) {
@@ -117,6 +124,9 @@ const ServeCommand = Command.extend({
117
124
118
125
commandOptions . liveReloadHost = commandOptions . liveReloadHost || commandOptions . host ;
119
126
127
+ commandOptions . inlineClient = commandOptions . inlineClient ||
128
+ `http://${ commandOptions . host } :${ commandOptions . port } /` ;
129
+
120
130
return this . _checkExpressPort ( commandOptions )
121
131
. then ( this . _autoFindLiveReloadPort . bind ( this ) )
122
132
. then ( ( opts : ServeTaskOptions ) => {
Original file line number Diff line number Diff line change @@ -35,8 +35,9 @@ export default Task.extend({
35
35
// This allows for live reload of page when changes are made to repo.
36
36
// https://webpack.github.io/docs/webpack-dev-server.html#inline-mode
37
37
let entryPoints = [
38
- `webpack-dev-server/client?http:// ${ serveTaskOptions . host } : ${ serveTaskOptions . port } /`
38
+ `webpack-dev-server/client?${ serveTaskOptions . inlineClient } /`
39
39
] ;
40
+
40
41
if ( serveTaskOptions . hmr ) {
41
42
const webpackHmrLink = 'https://webpack.github.io/docs/hot-module-replacement.html' ;
42
43
ui . writeLine ( oneLine `
You can’t perform that action at this time.
0 commit comments