angular/angular-cli · warning

The "@angular-devkit/build-angular:prerender" builder is dep

Error message

The "@angular-devkit/build-angular:prerender" builder is deprecated as part of Angular's Webpack support deprecation. Use "@angular/build:application" instead. For more information, see https://angular.dev/tools/cli/build-system-migration.

What it means

The @angular-devkit/build-angular:prerender builder warns that it is deprecated as part of Angular's Webpack support deprecation. Its functionality (SSG/prerendering) is now provided by @angular/build:application with server-side rendering configuration.

Source

Thrown at packages/angular_devkit/build_angular/src/builders/prerender/index.ts:281

      }
    }
  } finally {
    void worker.destroy();
  }

  return browserResult;
}

/**
 * Builds the browser and server, then renders each route in options.routes
 * and writes them to prerender/<route>/index.html for each output path in
 * the browser result.
 */
export async function execute(
  options: PrerenderBuilderOptions,
  context: BuilderContext,
): Promise<PrerenderBuilderOutput> {
  context.logger.warn(
    'The "@angular-devkit/build-angular:prerender" builder is deprecated as part of Angular\'s Webpack support deprecation. ' +
      'Use "@angular/build:application" instead. For more information, see https://angular.dev/tools/cli/build-system-migration.',
  );

  const browserTarget = targetFromTargetString(options.browserTarget);
  const browserOptions = (await context.getTargetOptions(
    browserTarget,
  )) as unknown as BrowserBuilderOptions;
  const result = await _scheduleBuilds(options, context);
  const { success, error, browserResult, serverResult } = result;

  if (!success || !browserResult || !serverResult) {
    return { success, error } as BuilderOutput;
  }

  return _renderUniversal(options, context, browserResult, serverResult, browserOptions);
}

View on GitHub (pinned to bb72145f9a)

Solutions

  1. Migrate to @angular/build:application with prerendering configured ("outputMode"/prerender options or @angular/build:application + server routes).
  2. Run `ng update` migrations which rework prerender configuration to the new builder.
  3. Ignore the warning temporarily if the migration is scheduled later.

Example fix

// angular.json
// before
"builder": "@angular-devkit/build-angular:prerender"
// after
"builder": "@angular/build:application"
// with "options": { "outputMode": "static", "server": "...:server" }
Defensive patterns

Strategy: fallback

Validate before calling

const cfg = require('./angular.json');
if (JSON.stringify(cfg).includes('@angular-devkit/build-angular:prerender')) console.warn('Migrate prerender to @angular/build:application');

Prevention

When it happens

Trigger: Executing the prerender builder (e.g., `ng run project:prerender`) configured with the legacy @angular-devkit/build-angular:prerender builder.

Common situations: Angular Universal-style prerender setups kept after upgrading Angular; CI emits deprecation warnings on every SSG build.

Related errors


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