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: add assets gzipsize #833

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

akbq2008
Copy link

Summary

1.add assets gzipSize attribute
2.expose gzipSize in /packages/components/src/components/Card/size.tsx

image

Related Links

#772

@CLAassistant
Copy link

CLAassistant commented Mar 20, 2025

CLA assistant check
All committers have signed the CLA.

Copy link

netlify bot commented Mar 20, 2025

Deploy Preview for rsdoctor ready!

Name Link
🔨 Latest commit bb1a662
🔍 Latest deploy log https://app.netlify.com/sites/rsdoctor/deploys/67dc38acad8ae400082a2e51
😎 Deploy Preview https://deploy-preview-833--rsdoctor.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Mar 20, 2025

Deploy Preview for rsdoctor ready!

Name Link
🔨 Latest commit df8ac96
🔍 Latest deploy log https://app.netlify.com/sites/rsdoctor/deploys/67dc38ca2eb18a000805ca27
😎 Deploy Preview https://deploy-preview-833--rsdoctor.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@zackarychapple
Copy link

I believe this should be something that is optional as gzipping each of the files has a performance impact. It is a great feature to add though and most likely will have more configuration options as well.

@chenjiahan chenjiahan requested a review from easy1090 March 24, 2025 02:48
@@ -8,5 +10,8 @@ export function assetsContents(
assets.forEach((asset) => {
const { content = '' } = assetMap.get(asset.path) || {};
asset.content = content;
if (COMPRESSIBLE_REGEX.test(asset.path)) {
asset.setGzipSize(content);
Copy link
Contributor

@easy1090 easy1090 Mar 24, 2025

Choose a reason for hiding this comment

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

To help prevent extensive time-consuming analysis, you might consider enabling the gzip capability by setting options.supports.gzip to open, as it is disabled by default.

options file:https://github.com/web-infra-dev/rsdoctor/blob/main/packages/core/src/inner-plugins/utils/config.ts#L45

@akbq2008
Copy link
Author

I believe this should be something that is optional as gzipping each of the files has a performance impact. It is a great feature to add though and most likely will have more configuration options as well.

I believe this should be something that is optional as gzipping each of the files has a performance impact. It is a great feature to add though and most likely will have more configuration options as well.

ok, good idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants