I saw a solution for npm to change version prefix https://docs.npmjs.com/misc/config#save-prefix. What's the solution for yarn to not add caret?
I'd like to configure it not globally, but only for current project, if possible.
So, when I run something like yarn add --dev webpack
, it saves its version as "webpack": "3.6.0"
, not "webpack": "^3.6.0"
.
For anyone looking for a Yarn 2
solution, add .yarnrc.yml
with the following content:
defaultSemverRangePrefix: ""
Reference: https://yarnpkg.com/configuration/yarnrc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With