-
Notifications
You must be signed in to change notification settings - Fork 56
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for rsdoctor ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for rsdoctor ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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. |
@@ -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); |
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.
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
ok, good idea |
Summary
1.add assets gzipSize attribute
2.expose gzipSize in /packages/components/src/components/Card/size.tsx
Related Links
#772