mirror of
https://github.com/millionco/react-doctor.git
synced 2026-09-14 20:00:24 +08:00
695bb35e55
The require-typescript build plugin evaluated the ~10 MB TypeScript bundle at module link time in every bundle that imports it, including the CLI's scan chunk, on runs that never call it (a whole-repo cache hit, --version). The virtual module now exports a live let binding that starts as a Proxy and swaps itself for the real module on the first property read, so later reads hit the module directly. No bundle reads the binding at module scope. Measured together with the lazy CLI dependency loads: ant-design whole-repo cache hit 188 -> 152 ms (-19%), no-cache -3%.