next.js
73fadcac - Turbopack: don't look into fallback import map twice (#82786)

Commit
132 days ago
Turbopack: don't look into fallback import map twice (#82786) Fixes a panic where we tried to lookup a `Pattern::Alternatives` in a `fallback_import_map.lookup()` (but the API is that the caller is in charge of unwrapping the alternative and calling lookup multiple times). We can completely skip this in this case, because the individual requests inside the `Request::Alternatives` already looked at the `fallback_import_map`, so no need to check again for the whole alternative as well. This was a somewhat recent regression: - https://github.com/vercel/next.js/pull/77954 made sure that `var` variables always have a `<dynamic>` variant added, due to their weird scope rules (or lack thereof). - https://github.com/vercel/next.js/pull/81541 then added a `fallback_import_map`
Author
Parents
Loading