angular / angular/angular-cli

Feature request: add indexHtmlTransformer and plugins options to application builder

未關閉
#28,607 6 則留言 3 個 reaction 已指派 0 人 在 GitHub 檢視
needs: more info
主要語言
TypeScript
星號
27k
分支
11.8k
平均合併
14 小時 23 分鐘
30 天內合併 PR
162

描述

### 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

貢獻指南

開啟貢獻指南

研究方向

先閱讀 Angular application builder 的進入點,並將其行為與 issue 中連結的實作 nx/packages/angular/src/executors/application/application.impl.ts 進行比較。追蹤 build 和 serve 選項的處理方式,然後確認 plugins 和 indexHtmlTransformer 是否都能為兩種工作流程進行設定,以及現有的 application-builder 測試是否涵蓋完成後的行為。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
angular, typescript, vite
領域
build-system, cli, tooling
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。