next.js
3db946de - Turbopack: Track variable usage inside of visit_assign_target_pat (#81654)

Commit
275 days ago
Turbopack: Track variable usage inside of visit_assign_target_pat (#81654) Fixes #81462 ## Bug Report > Turbopack does not recognise such pattern: ```ts const func = () => { return { bool: true }; }; let bool = false; ({ bool } = func()); // This is not recognised ``` > This means `bool` variable will be reassigned. But turbopack will convert later usage of this ```ts if(bool) { // Whatever here return 123; } ``` > To this: ```js if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; ```
Author
bgw bgw
Parents
Loading