Global Attachment of core/drupal.collapse Library Adds Unused Dependencies

Created on 16 January 2025, 20 days ago

Problem/Motivation

I was conducting an inventory of the scripts attached to the DOM on various pages and noticed that the core/drupal.collapse library is being attached globally by the ckeditor_details module. This library introduces unnecessary dependencies (e.g., core/drupal.form, core/jquery), as well as the three scripts included by the library, on pages that do not contain details accordions.

This global attachment increases page load size and may impact performance on pages where these scripts are not needed.

Proposed resolution

Since Drupal 10 and newer versions do not support Internet Explorer 11 (IE11), perhaps we can just remove the .module file altogether, thus removing the library dependencies.

📌 Task
Status

Active

Version

2.1

Component

Code

Created by

🇨🇦Canada tanner.svg

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024