angular/angular-cli · warning

This build is using the application builder but transforms.w

Error message

This build is using the application builder but transforms.webpackConfiguration was provided. The transform will be ignored.

What it means

When the karma builder detects it is running through the esbuild-based application builder (checkForEsbuild), a provided transforms.webpackConfiguration cannot be applied because no webpack configuration exists; the builder warns that the transform is ignored.

Source

Thrown at packages/angular_devkit/build_angular/src/builders/karma/index.ts:52

  options: KarmaBuilderOptions,
  context: BuilderContext,
  transforms: {
    webpackConfiguration?: ExecutionTransformer<Configuration>;
    // The karma options transform cannot be async without a refactor of the builder implementation
    karmaOptions?: (options: KarmaConfigOptions) => KarmaConfigOptions;
  } = {},
): AsyncIterable<BuilderOutput> {
  context.logger.warn(
    'The "@angular-devkit/build-angular:karma" builder is deprecated as part of Angular\'s Webpack support deprecation. ' +
      'Use "@angular/build:karma" instead. For more information, see https://angular.dev/tools/cli/build-system-migration.',
  );

  // Check Angular version.
  assertCompatibleAngularVersion(context.workspaceRoot);

  if (await checkForEsbuild(options, context)) {
    if (transforms.webpackConfiguration) {
      context.logger.warn(
        `This build is using the application builder but transforms.webpackConfiguration was provided. The transform will be ignored.`,
      );
    }

    if (options.fileReplacements) {
      options.fileReplacements = normalizeFileReplacements(options.fileReplacements, './');
    }

    if (typeof options.polyfills === 'string') {
      options.polyfills = [options.polyfills];
    }

    const { executeKarmaBuilder } = await import('@angular/build');

    yield* executeKarmaBuilder(
      options as unknown as import('@angular/build').KarmaBuilderOptions,
      context,
      transforms,

View on GitHub (pinned to bb72145f9a)

Solutions

  1. Remove the transforms.webpackConfiguration from your builder invocation since it has no effect.
  2. Migrate karma customization to options supported by @angular/build:karma (e.g., karmaOptions).
  3. If webpack customization is essential, stay on the webpack-based builder (accepting deprecation).

Example fix

// before
execute(options, context, { webpackConfiguration: (c) => ({ ...c, devtool: 'eval' }) })
// after
execute(options, context, { karmaOptions: { reporters: ['dots'] } })
Defensive patterns

Strategy: validation

Validate before calling

// Only pass webpackConfiguration transforms when NOT using the application builder:
const useEsbuild = await checkForEsbuild(options, context);
const transforms = useEsbuild ? { karmaOptions } : { karmaOptions, webpackConfiguration };

Prevention

When it happens

Trigger: Executing the karma builder with a webpackConfiguration execution transform (via createBuilder harness or API) while the project resolves to the esbuild/application builder path.

Common situations: Programmatic builder usage that customizes webpack config (e.g., in tests or custom tooling) after migrating karma to the application builder; transform silently does nothing.

Related errors


AI-assisted analysis of angular/angular-cli@bb72145f9a (2026-08-30). Data as JSON: /api/errors/c3caba673a33a25d. Report an issue: GitHub.