lazy-imports-that-collide
This fails the run. Where it is wrong about your code, // ramonda-check-ignore <reason> on the line says so, and the reason is printed on every run.
Reported when two lazy functions are written identically but name different modules — the module cache is keyed by the function's source, so one entry has to serve both.
The framework reports the same fault while running, as RMD049 — but only once the line actually runs. This is the same fault proved from the source instead.
AsyncLoad keys its module cache on the SOURCE of the lazy it is given, which is right
until two of them are written identically. () => import("./Panel") is one string and a
different module in every directory it appears in, so both sites land on one cache entry.
The runtime notices and mints a second key, so nothing renders wrong — but it can only notice once both have actually rendered, in a development build. From the source both are visible at once.
Give one of them a cacheKey. It is the app saying which entry it means, and it is believed
by the runtime and by this rule alike.
Next
- All rules — the other checks this one runs beside.
- Checking your app — how to run it, and what it proves.