Define, webpack transforms and esbuild plugins are not supported in v19 Karma Buillder #29003
Open
1 task done
Labels
area: @angular-devkit/build-angular
devkit/build-angular:karma
freq1: low
Only reported by a handful of users who observe it rarely
severity5: regression
type: bug/fix
Command
test
Is this a regression?
The previous version in which this bug was not present was
v18
Description
There is no way to pass in webpack transforms or esbuild plugins or define to the internal Angular builders used in Karma.
Browser builder
When using webpack (browser) builder, webpack transforms are ignored:
https://github.com/angular/angular-cli/blob/main/packages/angular_devkit/build_angular/src/builders/karma/browser_builder.ts#L37
I guess they should be passed in as a third parameter to initializeBrowser
as it used to be passed in in v18 here https://github.com/angular/angular-cli/blob/18.2.x/packages/angular_devkit/build_angular/src/builders/karma/index.ts#L87
Application builder
When using the newly supported esbuild builder in Karma, esbuild
plugins
anddefine
are not supportedDefine option is not supported in Karma builder (neither exposed in the builder schema nor in the builder api)
https://github.com/angular/angular-cli/blob/main/packages/angular_devkit/build_angular/src/builders/karma/application_builder.ts#L354
Regarding the application builder, I am not sure whether it is a feature request or a bug as the application builder support is new.
Question: why are we using an internal builder with a closed configuration rather than using the one defined in angular.json by the user?
Minimal Reproduction
Browser builder
Application builder
Your Environment
The text was updated successfully, but these errors were encountered: