Skip to content

fix(package): exclude test files and examples from published package#425

Merged
cchanxzy merged 1 commit into
mainfrom
fix/trim-published-files
Mar 18, 2026
Merged

fix(package): exclude test files and examples from published package#425
cchanxzy merged 1 commit into
mainfrom
fix/trim-published-files

Conversation

@cchanxzy
Copy link
Copy Markdown
Owner

Trim published npm package files

Summary

  • Tighten the files field in package.json to exclude test files and the examples app from the published package

Why

The previous src/**/* glob was including everything under src/ — test files, snapshots, and the examples app — none of which are useful to consumers. This unnecessarily inflated the package.

Result

Before After
Unpacked size 274 kB 167 kB
Total files 78 42

What's included

  • dist/**/* — ESM/CJS bundles, source maps, and type declarations
  • src/components/**/*.ts / *.tsx — component source files (useful for source map debugging)
  • src/index.ts — public entry point
  • Tests, snapshots, and src/examples/ are excluded

@cchanxzy cchanxzy merged commit 8902a67 into main Mar 18, 2026
5 checks passed
@cchanxzy cchanxzy deleted the fix/trim-published-files branch March 18, 2026 08:09
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 4.0.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant