-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
gulp-babel@8 babel@7 can not transform jsx to js #168
Comments
I don't see anything obviously wrong with your code. Would you be able to make a small repository that recreates the issue? |
Oh, I have figure out what the problem it is. The *.jsx file use static property in the class, so the .babelrc file should config the plugins of @babel/plugin-proposal-class-properties, just like the below: {
"presets": ["@babel/preset-env", "@babel/preset-react"],
"plugins": [
"@babel/plugin-syntax-export-default-from",
"@babel/plugin-proposal-export-default-from",
["@babel/plugin-proposal-decorators", {"legacy": true}],
"@babel/plugin-proposal-class-properties"
]
} |
@lanyuechen you are right, thank you, this is exactly what I need. |
Yeah, I don't think our default error reporting is very good right now. We have #121 filed to explore that more, but there hasn't been anything real done. |
@loganfsmyth Thank you anyway, I will close this issue soon, have a nice day. |
Hello,I have some problem when I update babel and gulp-babel to the latest, I can`t transform jsx to js.
This is my gulpfile.js:
This is my package.json:
This is my .babelrc:
when I run gulp, I got this
The jsx-type-file did not be compiled, I want to know what should I modify my code can get corret result. I would be very happy if someone can help me.
Thanks.
The text was updated successfully, but these errors were encountered: