File tree Expand file tree Collapse file tree 5 files changed +14
-5
lines changed Expand file tree Collapse file tree 5 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ export default async function* applicationExecutor(
4646
4747 const builderContext = await createBuilderContext (
4848 {
49- builderName : 'application' ,
49+ builderName : '@nx/angular: application' ,
5050 description : 'Build an application.' ,
5151 optionSchema : require ( './schema.json' ) ,
5252 } ,
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ export default async function* esbuildExecutor(
3838
3939 const builderContext = await createBuilderContext (
4040 {
41- builderName : 'browser-esbuild' ,
41+ builderName : '@nx/angular: browser-esbuild' ,
4242 description : 'Build a browser application' ,
4343 optionSchema : require ( '@angular-devkit/build-angular/src/builders/browser-esbuild/schema.json' ) ,
4444 } ,
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export default async function* extractI18nExecutor(
2727
2828 const builderContext = await createBuilderContext (
2929 {
30- builderName : 'extrct -i18n' ,
30+ builderName : '@nx/angular:extract -i18n' ,
3131 description : 'Extracts i18n messages from source code.' ,
3232 optionSchema : require ( './schema.json' ) ,
3333 } ,
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export default async function* unitTestExecutor(
3535
3636 const builderContext = await createBuilderContext (
3737 {
38- builderName : 'unit-test' ,
38+ builderName : '@nx/angular: unit-test' ,
3939 description : 'Run application unit tests.' ,
4040 optionSchema : require ( './schema.json' ) ,
4141 } ,
Original file line number Diff line number Diff line change @@ -100,7 +100,16 @@ export async function createBuilderContext(
100100 ) ;
101101
102102 const registry = new schema . CoreSchemaRegistry ( ) ;
103- registry . addPostTransform ( schema . transforms . addUndefinedDefaults ) ;
103+ const isAngularBuild =
104+ builderInfo . builderName . startsWith ( '@angular/build:' ) ||
105+ [ '@nx/angular:application' , '@nx/angular:unit-test' ] . includes (
106+ builderInfo . builderName
107+ ) ;
108+ if ( isAngularBuild ) {
109+ registry . addPostTransform ( schema . transforms . addUndefinedObjectDefaults ) ;
110+ } else {
111+ registry . addPostTransform ( schema . transforms . addUndefinedDefaults ) ;
112+ }
104113 registry . addSmartDefaultProvider ( 'unparsed' , ( ) => {
105114 // This happens when context.scheduleTarget is used to run a target using nx:run-commands
106115 return [ ] ;
You can’t perform that action at this time.
0 commit comments