angular / angular/angular-cli

No way to access compilation output files

未关闭
#27,386 10 条评论 24 个 reaction 已指派 0 人 在 GitHub 查看
angular/build:application area: @angular/build feature feature: under consideration freq1: low
主要语言
TypeScript
星标
27k
派生
11.8k
平均合并
14 小时 23 分钟
30 天内合并 PR
162

描述

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

贡献指南

打开贡献指南

调研方向

先从 application builder 的 build 和 serve 路径以及 esbuild 插件的 onEnd hook 入手,然后检查 result.outputFiles 当前是如何暴露的。确定应如何让包含 polyfills、assets 和 styles 在内的完整输出集合,或 build 命令的结果,暴露带哈希的文件名。完成标准是:plugin 或 builder 的使用者可以访问所有编译输出文件,以生成 manifest。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
build-system
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。