Skip to content

Commit d256045

Browse files
committed
feat(@angular/build): support a default outputPath option for applications
The application builder will now use a default output path when the `outputPath` option is not specified either in the `angular.json` configuration or via the command line. The default used will be `dist/<project_name>` and be relative to the workspace root. This value is the typical default for new projects. Projects may continue to customize the output path via the option if needed. Existing project behavior and configuration will not be changed.
1 parent ee7f962 commit d256045

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/angular/build/src/builders/application/options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ export async function normalizeOptions(
295295
};
296296
}
297297

298-
const outputPath = options.outputPath;
298+
const outputPath = options.outputPath ?? path.join(projectRoot, 'dist', projectName);
299299
const outputOptions: NormalizedOutputOptions = {
300300
browser: 'browser',
301301
server: 'server',

packages/angular/build/src/builders/application/schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@
605605
}
606606
},
607607
"additionalProperties": false,
608-
"required": ["outputPath", "index", "browser", "tsConfig"],
608+
"required": ["index", "browser", "tsConfig"],
609609
"definitions": {
610610
"assetPattern": {
611611
"oneOf": [

0 commit comments

Comments
 (0)