从 npm 5 开始,执行后就多出了一个 package-lock.json 的文件,如果在用 yarn 的话,就会有个疑惑,yarn.lock 和这个 package-lock.json 到底用哪个呢?要不要保存入 git 库呢? 通过参考这两个链接: Should I commit yarn.lock and package-lock.json files? Idea: support package-lock.json from npm 5 得到信息如下: 都是为了记录准确的版本,使用时最好二选一,开发团队内部协商一致后,把另一种舍弃,即尽量不要……

阅读全文