angular / angular/angular-cli

Feature request: add indexHtmlTransformer and plugins options to application builder

Đang mở
#28,607 6 bình luận 3 reaction 0 người được giao Xem trên GitHub
needs: more info
Ngôn ngữ chính
TypeScript
Star
27k
Fork
11.8k
Merge trung bình
14 giờ 23 phút
Pull request đã merge (30 ngày)
162

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách đọc entry point của Angular application builder và so sánh hành vi của nó với nx/packages/angular/src/executors/application/application.impl.ts, phần triển khai được liên kết trong issue. Theo dõi cách các tùy chọn build và serve được xử lý, sau đó xác minh rằng plugins và indexHtmlTransformer có thể được cấu hình cho cả hai workflow và rằng các bài kiểm thử application-builder hiện có bao phủ hành vi đã hoàn thiện.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
angular, typescript, vite
Lĩnh vực
build-system, cli, tooling
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.