4 ms·
> foo could mean foo/index.js, foo.js at the minimum. So you have 2x the lookups. Only in the worst case. If it's foo.js there's only one lookup. > Oh no, wa
by simlevesque 2y ago
> foo could mean foo/index.js, foo.js at the minimum. So you have 2x the lookups.
Only in the worst case. If it's foo.js there's only one lookup.
> Oh no, wait we also potentially have mjs, cjs, jsx, ts and tsx. So 12 times the stat checking for each import.
Again, you're only taking into account the worst case.