Unfortunately, IE 11 does not support const (or let) in for..in loops (see
the kangax compat table). With buble, const is not transformed to var for --target ie:11. So this kind of code breaks:
$ echo 'for (const foo in bar) {}' > input.js
$ npx buble input.js --target ie:11
for (const foo in bar) {}
The most conservative change would be to flip the letConst bit for IE 11. For example:
Unfortunately, IE 11 does not support
const
(orlet
) infor..in
loops (see the kangax compat table). With buble,const
is not transformed tovar
for--target ie:11
. So this kind of code breaks:The most conservative change would be to flip the
letConst
bit for IE 11. For example:I'd be happy to propose a PR if this or another solution would be accepted.