Please report about circular dependencies of standalone components on "build" step
未关闭
area: compiler
area: core
cross-cutting: standalone
feature
- 主要语言
- TypeScript
- 星标
- 101k
- 派生
- 27.5k
- 平均合并
- 1 天 19 小时
- 30 天内合并 PR
- 288
描述
### Which @angular/* package(s) are relevant/related to the feature request?
compiler
### Description
If standalone component A imports standalone component B, and B imports A, then `ReferenceError: Cannot access 'A' before initialization` will be raised.
But it will be only raised in runtime 🤷♂️
### Proposed solution
Please do not allow to compile components with circular dependencies.
### Alternatives considered
Or, allow circular dependencies 😜
贡献指南
调研方向
从 @angular/compiler 在构建步骤中处理 standalone-component imports 的部分开始,使用已报告的 A/B 循环导入场景作为复现。完成标准是编译器在构建期间报告循环依赖,而不是允许运行时 ReferenceError 发生,或者明确处理 issue 所请求的替代方案。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- compilers
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100