Skip to content

Improve package output for tree shaking#293

Draft
krowvin wants to merge 3 commits into
mainfrom
tree-shaking-improvements
Draft

Improve package output for tree shaking#293
krowvin wants to merge 3 commits into
mainfrom
tree-shaking-improvements

Conversation

@krowvin

@krowvin krowvin commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Improves the library package output so consumers can import smaller parts of Groundwork without pulling the whole bundle:

  • publish preserved ESM modules alongside the existing UMD build
  • expose component, composite, hook, and utility subpaths
  • move CSS to an explicit stylesheet entry
  • lazy-load heavier footer image assets

Bundle check

Package pack size:

Package Before After
Packed tarball 4.65 MB 4.55 MB
Unpacked package 7.45 MB 7.05 MB

Representative downstream bundle:

Import Before After Gzip before Gzip after
Button from @usace/groundwork 368.9 KB 244.0 KB 115.1 KB 75.7 KB

Validation

  • npm run build-lib
  • npm run build
  • packed the library and tested representative downstream bundles

Related: #191, #218, #221, #179

@github-actions

Copy link
Copy Markdown

Please set a versioning label of either major-bump, minor-bump, or patch-bump to the pull request.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant