-
Notifications
You must be signed in to change notification settings - Fork 262
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
fix: mark @babel/core as optional peer dependency #739
Conversation
package.json
Outdated
@@ -59,6 +59,7 @@ | |||
} | |||
}, | |||
"dependencies": { | |||
"@babel/core": "7.12.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This jsx plugin should use @babel/core
on user side so we don't want it to become dependency.
We can add the meta field to package.json to declare it as optional
"peerDependenciesMeta": {
"@babel/core": {
"optional": true
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the info, did not knew this option existed.
Thanks! |
🎉 This PR is included in version 4.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Fixes The missing dependency error that comes while installing it through
Yarn 2, Yarn 3
.and also fixes #736
Error -
styled-jsx@npm:4.0.0 [78a22] doesn't provide @babel/core (pad17e), requested by @babel/plugin-syntax-jsx
The user needs to add
in .yarnrc.yml even when they're not using this dependency directly, for example while using next.js