{"record":{"id":"24ea574e56629092","repo":"angular/angular-cli","slug":"warning-forcing-the-use-of-the-esbuild-based-buil","errorCode":null,"errorMessage":"Warning: Forcing the use of the esbuild-based build system with third-party builders may cause unexpected behavior and/or build failures.","messagePattern":"Warning: Forcing the use of the esbuild-based build system with third-party builders may cause unexpected behavior and/or build failures\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/angular_devkit/build_angular/src/builders/dev-server/builder.ts","lineNumber":217,"sourceCode":"  };\n}\n\ninterface BuilderSelectorInfo {\n  builderName: string;\n  forceEsbuild: boolean;\n}\n\nfunction defaultBuilderSelector(\n  info: BuilderSelectorInfo,\n  logger: BuilderContext['logger'],\n): string {\n  if (isEsbuildBased(info.builderName)) {\n    return info.builderName;\n  }\n\n  if (info.forceEsbuild) {\n    if (!info.builderName.startsWith('@angular-devkit/build-angular:')) {\n      logger.warn(\n        'Warning: Forcing the use of the esbuild-based build system with third-party builders' +\n          ' may cause unexpected behavior and/or build failures.',\n      );\n    }\n\n    // The compatibility builder should be used if esbuild is force enabled.\n    return '@angular-devkit/build-angular:browser-esbuild';\n  }\n\n  return info.builderName;\n}\n","sourceCodeStart":199,"sourceCodeEnd":229,"githubUrl":"https://github.com/angular/angular-cli/blob/bb72145f9ab45aee29f523236b3a25cd0813a841/packages/angular_devkit/build_angular/src/builders/dev-server/builder.ts#L199-L229","documentation":"This warning comes from the dev-server's builder selector when `forceEsbuild` is enabled but the resolved builder is a third-party (non `@angular-devkit/build-angular:`) builder. Forcing the esbuild-based build system under an incompatible third-party builder bypasses that builder's own pipeline, so behavior may differ or builds may fail. It informs you the compatibility path is being overridden.","triggerScenarios":"Setting `NG_BUILD_FORCE_ESBUILD=true` or equivalent force-esbuild option while running `ng serve` with a builder whose name does not start with `@angular-devkit/build-angular:`; raised in `defaultBuilderSelector`.","commonSituations":"Workspaces using community builders (e.g. custom webpack or nx extension builders) with the force-esbuild environment variable left set in CI or shell profile, or after migrating part of a project to esbuild while third-party builders remain configured.","solutions":["Unset the `NG_BUILD_FORCE_ESBUILD` environment variable so the third-party builder runs natively","If you want esbuild, migrate the project to the first-party `@angular/build:application` / `@angular/build:dev-server` builders","Pin the third-party builder version that matches your Angular version to avoid needing the force flag","If intentional, verify build output carefully since the warning signals unsupported behavior"],"exampleFix":"// before (env)\nNG_BUILD_FORCE_ESBUILD=true ng serve\n// after\nunset NG_BUILD_FORCE_ESBUILD && ng serve","handlingStrategy":"validation","validationCode":"// shell check before serving with third-party builders\nif [ -n \"$NG_BUILD_FORCE_ESBUILD\" ]; then\n  echo \"NG_BUILD_FORCE_ESBUILD is set; third-party builders will be forced onto esbuild.\"\nfi","typeGuard":"function isForcedThirdParty(builderName: string, forceEsbuild: boolean): boolean {\n  return forceEsbuild && !builderName.startsWith('@angular-devkit/build-angular:');\n}","tryCatchPattern":null,"preventionTips":["Do not set NG_BUILD_FORCE_ESBUILD globally in shell profiles or CI images","Migrate third-party builder usage to first-party @angular/build equivalents","Check angular.json builder names when debugging odd serve behavior","Keep builder versions aligned with the Angular CLI version"],"tags":["esbuild","compatibility","third-party-builders","environment-variable"],"backgroundTag":"force-esbuild-compatibility-warning","analyzedSha":"bb72145f9ab45aee29f523236b3a25cd0813a841","analyzedAt":"2026-08-30T02:47:34.745Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}