Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

LightningCSS

No security coverage Under active development

This module enables the use of LightningCSS for compiling styles from themes and modules. It automatically applies optimizations such as minification, bundling, and nesting, while respecting browserlist configurations.

This module allows to use LightningCSS to compile styles from themes and modules.
To use it simply put:
lightningcss: true
into your themes or modules *.info.yml

Browserlist configuration is respected (.browserlistrc, package.json). Enviroments are not supported.

The module uses the lightningcss cli with command:

lightningcss --minify --bundle --nesting --targets="last 2 Chrome versions, last 2 Edge versions, last 2 ff versions, last 2 Safari versions, last 2 ios_saf versions, last 2 and_ff versions, last 2 and_chr versions"

Additional Requirements

LightningCSS requires libc. The modules tries to detect it.

You need to configure your composer.json to put npm-assets into /libraries/${name}:

"extra": {
  "installer-types": ["npm-asset"],
  "installer-paths": {
    "web/libraries/{$name}": [
      "type:npm-asset",
    ],
  }
}
Drupal 9–10 · not 11

Ask your assistant about LightningCSS

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Aug 2023
Latest release
3 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core PHP Release date
0.0.1 Stable 9–10 Aug 21, 2023
0.x-dev Dev 9–10 Aug 21, 2023