As of today there is no support of overriding acorn.parse options.
In the line no: https://github.com/krisselden/ember-cli-optimize/blob/master/lib/optimize.js#L27, only the content is passed to the acorn.parse and no overriding options are passed.
This was also the reason why async/await was breaking earlier and there was no way to override the ecmaVersion so the acorn dependency was bumped.
But with the acorn version bump, the ecmaVersion option is now required and the parse is throwing a warning(see https://github.com/acornjs/acorn/blob/master/acorn/src/options.js#L107).
Currently it is defaulted to 2020 but this might stop working in future.
So I would recommend to provide support for overriding parse options, similar to eager option, like:
As of today there is no support of overriding
acorn.parse
options. In the line no: https://github.com/krisselden/ember-cli-optimize/blob/master/lib/optimize.js#L27, only the content is passed to theacorn.parse
and no overriding options are passed. This was also the reason whyasync/await
was breaking earlier and there was no way to override theecmaVersion
so theacorn
dependency was bumped. But with theacorn
version bump, the ecmaVersion option is now required and the parse is throwing a warning(see https://github.com/acornjs/acorn/blob/master/acorn/src/options.js#L107). Currently it is defaulted to 2020 but this might stop working in future.So I would recommend to provide support for overriding parse options, similar to
eager
option, like: