File tree 2 files changed +13
-2
lines changed
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ export interface ServeTaskOptions {
36
36
i18nFile ?: string ;
37
37
i18nFormat ?: string ;
38
38
locale ?: string ;
39
+ inlineClient ?: string ;
39
40
}
40
41
41
42
const ServeCommand = Command . extend ( {
@@ -109,7 +110,13 @@ const ServeCommand = Command.extend({
109
110
} ,
110
111
{ name : 'i18n-file' , type : String , default : null } ,
111
112
{ name : 'i18n-format' , type : String , default : null } ,
112
- { name : 'locale' , type : String , default : null }
113
+ { name : 'locale' , type : String , default : null } ,
114
+ {
115
+ name : 'inline-client' ,
116
+ type : String ,
117
+ aliases : [ 'ic' ] ,
118
+ description : 'Websocket client URL for Webpack inline mode (Defaults to "http://host:port")'
119
+ }
113
120
] ,
114
121
115
122
run : function ( commandOptions : ServeTaskOptions ) {
@@ -126,6 +133,9 @@ const ServeCommand = Command.extend({
126
133
Version . assertAngularVersionIs2_3_1OrHigher ( this . project . root ) ;
127
134
commandOptions . liveReloadHost = commandOptions . liveReloadHost || commandOptions . host ;
128
135
136
+ commandOptions . inlineClient = commandOptions . inlineClient ||
137
+ `http://${ commandOptions . host } :${ commandOptions . port } /` ;
138
+
129
139
return this . _checkExpressPort ( commandOptions )
130
140
. then ( this . _autoFindLiveReloadPort . bind ( this ) )
131
141
. then ( ( opts : ServeTaskOptions ) => {
Original file line number Diff line number Diff line change @@ -38,8 +38,9 @@ export default Task.extend({
38
38
// This allows for live reload of page when changes are made to repo.
39
39
// https://webpack.github.io/docs/webpack-dev-server.html#inline-mode
40
40
let entryPoints = [
41
- `webpack-dev-server/client?http:// ${ serveTaskOptions . host } : ${ serveTaskOptions . port } /`
41
+ `webpack-dev-server/client?${ serveTaskOptions . inlineClient } /`
42
42
] ;
43
+
43
44
if ( serveTaskOptions . hmr ) {
44
45
const webpackHmrLink = 'https://webpack.github.io/docs/hot-module-replacement.html' ;
45
46
ui . writeLine ( oneLine `
You can’t perform that action at this time.
0 commit comments