We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b4ae46 commit 5436dc5Copy full SHA for 5436dc5
source/loaders/node_loader/bootstrap/lib/bootstrap.js
@@ -266,8 +266,8 @@ function node_loader_trampoline_discover_function(func) {
266
if (node_loader_trampoline_is_callable(func)) {
267
// Espree can't parse native code functions so we can do a workaround
268
const str = func.toString().replace('{ [native code] }', '{}');
269
- const ast = espree.parse(str, {
270
- ecmaVersion: 13
+ const ast = espree.parse(`(${str})`, {
+ ecmaVersion: 14
271
});
272
273
const node = (ast.body[0].type === 'ExpressionStatement') ?
0 commit comments