This is a
I'm trying to package a tiny script written for node.js v8.6.0.
It seems that Acorn is unable to parse the object rest spread operator which is supported by v8.6.0.
Is there any way to specify another parser which would be able to read the v8.6.0 code ?
Acorn error: Unexpected token (55:31)
53 return { [k]: v }
54 })
55 .reduce((acc, v) => ({ ...acc, ...v }), {})
56 }
57 }
58 }).argv59
Please also provide:
Hmm, Okay,
In the meantime if it is a simple script (no bundling required) you can use --no-bundle or bundle: false (depending on how you're invoking nexe)
Added support for this in nexe@beta (it should just work)
I think this should be reopened, because the described error is just one case were passing parser options would be useful and sadly it doesn't just work. I'm currently struggling with creating a bundle that includes browsersync because I can't pass the allow-hash-bang option to Acorn.
So I'm currently stuck with
Acorn error: Unexpected character '#' (1:0)
File: /.../node_modules/browser-sync/index.js
Parser options will likely not be exposed Since the parser could change. But allowing the entry file to have a shebang needs to be added
as I understand, the update to ES2017 should have solverd the issue (#409)
the updated Acorn should now be able to parse spread operator, it was the reason I wanted the update.
Most helpful comment
Parser options will likely not be exposed Since the parser could change. But allowing the entry file to have a shebang needs to be added