简体   繁体   中英

How to specify project npm registry inside package.json file

I am working on multiple projects at the same time and the node module registry for different projects are not the same.

For example, all modules for project A are from http://registroy.foo.com and modules for project B are all from http://registroy.bar.com

Is there a way we can specify the registry we want to use for the project inside package.json file, something like source defined inside a Gemfile in Ruby.

不,但您可以在项目的根目录中使用.npmrc文件来指定registry

registry=http://registroy.foo.com

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM