Now we have the prepare
entry on package.json
, which allow this Git repository to be used as a dependency. More on this here.
How to replace minimist
with minimist-lite
in transitive dependencies
with NPM v8+
You will use the Git URLs as dependencies feature. Note that this requires git
- add this entry in your
package.json
:
"overrides": {
"minimist": "git+https://github.com/meszaros-lajos-gyorgy/minimist-lite#semver:^2.2.1"
}
rm -f package-lock.json
npm install
- Check out the result:
grep name node_modules/minimist/package.json
. Should showminimist-lite
instead
with Yarn v1
You will use the resolutions
feature along with the npm
protocol.
- add this entry in your
package.json
:
"resolutions": {
"minimist": "npm:minimist-lite@^2.2.1"
}
yarn install
- Check out the result:
grep name node_modules/minimist/package.json
. Should showminimist-lite
instead