最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Why `resolutions` does not be supported in package.json same as bower.json - Stack Overflow

programmeradmin4浏览0评论

As we know, the resolutions is used to solve Dependency versions to automatically resolve with if conflicts occur between packages. in bower.json.

After searching this package.json page, I did not find the resolutions is supported in it. Is there any reason why resolutions should not be here or am I missing something?

As we know, the resolutions is used to solve Dependency versions to automatically resolve with if conflicts occur between packages. in bower.json.

After searching this package.json page, I did not find the resolutions is supported in it. Is there any reason why resolutions should not be here or am I missing something?

Share Improve this question asked Nov 11, 2015 at 12:41 zangwzangw 48.7k23 gold badges208 silver badges243 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 2

It's not in the package.json specification because it's part of the bower.json specification, which is different. bower.json files are included in packages you install with bower, not npm. So if I say:

bower install jquery

Then bower.json will be in ./bower_ponents/jquery directory.

Yarn does have the resolutions feature though, see doc here

yarn install --flat

Only allow one version of a package. On the first run this will prompt you to choose a single version for each package that is depended on at multiple version ranges. These will be added to your package.json under a resolutions field.

发布评论

评论列表(0)

  1. 暂无评论