-
Notifications
You must be signed in to change notification settings - Fork 259
Use Purgecss to reduce the size of our CSS #1291
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
Conversation
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.
🍹 The Update (preview) for stack pulumi/www.pulumi.com/staging was successful.
Resource Changes
Name Type Operation
~ docs/reference/pkg/nodejs/pulumi/aws/ec2transitgateway/rss.xml aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/nodejs/index.html aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/nodejs/pulumi/azure/cognitive/rss.xml aws:s3/bucketObject:BucketObject update
~ blog/author/joe-duffy/page/1/index.html aws:s3/bucketObject:BucketObject update
~ docs/quickstart/azure/install-pulumi/index.html aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/nodejs/pulumi/kubernetes/batch/v1/index.html aws:s3/bucketObject:BucketObject update
~ blog/pulumi-now-supports-atlassian-identity/index.html aws:s3/bucketObject:BucketObject update
~ blog/getting-to-chatops-with-pulumi-webhooks/index.html aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/nodejs/pulumi/gcp/storage/rss.xml aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/python/pulumi_aws/elasticloadbalancingv2/index.html aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/nodejs/pulumi/gcp/filestore/index.html aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/nodejs/pulumi/kubernetes/node/v1alpha1/rss.xml aws:s3/bucketObject:BucketObject update
~ blog/tag/logging/index.html aws:s3/bucketObject:BucketObject update
~ docs/reference/tutorials/aws/index.html aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/python/pulumi_gcp/accesscontextmanager/index.html aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/python/pulumi_packet/rss.xml aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/python/pulumi_f5bigip/config/rss.xml aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/python/pulumi_kubernetes/apiextensions/rss.xml aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/python/pulumi_kubernetes/helm/v2/index.html aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/nodejs/pulumi/aws/dms/rss.xml aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/nodejs/pulumi/kubernetes/authentication/index.html aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/python/pulumi_aws/kms/index.html aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/python/pulumi_aws/macie/rss.xml aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/nodejs/pulumi/aws/ebs/rss.xml aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/python/pulumi_aws/storagegateway/rss.xml aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/python/pulumi_gcp/composer/index.html aws:s3/bucketObject:BucketObject update
~ docs/quickstart/gcp/install-pulumi/index.html aws:s3/bucketObject:BucketObject update
~ blog/tag/aws/page/3/index.html aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/nodejs/pulumi/f5bigip/rss.xml aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/nodejs/pulumi/gcp/dns/rss.xml aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/nodejs/pulumi/azure/datafactory/index.html aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/nodejs/pulumi/kubernetes/types/version/index.html aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/nodejs/pulumi/aws/codebuild/rss.xml aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/nodejs/pulumi/kubernetes/node/index.html aws:s3/bucketObject:BucketObject update
~ docs/aws/iam/index.html aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/index.html aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/python/pulumi_azure/msi/rss.xml aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/python/pulumi_kubernetes/rbac/rss.xml aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/nodejs/pulumi/docker/index.html aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/nodejs/pulumi/kubernetes/apiregistration/v1/rss.xml aws:s3/bucketObject:BucketObject update
~ docs/reference/pkg/nodejs/pulumi/openstack/sharedfilesystem/rss.xml aws:s3/bucketObject:BucketObject update
... and 1871 other changes
chrsmith
left a comment
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.
If this works well, and we are confident this won't remove CSS classes that we do use. (e.g. from styles that get added dynamically) then it seems like a good thing to do.
Though I'd be curious to know what the expected file size savings are. Since if it is minor, I'd be inclined to hold off on hooking this up for now since there is a non-zero risk of adding it.
| module.exports = { | ||
| plugins: [ | ||
| // TailwindCSS | ||
| // TailwindCSS. |
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.
Nit: If a comment is a complete sentence, like on line 11, we'll want proper grammar. (Begin with a capital letter, end with a period.) But for a trivial comment like this, no need to add a period at the end.
| preset: 'default', | ||
| }) | ||
| // Use the following plugins when not building for "development": | ||
| ...process.env.NODE_ENV !== "development" ? [ |
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.
I am I reading this correctly in that the process.env.NODE_ENV !== "development" : [ ... ] : [] is evaluated first, and then the ... operator expands all of the elements? If so, that's super-subtle and confusing.
Would we instead just want to move this into a package level variable? Like:
// Include css-purgecss on non-dev builds to reduce CSS file size.
let plugins = process.env.NODE_ENV === "development" ? [] : [
];
|
Replaced by #2444 |
Not ready for review yet. Will mark as ready for review when ready, including before/after gzip sizes.
FYI @cnunciato, @chrsmith
Follow-up from #1213