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

Passing in options does not seem to work. #9

Closed
ronnross opened this issue Dec 11, 2014 · 3 comments
Closed

Passing in options does not seem to work. #9

ronnross opened this issue Dec 11, 2014 · 3 comments

Comments

@ronnross
Copy link

I'm attempting to set runtime = true for the use of generators in the 6to5-loader. It looks like this:
{ test: /\.jsx$/, loader: '6to5-loader?runtime=true' }

I get an error Uncaught ReferenceError: regeneratorRuntime is not defined

Is there another way that I'm missing to pass in options?

@sebmck
Copy link
Contributor

sebmck commented Dec 11, 2014

You don't enable generators via runtime. They're enabled by default.

@Couto
Copy link
Member

Couto commented Dec 11, 2014

Due this issue, I actually found that webpack assumes 6to5-loader?runtime=true as a string instead of a boolean, which would result in a call to 6to5 similar to:

to5.transform("code();", {
  runtime: "true"
});

that would mess up with the generated output.

A patched version has been published to npm.

@sebmck
Copy link
Contributor

sebmck commented Dec 11, 2014

@ronnross You need either the regenerator runtime or the 6to5 polyfill.

@sebmck sebmck closed this as completed Dec 11, 2014
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

3 participants