Install

Works with Drupal: ^10.3 || ^11

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 679.73 KB
MD5: 09c97d44b60eda075e12fbb284914415
SHA-1: 3e11bb07c91f45861f632aa05d5c3994b634c2c8
SHA-256: 40fe5a229f0608a4fb4f434cc108cc575a1a3860eae58b9d6029a6cf2aa3e4da
Download zip 1.17 MB
MD5: f87729b90ed36a8bd74c49eef578803d
SHA-1: 5a9b15a75bd8e922eb71947983f83bae0137f79e
SHA-256: 5de423bb1c6fac416e78f5638c096839236cbeda24fb0f754a9c997f8148014f

Release notes

sdx 1.0.0-alpha8 is a focused bug fix for
AutoLibraryGenerator's CSS discovery. Symptom on affected sites: missing component styles after
drush sdx:build on any component whose primitives ended up in a shared chunk, especially when Vite's content hash happened to contain a hyphen.

Root cause: two stacked bugs in the old discovery path. The regex scanning compiled entry JS allowed only [A-Za-z0-9_] in the hash group, but rollup's default hash uses the base64-url alphabet which includes -, so any hash containing a hyphen never matched. Even when the regex did match, the glob-based CSS lookup looked for {name}.css / {name}-*.css using the JS filename's base name; Vite prefixes shared-chunk JS filenames with _ (_PortalLayout-hash.js) but
names the CSS file after the chunk's name field (PortalLayout.css), so the glob looked for
_PortalLayout.css and never found the real file. Dynamic imports were never matched at all.

Fix: AutoLibraryGenerator now walks the Vite manifest. Starting from the entry whose name field matches the SDX entry name, it recurses through imports and dynamicImports, collecting every visited chunk's css array. The manifest is the authoritative chunk graph; the regex and the glob are gone. CSS paths are verified against disk before being
declared in the library so the browser never sees a 404.

Tests: the existing CSS-discovery test was rewritten to use a manifest fixture, plus five new tests pin the regressions: hyphenated hash, leading-underscore shared chunk, dynamic-import chunk, transitive (entry -> A -> B) graph, and missing-manifest graceful degradation.

Upgrade: composer require drupal/sdx:^1.0.0-alpha8, then drush cr and drush sdx:build. Sites carrying a manual hook_library_info_alter that injected chunk CSS by hand can remove that workaround once the rebuild lands the right files.

Created by: vzsigmond
Created on: 29 Apr 2026 at 09:44 UTC
Last updated: 29 Apr 2026 at 09:44 UTC
Bug fixes

Other releases