在使用NPM包时,可以设置NPM的缓存位置并下载依赖包,然后将NPM包的依赖项更改为本地下载的依赖包的路径,从而避免自动下载。
示例代码:
npm install --cache /path/to/cache
"dependencies": { "": "file:/path/to/dependency" }
上一篇:避免自动下载log4j-to-slf4j
下一篇:避免字符串被强制转换为整型时出现异常