{"record":{"id":"3e50ed8194669564","repo":"angular/angular-cli","slug":"the-application-and-browser-esbuild-builders-d","errorCode":null,"errorMessage":"The \"application\" and \"browser-esbuild\" builders do not support Webpack transforms.","messagePattern":"The \"application\" and \"browser-esbuild\" builders do not support Webpack transforms\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/angular_devkit/build_angular/src/builders/dev-server/builder.ts","lineNumber":70,"sourceCode":"  // Determine project name from builder context target\n  const projectName = context.target?.project;\n  if (!projectName) {\n    context.logger.error(`The \"dev-server\" builder requires a target to be specified.`);\n\n    return EMPTY;\n  }\n\n  context.logger.warn(\n    'The \"@angular-devkit/build-angular:dev-server\" builder is deprecated as part of Angular\\'s Webpack support deprecation. ' +\n      'Use \"@angular/build:dev-server\" instead. For more information, see https://angular.dev/tools/cli/build-system-migration.',\n  );\n\n  return defer(() => initialize(options, projectName, context, extensions?.builderSelector)).pipe(\n    switchMap(({ builderName, normalizedOptions }) => {\n      // Use vite-based development server for esbuild-based builds\n      if (isEsbuildBased(builderName)) {\n        if (transforms?.logging || transforms?.webpackConfiguration) {\n          throw new Error(\n            `The \"application\" and \"browser-esbuild\" builders do not support Webpack transforms.`,\n          );\n        }\n\n        if (options.publicHost) {\n          context.logger.warn(\n            `The \"publicHost\" option will not be used because it is not supported by the \"${builderName}\" builder.`,\n          );\n        }\n\n        if (options.disableHostCheck) {\n          context.logger.warn(\n            `The \"disableHostCheck\" option will not be used because it is not supported by the \"${builderName}\" builder.`,\n          );\n        }\n\n        // New build system defaults hmr option to the value of liveReload\n        normalizedOptions.hmr ??= normalizedOptions.liveReload;","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/angular/angular-cli/blob/bb72145f9ab45aee29f523236b3a25cd0813a841/packages/angular_devkit/build_angular/src/builders/dev-server/builder.ts#L52-L88","documentation":"The dev-server supports two backends: webpack-based builders (browser) and esbuild-based ones (application, browser-esbuild). Webpack-specific transforms (logging callback, webpackConfiguration overrides) only apply to the webpack backend; when an esbuild-based builder is detected together with such transforms, the dev-server throws instead of silently ignoring them.","triggerScenarios":"Passing transforms: { webpackConfiguration } or transforms: { logging } to execute Dev Server Builder's execute() while the project's build target uses the application or browser-esbuild builder; programmatic scheduling of the dev-server with transforms against an esbuild-based project.","commonSituations":"Migrating a project from browser/webpack builder to application/esbuild builder but keeping old tooling that injected webpack transforms; third-party libraries (e.g. analytics or bundle-analyzer integrations) that hook webpack configuration; custom scripts written for the webpack dev-server API.","solutions":["Remove transforms.webpackConfiguration and transforms.logging from the dev-server invocation.","If you need equivalent customization, configure the application builder via its own options (e.g. vite config / build options) instead of webpack transforms.","Switch the project's build target back to the webpack browser builder only if webpack transforms are unavoidable (not recommended; browser builder is deprecated).","Update the third-party tool that injects transforms to an esbuild/vite-compatible version."],"exampleFix":"// before\nexecute({ /* options */ }, { builderSelector }, { webpackConfiguration: (c) => c })\n// after\nexecute({ /* options */ }, { builderSelector }) // no webpack transforms with esbuild builders","handlingStrategy":"validation","validationCode":"const ESBUILD_BASED = new Set(['@angular/build:application', '@angular-devkit/build-angular:application', '@angular-devkit/build-angular:browser-esbuild']);\nif (transforms?.webpackConfiguration || transforms?.logging) {\n  if (ESBUILD_BASED.has(builderName)) {\n    throw new Error(`Remove webpack transforms for esbuild builder ${builderName}`);\n  }\n}","typeGuard":"const isEsbuildBased = (builderName: string): boolean =>\n  /application|browser-esbuild|vite/.test(builderName);","tryCatchPattern":"try {\n  await startDevServer(options, transforms);\n} catch (e) {\n  if (String(e.message).includes('do not support Webpack transforms')) {\n    // retry without transforms or switch to webpack-based builder\n  }\n  throw e;\n}","preventionTips":["Only attach transforms when using the webpack browser builder","Migrate webpack customizations to vite/esbuild equivalents","Guard transform injection with a builder-name check","Audit third-party tools that inject webpackConfiguration"],"tags":["angular","dev-server","esbuild","webpack","vite"],"backgroundTag":"webpack-transform-unsupported","analyzedSha":"bb72145f9ab45aee29f523236b3a25cd0813a841","analyzedAt":"2026-08-30T02:47:34.745Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}