New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Browserifying a file with for-of does not work #1146
Comments
It isn't supported by browserify: browserify/browserify#1146
acorn allows: var src = 'const xs = [1,2,3]\n'
+ 'for (let x in xs) console.log(x)'
var acorn = require('acorn');
console.log(acorn.parse(src, { ecmaVersion: 6 })); but not: var src = 'const xs = [1,2,3]\n'
+ 'for (const x in xs) console.log(x)'
var acorn = require('acorn');
console.log(acorn.parse(src, { ecmaVersion: 6 })); I'm not sure if that's an acorn bug or the spec doesn't allow an iterator variable to be a constant. Anyways it might be good to raise with acorn since all of the underlying packages use acorn now. |
for-of, not for-in :) |
I can't confirm just by browsing GitHub but my guess is this was fixed in a more recent acorn version than the 0.9.0 that detective uses. @RReverser do you know if acorn supports for-of these days? |
I wish acorn was at 1.0.0 already so I could just depend on |
Me too: acornjs/acorn#209 |
Same issue with const vs let or var: x1.js: const xs = [1,2,3]
for (let x of xs) console.log(x) x2.js: const xs = [1,2,3]
for (const x of xs) console.log(x)
|
Closing in favor of acornjs/acorn#213. |
It isn't supported by browserify: browserify/browserify#1146
Now that the browserify bug browserify/browserify#1146 is fixed we can do browser tests builds again
Now that the browserify bug browserify/browserify#1146 is fixed we can do browser tests builds again. Fixes #339.
Throws a "error: parsing file", seems to originate in module-deps.
The text was updated successfully, but these errors were encountered: