Skip to content
New issue

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

Non-transpiled async functions fail to parse #2341

Closed
Karolusrex opened this issue Jul 24, 2017 · 5 comments
Closed

Non-transpiled async functions fail to parse #2341

Karolusrex opened this issue Jul 24, 2017 · 5 comments

Comments

@Karolusrex
Copy link

JSPM Version: $ jspm --version

0.17.0-beta.31

Transpiler Plugin(s): babel / traceur / typescript / I do not use a transpiler

babel

Details:

When turning off transformation of async functions, by modifying the babelOptions in jspm.config.js, the build fails due to parsing error in the rollup library.

The output when trying to build is then something like this:

err SyntaxError: Unexpected token (354:10) in [path/to/filename.js]

My fix: Adding to systemjs-builder/lib/builder.js on this line and inserting the options

acorn: {
            allowReserved: true,
            ecmaVersion: 8
        }

I'm not too deep into the code, don't really feel to sure if making a pull request on this is the right way to go. Furthermore, I might be posting this issue in the wrong repo. In that case, my apologies.

Thanks!

Karl

@guybedford
Copy link
Member

@Karolusrex thanks so much for sharing, do you think you could provide a PR to the builder with this fix?

@Karolusrex
Copy link
Author

Alright, sure. systemjs/builder#825

@guybedford
Copy link
Member

Thanks! The release cycle will likely be in the next week or so.

@Karolusrex
Copy link
Author

Thanks a lot for your work

@guybedford
Copy link
Member

Released in 0.17.0-beta.44.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants