@@ -60,21 +60,21 @@ export default async function deploy(
6060 ) ;
6161
6262 // Output path configuration
63- // The outputPath option can be either
63+ // The outputPath option can be either:
64+ // - undefined (Angular 20+): uses default dist/<project-name>/browser
6465 // - a String which will be used as the base value + default value 'browser'
6566 // - or an Object for more fine-tune configuration.
6667 // see https://angular.io/guide/workspace-config#output-path-configuration
6768 // see https://github.com/angular/angular-cli/pull/26675
6869
69- if ( ! buildOptions . outputPath ) {
70- throw new Error (
71- `Cannot read the outputPath option of the Angular project '${ buildTarget . name } ' in angular.json.`
72- ) ;
73- }
74-
75- const outputPath = buildOptions . outputPath as AngularOutputPath ;
70+ const outputPath = buildOptions . outputPath as AngularOutputPath | undefined ;
7671
77- if ( typeof outputPath === 'string' ) {
72+ if ( outputPath === undefined ) {
73+ // Angular 20+ default: dist/<project-name>/browser
74+ // Extract project name from buildTarget.name (format: "project:target:configuration")
75+ const projectName = buildTarget . name . split ( ':' ) [ 0 ] ;
76+ dir = path . join ( 'dist' , projectName , 'browser' ) ;
77+ } else if ( typeof outputPath === 'string' ) {
7878 dir = path . join ( outputPath , 'browser' ) ;
7979 } else if ( isOutputPathObject ( outputPath ) ) {
8080 dir = path . join ( outputPath . base , outputPath . browser ?? '' ) ;
0 commit comments