Closed kamilchlebek closed 5 months ago
Hey, thanks for submitting the PR! One question - wouldn't removing plugins mean that the build flow and the extract flow might be different and therefore the extraction might not work as expected?
That's very good question! I'll dig deeper to find out if this may or may not be the issue.
@just-jeb
Here are my latest findings. Unfortunately without help from angular team I can't do more (https://github.com/angular/angular-cli/issues/27264).
Currently there's no way to have exactly the same build & extract flow - angular will not pass any extensions
when executing i18n builder:
@kamilchlebek thanks for the update. Seems like we're blocked here until Angular CLI implement your request. Probably submitting a PR could speed it up.
Side note: they won't expose the plugins functionality directly from Angular CLI builders, this has been their official policy and that's the reason custom builders exist 😄.
Closing until it's unblocked
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
We successfully switched from using webpack to esbuild thanks to
@angular-builders/custom-esbuild:application
.However once we tried to extract i18n messages our
xlf
file had 0 items inside.It turned out that angular checks builder name to decide whether to use webpack/esbuild strategy - https://github.com/angular/angular-cli/blob/c2b8d84e360f0508e73f7c502516f898f067c03b/packages/angular_devkit/build_angular/src/builders/extract-i18n/builder.ts#L64-L65
What is the new behavior?
Proposed
@angular-builders/custom-esbuild:extract-i18n
builder temporarily overrides builder name, strips unsupported configuration options and then runs default@angular-devkit/build-angular:extract-i18n
builder.For the reference,
nx
is doing the same: https://github.com/nrwl/nx/pull/21802Does this PR introduce a breaking change?