Feature request: add indexHtmlTransformer and plugins options to application builder
- Dominant language
- TypeScript
- Stars
- 27k
- Forks
- 11.8k
- Avg merge
- 14h 23m
- Merged PRs (30d)
- 162
Description
### Command
build
### Description
Hi. This feature exists for a long time in angular-builders and nx custom builders' code.
`plugins` allows adding vite plugins; we use this option to use custom plugin with .env file parsing, adding ENVIRONMENT_NAME and __APP_VERSION__ global variables and much more. I guess there are plenty of other use-cases for this.
`indexHtmlTransformer` allows to replace some placeholders in index.html while building or serving an app. Useful to make similar DX when building or developing locally my app.
There is [not much to do](https://github.com/nrwl/nx/blob/master/packages/angular/src/executors/application/application.impl.ts) with these two, but i think this will boost DX many times.
Thanks for your time!
### Describe the solution you'd like
_No response_
### Describe alternatives you've considered
https://github.com/nrwl/nx/blob/master/packages/angular/src/executors/application/application.impl.ts
Contributor guide
Research direction
Start by reading the Angular application builder entry point and comparing its behavior with nx/packages/angular/src/executors/application/application.impl.ts, the implementation linked in the issue. Trace how build and serve options are handled, then verify that plugins and indexHtmlTransformer can be configured for both workflows and that the existing application-builder tests cover the completed behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript, vite
- Domain
- build-system, cli, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100