angular / angular/angular-cli

No way to access compilation output files

Open
#27,386 10 comments 24 reactions 0 assignees View on GitHub
angular/build:application area: @angular/build feature feature: under consideration freq1: low
Dominant language
TypeScript
Stars
27k
Forks
11.8k
Avg merge
14h 23m
Merged PRs (30d)
162

Description

### Command

build, serve

### Description

I have an esbuild plugin that is resposible to collect outputFiles after compilation (using `onEnd` hook with `result.outputFiles`).

When using application builder (esbuild) with custom plugins there is no way to access full list of outputFiles, only those emitted by `main` entrypoint compilation. There is no way to access additional files emited by angular builder, such as `polyfills`, assets, styles etc.

Previously, with using webpack plugin, i was able to get full list of outputFiles by using `processAssets` compilation hook.

I need to list emited files, as this is only way to get full names with filenames hash.

MY point is to build something like manifest of compilation result output files.

### Describe the solution you'd like

I would like to be able to access all compilation files by esbuild plugin.

### Describe alternatives you've considered

An alternative could be to access output files as an result of builder output, currently `build` command only returns `{success: true}` without information about output files.

Contributor guide

Open the contributing guide

Research direction

Start with the application builder's build and serve paths and the esbuild plugin's onEnd hook, then inspect how result.outputFiles is currently exposed. Determine how the full emitted set, including polyfills, assets, and styles, or the build command result should expose filenames with hashes. Done means a plugin or builder consumer can access all compilation output files for a manifest.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.