Commit b7462c6
fix(vite-plugin-angular): reject @service on Angular below 22
Addresses CodeRabbit review feedback. When a `@Service` class was
compiled against Angular <22, the version gate did a bare `break`,
leaving `targetType` at its `FactoryTarget.Injectable` default — the
unconditional factory block then emitted an `Injectable`-target `ɵfac`
with no `ɵprov`, a silently wrong half-compiled class.
`@Service` does not exist before Angular 22, so this is a broken
configuration. Set `classCompileError` instead, surfacing a clear
`@Service requires Angular 22 or later` error before factory emission
rather than degrading silently.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 328d800 commit b7462c6
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
974 | 974 | | |
975 | 975 | | |
976 | 976 | | |
977 | | - | |
978 | | - | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
979 | 986 | | |
980 | 987 | | |
981 | 988 | | |
| |||
0 commit comments