angular / angular/angular-cli

Feature request: add indexHtmlTransformer and plugins options to application builder

オープン
#28,607 コメント 6 件 リアクション 3 件 担当者 0 名 GitHub で見る
needs: more info
主要言語
TypeScript
スター
27k
フォーク
11.8k
平均マージ
14時間 23分
マージ済み PR(30日)
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 を短くまとめたダイジェスト。