From 685fdd0c3d85595734ea98a51a5d53e7b51d0a55 Mon Sep 17 00:00:00 2001 From: trendzetter Date: Mon, 19 Feb 2018 16:11:27 +0100 Subject: [PATCH] Respect build assets allowOutsideOutdir The old check should be removed so assets are allowed outside the project folder if allowOutsideOutdir is configured. Fixes #9363 --- packages/@angular/cli/models/webpack-configs/common.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/packages/@angular/cli/models/webpack-configs/common.ts b/packages/@angular/cli/models/webpack-configs/common.ts index e4e5ab55fc35..044fff9ef207 100644 --- a/packages/@angular/cli/models/webpack-configs/common.ts +++ b/packages/@angular/cli/models/webpack-configs/common.ts @@ -96,13 +96,6 @@ export function getCommonConfig(wco: WebpackConfigOptions) { const outputRelativeOutput = path.relative(absoluteOutputPath, absoluteAssetOutput); if (outputRelativeOutput.startsWith('..') || path.isAbsolute(outputRelativeOutput)) { - - const projectRelativeOutput = path.relative(projectRoot, absoluteAssetOutput); - if (projectRelativeOutput.startsWith('..') || path.isAbsolute(projectRelativeOutput)) { - const message = 'An asset cannot be written to a location outside the project.'; - throw new SilentError(message); - } - if (!asset.allowOutsideOutDir) { const message = 'An asset cannot be written to a location outside of the output path. ' + 'You can override this message by setting the `allowOutsideOutDir` '