npm 16 🌐 .npmignore vs .gitignore and files Field
Publishing a package to the npm registry involves a decision that is easy to get wrong: which files from the project directory end up in the published tarball. Three mechanisms compete for this decision—.gitignore, .npmignore, and the files field in package.json—and their precedence rules are not intuitive. A .gitignore entry that excludes a secrets file…