Skip to content

Commit 685fdd0

Browse files
authored
Respect build assets allowOutsideOutdir
The old check should be removed so assets are allowed outside the project folder if allowOutsideOutdir is configured. Fixes #9363
1 parent 3be17e7 commit 685fdd0

File tree

1 file changed

+0
-7
lines changed
  • packages/@angular/cli/models/webpack-configs

1 file changed

+0
-7
lines changed

packages/@angular/cli/models/webpack-configs/common.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,6 @@ export function getCommonConfig(wco: WebpackConfigOptions) {
9696
const outputRelativeOutput = path.relative(absoluteOutputPath, absoluteAssetOutput);
9797

9898
if (outputRelativeOutput.startsWith('..') || path.isAbsolute(outputRelativeOutput)) {
99-
100-
const projectRelativeOutput = path.relative(projectRoot, absoluteAssetOutput);
101-
if (projectRelativeOutput.startsWith('..') || path.isAbsolute(projectRelativeOutput)) {
102-
const message = 'An asset cannot be written to a location outside the project.';
103-
throw new SilentError(message);
104-
}
105-
10699
if (!asset.allowOutsideOutDir) {
107100
const message = 'An asset cannot be written to a location outside of the output path. '
108101
+ 'You can override this message by setting the `allowOutsideOutDir` '

0 commit comments

Comments
 (0)