We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Exporting an async function with await keyword inside cause rollup-plugin-closure-compiler to report this error:
await
SyntaxError: Cannot use keyword 'await' outside an async function
test/export-default/async-function.test.js
import { generator } from '../generator'; generator('export-default', 'async-function', false, ['esm'], {stable: {}});
Keep everything the same as the rest of the tests, except for making language_out as default to avoid polyfills, which simplifies the test.
language_out
export async function asyncTest() { await Promise.resolve('async-test'); console.log('async-test') } export async function asyncTestWithArgument(argument) { await Promise.resolve('async-test-with-argument'); console.log(argument) }
We'll likely need to know:
Unhandled rejection in test/export-default/async-function.test.js /workspaces/rollup-plugin-closure-compiler/node_modules/acorn/dist/acorn.js:2927 SyntaxError: Cannot use keyword 'await' outside an async function (1:21) Parser.pp$4.raise (node_modules/acorn/dist/acorn.js:2927:15) Parser.pp$3.checkUnreserved (node_modules/acorn/dist/acorn.js:2853:16) Parser.pp$3.parseIdent (node_modules/acorn/dist/acorn.js:2883:12) Parser.pp$3.parseExprAtom (node_modules/acorn/dist/acorn.js:2254:21) Parser.pp$3.parseExprSubscripts (node_modules/acorn/dist/acorn.js:2129:21) Parser.pp$3.parseMaybeUnary (node_modules/acorn/dist/acorn.js:2106:19) Parser.pp$3.parseExprOps (node_modules/acorn/dist/acorn.js:2041:21) Parser.pp$3.parseMaybeConditional (node_modules/acorn/dist/acorn.js:2024:21) Parser.pp$3.parseMaybeAssign (node_modules/acorn/dist/acorn.js:1997:21) Parser.pp$3.parseExpression (node_modules/acorn/dist/acorn.js:1963:21)
If this is a feature request you can use this section to point to a prototype/mockup that will help us understand the request.
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What's the issue?
Exporting an async function with
await
keyword inside cause rollup-plugin-closure-compiler to report this error:How do we reproduce the issue?
test/export-default/async-function.test.js
Keep everything the same as the rest of the tests, except for making
language_out
as default to avoid polyfills, which simplifies the test.We'll likely need to know:
As mentioned above, default options.
If this is a feature request you can use this section to point to a prototype/mockup that will help us understand the request.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: