From 1c06942860ec727443c69e1c109538dff85f613e Mon Sep 17 00:00:00 2001 From: Dominic Watson Date: Wed, 9 Aug 2017 16:39:59 +0200 Subject: [PATCH] fix(@angular/cli): flatten index.html config during output --- packages/@angular/cli/models/webpack-configs/browser.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/@angular/cli/models/webpack-configs/browser.ts b/packages/@angular/cli/models/webpack-configs/browser.ts index 11691a941612..b53a1eb3e4a9 100644 --- a/packages/@angular/cli/models/webpack-configs/browser.ts +++ b/packages/@angular/cli/models/webpack-configs/browser.ts @@ -60,11 +60,13 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { })); } + const flatIndex = appConfig.index.substr(appConfig.index.lastIndexOf('/') + 1); + return { plugins: [ new HtmlWebpackPlugin({ template: path.resolve(appRoot, appConfig.index), - filename: path.resolve(buildOptions.outputPath, appConfig.index), + filename: path.resolve(buildOptions.outputPath, flatIndex), chunksSortMode: packageChunkSort(appConfig), excludeChunks: lazyChunks, xhtml: true,