Users of uglify-es, can you enlighten me what’s supposed to happen to `const`? `var` is obviously shorter so is there any reason it doesn’t compile down?
-
Show this thread
-
Replying to @dan_abramov
It should be safe (a sound transformation) to compile const to var as long as there's no mutations to the variable, no eval, and no hoisted functions. With hoisted functions, you also need to confirm that they definitely aren't called before initialization.
1 reply 0 retweets 0 likes -
Replying to @wycats @dan_abramov
Would it be safer to compile to `let`?
2 replies 0 retweets 0 likes
Replying to @VilleImmonen @dan_abramov
Compiling to let would eliminate the TDZ problem, so yes.
12:35 PM - 13 Jan 2018
0 replies
0 retweets
2 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.