just-jeb / angular-builders

Angular build facade extensions (Jest and custom webpack configuration)
MIT License
1.14k stars 198 forks source link

Incorrect signature for custom-esbuild index html transform function #1756

Closed exequiel09 closed 5 months ago

exequiel09 commented 6 months ago

Describe the Bug

According to Angular CLI codebase, the type signature of the transform function only includes the HTML and not the target.

In the docs, it includes both.

Expected Behavior

Target options should be passed as is or align the docs with Angular CLI.

Environment


Libs
- @angular/core version: 17.3.5
- @angular-devkit/build-angular version: 17.3.5
- @angular-builders/custom-esbuild version: 17.1.2

For Tooling issues:
- Node version: 20.10.0
- Platform:  Windows            
exequiel09 commented 6 months ago

If someone is using Nx, you can use the following environment variables to retrieve it during the transformer execution:

  1. NX_TASK_TARGET_PROJECT
  2. NX_TASK_TARGET_TARGET
  3. NX_TASK_TARGET_CONFIGURATION

Reference: https://nx.dev/reference/environment-variables