How do I specify a branch for an npm package in dependencies


#1

I want to use a specific branch of a node package but can’t figure out where to add its name in the dependencies setting.

I’d like something like this:

“name@branch”: “^0.12.0”

Is it possible or should I use some other way to automatically add it to the package?

Package is: npm install vue@csp


#2

Just take a look at the official documentation:

https://docs.npmjs.com/files/package.json#git-urls-as-dependencies


#3

thanks, it seems instead of git url I can use “name”: “tag”