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

@krowvinkrowvin 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:

PackageBeforeAfter
Packed tarball4.65 MB4.55 MB
Unpacked package7.45 MB7.05 MB

Representative downstream bundle:

ImportBeforeAfterGzip beforeGzip after
Button from @usace/groundwork368.9 KB244.0 KB115.1 KB75.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 freeto 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

@krowvin