NPM后备依赖性URL



我的项目中有一个npm依赖性,该依赖性指向私人git repo。不幸的是,Git Repo链接在我的本地中不起作用,但是当我们进行Jenkins构建时,它可以正常工作,因为该Git Repo链接仅允许某些白名单IP(即Jenkins IP地址(。

我已经研究了Apache Proxypass和Verdaccio,但我不确定这是否是适合此的方法

dependencies": {
    "api-module": "git+https://example/repo-name.git",
},

本地,我希望https://example/repo-name.git在我进行NPM安装时路由到https://differentUrl/repo-name.git,但不想更新软件包。JSON

我必须设置主机条目并为该

提供别名

最新更新