diff --git a/packages/angular_devkit/build_angular/src/builders/application/index.ts b/packages/angular_devkit/build_angular/src/builders/application/index.ts index a549927304a4..aeea29448cec 100644 --- a/packages/angular_devkit/build_angular/src/builders/application/index.ts +++ b/packages/angular_devkit/build_angular/src/builders/application/index.ts @@ -165,11 +165,13 @@ export function buildApplication( context: BuilderContext, pluginsOrExtensions?: Plugin[] | ApplicationBuilderExtensions, ): AsyncIterable { - let extensions; + let extensions: ApplicationBuilderExtensions | undefined; if (pluginsOrExtensions && Array.isArray(pluginsOrExtensions)) { extensions = { codePlugins: pluginsOrExtensions, }; + } else { + extensions = pluginsOrExtensions; } return buildApplicationInternal(options, context, undefined, extensions);