Refactor library discovery for extensions

Created on 13 February 2025, 3 months ago

Overview

In 📌 Create extendibility proof of concept that also serves as documentation-by-example Active we added the capability for modules to extend Experience Builder. To add custom JavaScript they need to declare a library and set drupalSettings.xbExtension. Because library discovery is scoped by module there is no easy way for XB to consider alter its own libraries while considering other module libraries.

The chosen solution parses library YAML directly which means that libraries added via hook_library_info_build()</ code> or altered by <code>hook_library_info_alter() may not be detected or processed correctly.

Proposed resolution

Unsure at present. Perhaps try to reuse the libraries-extend mechanism that is currently only available to themes? This provides similar functionality, allowing the active theme to add additional dependencies to existing libraries, but this is currently not available to modules.

User interface changes

📌 Task
Status

Active

Version

0.0

Component

Extensions API

Created by

🇬🇧United Kingdom longwave UK

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

Comments & Activities

Production build 0.71.5 2024