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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log brotli-compressed size of output files #95

Merged
merged 1 commit into from
May 8, 2020
Merged

Log brotli-compressed size of output files #95

merged 1 commit into from
May 8, 2020

Conversation

bates64
Copy link
Contributor

@bates64 bates64 commented May 8, 2020

Most sites will serve with brotli compression to browsers which support it (i.e. all modern ones). Logging just the uncompressed size is somewhat disingenuous; pika.dev and friends show compressed sizes by default as it is true what most users will actually download.

Example output:

$ vite build
vite v0.13.0
\ Building for production...
[write] dist\assets\index.js 8.41kb, brotli: 3.15kb
[write] dist\assets\style.css 0.00kb, brotli: 0.00kb
[write] dist\index.html 0.22kb, brotli: 0.10kb
Build completed in 1.10s.

On the very small app I tested this on, calculating brotli sizes added ~3% to the build time.

@yyx990803 yyx990803 merged commit b7f5ad2 into vitejs:master May 8, 2020
@bates64 bates64 deleted the brotli-size branch May 8, 2020 21:47
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.

2 participants