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

As we know, the resolutions is used to solve Dependency versions to automatically resolve with if confl

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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744335500a4569095.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信