Skip to content

Separate dist files for components #41563

Open
@Nicoloye

Description

@Nicoloye

Prerequisites

Proposal

Hello everybody!

I searched for duplicate and didn't found any but I may have used terms that are too generic, sorry if I'm pushing something that has been openly discussed elsewhere.

I'm wondering if the different component asset files (css and js) could be generated as separate dist files.
Being part of the Drupal community I see many projects that are recompiling those separately to allow an optimized aggregation of the css and js files. Here are some examples:

Motivation and context

Many CMSs or frameworks often have a process that aggregate CSS/JS files to be sure to ship only assets that are in use on a page rather than loading all components even if you don't use most/many of them.

As a company we have more and more clients that are asking us to ensure a certain ecoIndex score or similar ecodesign scores that check how efficiently the assets are loaded and used. Having them separately would greatly help in aggregation processes to optimize scores on such tools.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions