CLI doesn't allow custom builder to pass additional extensions when building app for i18n extractions
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- angular, typescript
调研方向
从链接行所在的 packages/angular_devkit/build_angular/src/builders/extract-i18n/application-extraction.ts 开始,并比较常规应用构建如何接收扩展。验证 extract-i18n 在应用编译期间传递了自定义 builder 扩展,并且 messages.xlf 包含提取的消息,而不是空文件。
由索引模型根据 Issue 内容生成。
描述
Command
extract-i18n
Description
We're in the process of migrating from webpack to esbuild.
To provide custom esbuild plugins we decided to use custom builder (https://github.com/just-jeb/angular-builders).
It went smooth until we realised that extract-i18 no longer works. It ends successfully but messages.xlf is empty.
It turned out that angular checks builderName to choose which bundler to use.
To fix that I decided to implement custom extract-i18n builder that will trick angular/cli and force using esbuild -
https://github.com/just-jeb/angular-builders/pull/1711
For the record nrwl/nx did the same - https://github.com/nrwl/nx/pull/21802
The issue is that angular/cli will not let us pass any extensions during i18n application compilation.
It may lead to inconsistency between build and extract flow, which I suppose may lead to issues with i18n.
Describe the solution you'd like
We should be able to pass custom extensions as for regular app building.
(bonus) would be really nice if these if (builderName === ... are replaced by something that is custom builder friendly 🙏
Describe alternatives you've considered
Alternatively we could rewrite whole extract-i18n builder, but as 95% of the code would be the same - it seems pointless
- 主要语言
- TypeScript
- 星标
- 27k
- 派生
- 11.8k
- 平均合并
- 16 小时 35 分钟
- 30 天内合并 PR
- 176
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
angular/angular-cli 的其他 Issue
-
area: @angular/build gemini-triaged
难度 2/5 1-3 小时 新手友好度 74/100
angular/angular-cli#33955 ·
-
area: @angular/cli gemini-triaged
难度 2/5 1-3 小时 新手友好度 72/100
angular/angular-cli#33055 · 1 条评论 · 3 个 reaction ·
-
area: @angular/build gemini-triaged
难度 4/5 3-5 天 新手友好度 72/100
angular/angular-cli#34137 ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34131 · 已指派 1 人 ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34130 · 已指派 1 人 ·
查看 angular/angular-cli 的全部 Issue
相似的 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch 未关闭
难度 2/5 1-3 小时 新手友好度 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 78/100
vicharanashala/fln#563 ·