6.4.3: `PolymorphicCallProps` 重写导致 `ComponentPropsWithRef` 实例化增加了 57 倍, 我们的应用程序中 tsc 堆内存增加了 1.6 GB
作者: develra创建于 2026年7月2日更新于 2026年8月7日
Hi, thanks for maintaining styled-components. Filing this because in our monorepo the 6.4.2 → 6.4.3 bump added enough tsc pressure to start OOMing our dev-server type checker. Feel free to close if you knew about the trade-off and decided it was worthwhile so this is WAI. We bisected on the same commit and same lockfile, swapping only styled-components between 6.4.2 and 6.4.3, running `tsc --extendedDiagnostics --noEmit` cold each time (deleted `.tsbuildinfo` before every run, alternated the order A→B→A→B to rule out caching artifacts):
内容来源: styled-components/styled-components