-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
Command
build
Description
The @angular-devkit/build-angular:browser-esbuild builder is missing the ability to transform the ESBuild configuration as it's done in @angular-devkit/build-angular:browser. The executeBrowserBuilder function from the @angular-devkit/build-angular:browser builder accepts the transforms object as an optional argument at the end with the webpackConfiguration property. This allows many packages, such as @angular-builders/custom-webpack, to extend the Webpack configuration and then call executeBrowserBuilder at the end.
Describe the solution you'd like
The buildEsbuildBrowser function could have a third transforms argument with properties like esbuildConfiguration (like transforms.webpackConfiguration) and have a type of ExecutionTransformer<esbuild.BuildOptions>. This will basically pass the base configuration into the transformer and allow customizing it, then pass the configuration back to bundleCode -> esbuild.build.
That would align the builder interface with the rest of builders (:browser, :server, :karma, and extract-i18n).
Describe alternatives you've considered
No response