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

feat(reporter): show gzip info for all compressible files (fix #11288) #12485

Merged

Conversation

mojoaxel
Copy link
Contributor

Description

This is a fix/feature-update for #11288

The reporter plugin should show gzip information not only for js and css files but also for other compressible files like svg, html.

Additional context

see #11288 (comment)


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the PR Title Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

We need to further discuss the liste of file-extensions we want to show the gzip information for.

@stackblitz
Copy link

stackblitz bot commented Mar 19, 2023

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

@mojoaxel
Copy link
Contributor Author

@ArnaudBarre Please let me know if I can improve anything. This is my first PR, here 🎉

ArnaudBarre
ArnaudBarre previously approved these changes Mar 19, 2023
Copy link
Member

@ArnaudBarre ArnaudBarre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!
WDYT @patak-dev?

@bluwy bluwy added the p2-nice-to-have Not breaking anything but nice to have (priority) label Mar 21, 2023
@bluwy bluwy linked an issue Mar 21, 2023 that may be closed by this pull request
7 tasks
@mojoaxel mojoaxel force-pushed the 11288-show-gzip-info-for-all-compressible-files branch from 0378c91 to afba870 Compare March 21, 2023 16:07
@mojoaxel mojoaxel requested review from bluwy and ArnaudBarre and removed request for bluwy March 21, 2023 16:08
@mojoaxel mojoaxel force-pushed the 11288-show-gzip-info-for-all-compressible-files branch from afba870 to 51a46da Compare March 21, 2023 16:21
@mojoaxel mojoaxel requested a review from bluwy March 21, 2023 16:49
@patak-dev patak-dev merged commit 03502c8 into vitejs:main Mar 23, 2023
12 checks passed
@chung-leong
Copy link

.wasm files are generally highly compressible as well. One file I have went from 89.3K to 20.1K after gzip. It'd be nice to see that extension included as well.

@mojoaxel
Copy link
Contributor Author

.wasm files are generally highly compressible as well. One file I have went from 89.3K to 20.1K after gzip. It'd be nice to see that extension included as well.

Feel free to add wasm to COMPRESSIBLE_ASSETS_RE here https://github.com/vitejs/vite/blob/main/packages/vite/src/node/plugins/reporter.ts#L28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Missing gzip information for HTML files in build logs output
5 participants