-
-
Notifications
You must be signed in to change notification settings - Fork 422
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
@babel/plugin-transform-react-constant-elements not found #232
Comments
I investigated it a bit more and found out that this is happening only with @babel/core@7.1.6. With @babel/core@7.1.5 installed error goes away. |
Can confirm, it would always happen if userland version of babel is higher than one svgr is using. Not sure if it's the best way, but it could be fixed with just replacing each string for babel preset/plugin with What is so special about this plugin if it's not being used anymore in CRA itself? From my view, it seems safe to just use babel-preset-react-app and rely on the same configuration. |
Oh yes, I think the declaration is not good. We will fix it. This plugin is a safe optimisation in our case. So it is important to keep it. |
🐛 Bug Report
I'm having the same issue, that was described here #116. I'm having it only when I'm using my webpack config to run https://github.com/styleguidist/react-styleguidist. It could be an issue with react-styleguidist itself, but since this issue came up before, I decided to start with svgr repo first.
To Reproduce
I just fed my webpack config to react-styleguidist, which has this section
Expected behavior
There shouldn't be errors like
Link to repl or repo (highly encouraged)
I will provide demo in case nothing immediately comes to your mind)
Run
npx envinfo --system --binaries --npmPackages @svgr/core,@svgr/cli,@svgr/webpack,@svgr/rollup --markdown --clipboard
Paste the results here:
P. S. Thank you for the awesome tool)
The text was updated successfully, but these errors were encountered: