npm 5 introduced package-lock.json
, of which the documentation is here.
It states that the file is intended to be included with version control, so anyone cloning your package and installing it will have the same dependency versions. In other words, you should not add it to your .gitignore
file.
What it does not state is wether or not the file is intended to be included with a published package. This question could be rephrased as; should package-lock.json
be included in .npmignore
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…