bublejs / buble

https://buble.surge.sh
MIT License
871 stars 67 forks source link

feature request: allow options in Buble playground #181

Closed trusktr closed 5 years ago

trusktr commented 5 years ago

There's no options!

I wanted to try stuff, but I get

for...of statements are not supported. Use `transforms: { forOf: false }` to skip transformation and disable this error, or `transforms: { dangerousForOf: true }` if you know what you're doing (3:0)

and there's no way to configure it that I can see.

trusktr commented 5 years ago

I wanted to see what is the output of

const array = [[1,2],[3,4]]

for (const [one, two] of array) {
    foo(one, two)
}

Destructuring isn't working there.

I'm using both Babel and Buble, so I'm trying to figure out in order to make that code work I have to write

const array = [[1,2],[3,4]]

for (const entry of array) {
    const [one, two] = entry
    foo(one, two)
}
adrianheine commented 5 years ago

I know, I'm sorry. This has already been brought up in Rich-Harris/buble-demo#2.