[英]How to update a dependency within a dependency?
Add a resolutions field to your package.json file and define your version overrides.将分辨率字段添加到您的 package.json 文件并定义您的版本覆盖。
It will look like this它看起来像这样
{
...
"dependencies": {
...
},
"devDependencies": {
...
},
"resolutions": {
"EXAMPLE_PACKAGE": "EXAMPLE_PACKAGE_NEEDED_VERSION"
}
}
It shouldn't update the package in the dependency.它不应该更新依赖项中的包。 But your application will use the needed version.
但是您的应用程序将使用所需的版本。 It can be useful for example if some dependencies in your dependency have important security updates, and your dependency has not updated the version yet.
例如,如果您的依赖项中的某些依赖项具有重要的安全更新,而您的依赖项尚未更新版本,则它会很有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.