-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
async & regeneratorRuntime & (babel?) #3012
Comments
The babel developers have decided this is a parcel bug. I.e. they can use babel cli, the source files I provided them, and my .babelrc and create a valid bundle. See issue: babel/babel#9971 and they cite an open issue with parcel: |
BTW, the solution I am looking for should not load the regenerateRuntime. There is no reason to use it when one is targeting Google Chrome 74+ and MS Edge Chromium 76+ |
It is not only related to regenerator, I have configured babelrc to use "last 1 Chrome version" that already supports var Foo = function Foo(name) {
_classCallCheck(this, Foo);
this.name = name;
};
// [...] when it should leave it untouched as it defined using ES6 classes: class Foo {
constructor(name) {
this.name = name;
}
} I have tried to build the same code and the same .babelrc using babel-cli and the outout is correct with babel-cli. Seems like parcel does not respects the {
"presets": [
["@babel/preset-env", {"targets": {"browsers": "last 1 Chrome versions"}}],
["@babel/preset-react"]
],
"plugins": ["@babel/plugin-proposal-class-properties"]
} |
@niwinz You should use
As for the |
@niwinz Perfect. Thanks this is great. Now we can close this. |
I think parcel should respect the .babelrc config, ignoring it is counterintuitive... |
Is this an issue with babel, or with parcel? I cannot figure that out.
Chrome V74 is complaining when I include this async method into my JSX react file:
Here is the trace:
Here is my babelrc
The text was updated successfully, but these errors were encountered: