When publishing a package to npm, it is best to limit the packaged files to the README, the LICENSE, and package.json (all automatically included), plus the distribution files.
These are the only files that users need
It helps keep the package size down
Including irrelevant stuff like your tsconfig or eslint config or github workflow can actually harm users - for example, right now I'm running into issues with your tsconfig
It's super easy to do this! Just add the following to the package.json:
"files": [
"CHANGELOG.md",
"dist"
],
This way, it's not the entire repository that gets uploaded to NPM - just the transpiled production-ready code.
When publishing a package to npm, it is best to limit the packaged files to the
README
, theLICENSE
, andpackage.json
(all automatically included), plus the distribution files.It's super easy to do this! Just add the following to the
package.json
:This way, it's not the entire repository that gets uploaded to NPM - just the transpiled production-ready code.