advagg_bundler should group assets with the same fetchpriority together

Created on 17 July 2023, 12 months ago
Updated 20 October 2023, 8 months ago

Problem/Motivation

We use the fetchpriority attribute to tell the browser that some CSS files need to be loaded first (because we use the "defer CSS" option so CSS loading is not render blocking).
We also use advagg_bundler to have better control over how many CSS bundles we want. But it discards the fetchpriority attribute and groups assets with different priorities.

Steps to reproduce

  • Declare a library like this:
    foo:
      css:
        theme:
          source/foo.css: { attributes: { fetchpriority: high } }
    
  • Enable advagg_bundler for CSS.
  • The fetchpriority attribute disappears from the aggregated CSS link tags

Proposed resolution

AdvaggCssCollectionGrouper::group() should use the fetchpriority as a criteria to create groups.

✨ Feature request
Status

Needs review

Version

6.0

Component

Code

Created by

πŸ‡«πŸ‡·France prudloff Lille

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024