diff --git a/lib/6to5/util.js b/lib/6to5/util.js index 6afcdef2c7..cc33a85911 100644 --- a/lib/6to5/util.js +++ b/lib/6to5/util.js @@ -221,14 +221,15 @@ exports.parse = function (opts, code, callback) { var tokens = []; var ast = acorn.parse(code, { - allowReturnOutsideFunction: true, - ecmaVersion: opts.experimental ? 7 : 6, - playground: opts.playground, - strictMode: true, - onComment: comments, - locations: true, - onToken: tokens, - ranges: true + allowImportExportEverywhere: true, + allowReturnOutsideFunction: true, + ecmaVersion: opts.experimental ? 7 : 6, + playground: opts.playground, + strictMode: true, + onComment: comments, + locations: true, + onToken: tokens, + ranges: true }); estraverse.attachComments(ast, comments, tokens); diff --git a/package.json b/package.json index cae908fc1d..39c62d068a 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "test": "make test" }, "dependencies": { - "acorn-6to5": "0.9.1-14", + "acorn-6to5": "0.9.1-16", "ast-types": "~0.6.1", "chokidar": "0.11.1", "commander": "2.5.0",