Skip to content

Exclude test files from npm package#165

Closed
veksen wants to merge 1 commit intorvagg:masterfrom
veksen:exclude-tests-from-npm
Closed

Exclude test files from npm package#165
veksen wants to merge 1 commit intorvagg:masterfrom
veksen:exclude-tests-from-npm

Conversation

@veksen
Copy link

@veksen veksen commented Feb 9, 2026

Summary

Adds a .npmignore to exclude the test/ directory from the published npm package.

The test files (~48KB) are shipped to npm but serve no purpose for consumers. With ~53M weekly downloads, excluding them reduces aggregate bandwidth.

Changes

  • Added .npmignore with test

The `test/` directory is currently shipped to npm but serves no
purpose for package consumers. This adds an `.npmignore` to exclude
it from the published package.
@rvagg
Copy link
Owner

rvagg commented Feb 9, 2026

Sorry, I like test files in my published packages, they represent documentation that describes the expected api. This is intentional.

@rvagg rvagg closed this Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants