-
-
Notifications
You must be signed in to change notification settings - Fork 22
chore: Measure tree-shakeability in CI #1775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
pkg.pr.new packages
benchmark commit |
Bundler efficiency reportexample1.tsimport { f32, sizeOf } from 'typegpu/data';
console.log(sizeOf(f32));
example2.tsimport * as d from 'typegpu/data';
console.log(d.sizeOf(d.f32));
example3.tsimport tgpu from 'typegpu';
console.log(tgpu.resolve({ externals: {} }));
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a test application for measuring and comparing the tree-shaking and bundling efficiency of different JavaScript bundlers (tsdown
, esbuild
, webpack
) for the typegpu
package as part of CI automation.
- Adds a dedicated treeshake-test application with utilities for bundling and measuring output sizes
- Creates three example TypeScript files to test different import patterns from the typegpu package
- Implements a GitHub Actions workflow to run tree-shaking tests on pull requests
Reviewed Changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
apps/treeshake-test/utils.ts | Core bundling utilities for esbuild, webpack, and tsdown with size measurement and markdown report generation |
apps/treeshake-test/index.ts | Main test runner that processes examples and generates results |
apps/treeshake-test/package.json | Package configuration with bundler dependencies |
apps/treeshake-test/tsconfig.json | TypeScript configuration for the test app |
apps/treeshake-test/tsdown.config.ts | Configuration for tsdown bundler |
apps/treeshake-test/examples/*.ts | Three test files demonstrating different import patterns |
apps/treeshake-test/.gitignore | Ignores build output and results |
.github/workflows/treeshake-test.yml | CI workflow for automated tree-shaking tests |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Changes
This PR introduces a test application for measuring and comparing the tree-shaking and bundling efficiency of different JS bundlers (
tsdown
,esbuild
,webpack
) for thetypegpu
package.Closes #1747