From 86f2a1b3d5cdb59376dcd6584478f5ee3ae9ee68 Mon Sep 17 00:00:00 2001 From: Dmitriy Shekhovtsov Date: Thu, 3 Nov 2016 00:59:59 +0200 Subject: [PATCH] fix(serve): added accept html headers option to webpack-dev-server (#2990) fixes #2989 --- packages/angular-cli/custom-typings.d.ts | 2 +- packages/angular-cli/tasks/serve-webpack.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/angular-cli/custom-typings.d.ts b/packages/angular-cli/custom-typings.d.ts index 224c2e974ee0..c82e20002580 100644 --- a/packages/angular-cli/custom-typings.d.ts +++ b/packages/angular-cli/custom-typings.d.ts @@ -1,7 +1,7 @@ interface IWebpackDevServerConfigurationOptions { contentBase?: string; hot?: boolean; - historyApiFallback?: {[key: string]: boolean} | boolean; + historyApiFallback?: {[key: string]: any} | boolean; compress?: boolean; proxy?: {[key: string]: string}; staticOptions?: any; diff --git a/packages/angular-cli/tasks/serve-webpack.ts b/packages/angular-cli/tasks/serve-webpack.ts index 9c2e0a6229ad..585af628b829 100644 --- a/packages/angular-cli/tasks/serve-webpack.ts +++ b/packages/angular-cli/tasks/serve-webpack.ts @@ -72,6 +72,7 @@ export default Task.extend({ ), historyApiFallback: { disableDotRule: true, + htmlAcceptHeaders: ['text/html', 'application/xhtml+xml'] }, stats: webpackDevServerOutputOptions, inline: true,