angular / angular/angular-cli

Build process hook

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

描述

### Desired functionality
It would be nice to have a hook in the build process, between the index generation and the hash computation, for execute something.

I try to use the Critical lib with my Angular project. First, I build my app, then I use Critical script in order to inline my CSS in the index file : I rewrite my index file. It was messed up with Angular SW, so I submit an issue in Angular's Github (https://github.com/angular/angular/issues/25267).

@gkalpak explains that the issue result from the stored hash mismatch, because of the rewrite of index file.

贡献指南

打开贡献指南

调研方向

首先跟踪 Angular CLI 的构建流程,从 index 生成到 hash 计算。确认这两个阶段之间可以在哪里运行 hook,然后确认在 hashing 之前执行 post-generation action 可以保留最终的 index hash,并解决 issue 中描述的 Angular service-worker mismatch。

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

评估

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

把新 issue 发到你的邮箱

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