fix(npm): local nodeModulesDir was sometimes resolving duplicates of same package (#23320)

This commit is contained in:
David Sherret 2024-04-11 13:18:19 -04:00 committed by GitHub
parent 061bcb5393
commit df73db671b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 45 additions and 5 deletions

View file

@ -0,0 +1,10 @@
// this previously was ending up with two preacts and would crash
import { useMemo } from "preact/hooks";
import renderToString from "preact-render-to-string";
function Test() {
useMemo(() => "test", []);
return <div>Test</div>;
}
const html = renderToString(<Test />);