Exclude main.min.css from preprocessing and minification

Created on 26 October 2025, 2 days ago

Problem/Motivation

main.min.css is 48kb and pre-minified.

When visiting multiple different pages in Drupal CMS, CSS from components and similar gets conditionally added to CSS aggregates. This means that main.min.css can end up being included in multiple different aggregates.

You can see this in 📌 Add performance tests Needs work where over 2mb of CSS is downloaded via visiting each of the pages in Byte's main menu.

See 📌 By default, don't aggregate jquery.js Active for a similar (js) example.

Steps to reproduce

Proposed resolution

The easiest way to prevent this is to exclude the biggest files from aggregation, this way they're only downloaded once (per browser) regardless of how many library combinations exist on a site.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Needs review

Version

1.0

Component

CSS

Created by

🇬🇧United Kingdom catch

Live updates comments and jobs are added and updated live.
  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024