angular/angular-cli · warning

The 'commonChunk' option is always enabled by this builder…

Error message

The 'commonChunk' option is always enabled by this builder and will be ignored.

What it means

Warning issued by the browser-esbuild builder when 'commonChunk' is explicitly set to false. In the esbuild builder, extracting a common chunk is always enabled, so a request to disable it cannot be honored and is ignored. The build completes but chunking behaves as if commonChunk were enabled.

Solutions

  1. Remove `"commonChunk": false` from the browser-esbuild target options.
  2. If you truly need commonChunk disabled, stay on (or return to) the Webpack '@angular-devkit/build-angular:browser' builder.
  3. Migrate to '@angular/build:application' and accept automatic chunk splitting.

Example fix

// before
"options": { "commonChunk": false }
// after
"options": {}
Defensive patterns

Strategy: validation

Validate before calling

if (builder === '@angular-devkit/build-angular:browser-esbuild' && target.options?.commonChunk === false) {
  delete target.options.commonChunk; // always enabled by this builder
}

Type guard

function disablesCommonChunk(o: unknown): o is { commonChunk: false } {
  return typeof o === 'object' && o !== null && (o as any).commonChunk === false;
}

Prevention

When it happens

Trigger: Running '@angular-devkit/build-angular:browser-esbuild' with `commonChunk: false` in the target options (typically migrated from the Webpack 'browser' builder where the option was supported).

Common situations: Projects that disabled the common chunk in Webpack to change lazy-loading granularity, then switched the builder to browser-esbuild without cleaning options.

Related errors


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

Appendix: source

Thrown at packages/angular_devkit/build_angular/src/builders/browser-esbuild/index.ts:45

  context: BuilderContext,
  infrastructureSettings?: {
    write?: boolean;
  },
  plugins?: Plugin[],
): AsyncIterable<BuilderOutput> {
  context.logger.warn(
    'The "@angular-devkit/build-angular:browser-esbuild" 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.',
  );

  // Warn about any unsupported options
  if (userOptions['vendorChunk']) {
    context.logger.warn(
      `The 'vendorChunk' option is not used by this builder and will be ignored.`,
    );
  }
  if (userOptions['commonChunk'] === false) {
    context.logger.warn(
      `The 'commonChunk' option is always enabled by this builder and will be ignored.`,
    );
  }
  if (userOptions['webWorkerTsConfig']) {
    context.logger.warn(`The 'webWorkerTsConfig' option is not yet supported by this builder.`);
  }

  // Convert browser builder options to application builder options
  const normalizedOptions = convertBrowserOptions(userOptions);

  // Execute the application builder
  yield* buildApplication(normalizedOptions, context, { codePlugins: plugins });
}

export function convertBrowserOptions(
  options: BrowserBuilderOptions,
): Omit<ApplicationBuilderOptions, 'outputPath'> & { outputPath: OutputPathClass } {
  const {

View on GitHub (pinned to bb72145f9a)