mirror of
https://github.com/millionco/react-doctor.git
synced 2026-09-14 20:00:24 +08:00
77a1a2e8c6
Reaching the ~10 MB CommonJS typescript bundle through a static ESM import
makes Node sniff the module format and run cjs-module-lexer over the whole
file on every start (~130ms, not covered by the compile cache). A small
rolldown plugin rewrites the bundled import to createRequire(...)('typescript');
source keeps 'import ts from "typescript"' so types are unchanged.
bin --version: ~445ms -> ~330ms.
Co-Authored-By: aiden@million.dev <aiden.bai05@gmail.com>