File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed
Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ export interface ServeTaskOptions {
2727 sslCert ?: string ;
2828 aot ?: boolean ;
2929 open ?: boolean ;
30+ path ?: string ;
3031}
3132
3233const ServeCommand = Command . extend ( {
@@ -88,6 +89,12 @@ const ServeCommand = Command.extend({
8889 aliases : [ 'o' ] ,
8990 description : 'Opens the url in default browser' ,
9091 } ,
92+ {
93+ name : 'path' ,
94+ type : String ,
95+ default : '/' ,
96+ description : 'makes the content available on path e.g. http://host:port/path'
97+ } ,
9198 ] ,
9299
93100 run : function ( commandOptions : ServeTaskOptions ) {
Original file line number Diff line number Diff line change 11interface IWebpackDevServerConfigurationOptions {
22 contentBase ?: string ;
33 hot ?: boolean ;
4- historyApiFallback ?: boolean ;
4+ historyApiFallback ?: boolean | { [ key : string ] : string } ;
55 compress ?: boolean ;
66 proxy ?: { [ key : string ] : string } ;
77 staticOptions ?: any ;
Original file line number Diff line number Diff line change @@ -57,13 +57,16 @@ export default Task.extend({
5757 this . project . root ,
5858 `./${ CliConfig . fromProject ( ) . config . apps [ 0 ] . root } `
5959 ) ,
60- historyApiFallback : true ,
60+ historyApiFallback : {
61+ index : commandOptions . path
62+ } ,
6163 stats : webpackDevServerOutputOptions ,
6264 inline : true ,
6365 proxy : proxyConfig ,
6466 watchOptions : {
6567 poll : CliConfig . fromProject ( ) . config . defaults . poll
66- }
68+ } ,
69+ publicPath : commandOptions . path ,
6770 } ;
6871
6972 ui . writeLine ( chalk . green ( oneLine `
You can’t perform that action at this time.
0 commit comments