Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script to generate bundle sizes #474

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

bjorntheart
Copy link
Contributor

@bjorntheart bjorntheart commented Feb 26, 2024

This PR fixes #25.

To generate the bundle size report, run npm run bundle:sizes.

I've attached the generated bundle-sizes.json file as an example.

The structure of the size objects are as follows:

/**
 * @typedef {Object} Size
 * @propety {number} raw - Unminified size in bytes
 * @property {string} size - Unminified size in KiB
 * @property {string} minified - Minified size in KiB
 * @property {string} brotli - Brotli compressed minified size in KiB
 * @property {string} gzip - Gzip compressed minified size in KiB
 */

To calculate the brotli and gzip compression sizes I added two packages brotli-size and gzip-size .

@argyleink looks like I found some time to finish this after all 馃槄

Add script to generate bundle sizes
Copy link

stackblitz bot commented Feb 26, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@argyleink argyleink merged commit b4f75ba into argyleink:main Feb 26, 2024
2 checks passed
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.

Automate bundle size report in docsite
2 participants