Registry / devops / lightningcss-android-arm64

lightningcss-android-arm64

JSON →
library1.32.0jsnpmunverified

LightningCSS is a high-performance CSS parser, transformer, bundler, and minifier, written in Rust. It serves as the core CSS processor within the Parcel bundler and is recognized for its exceptional speed, capable of processing millions of lines of CSS per second on a single thread. The current stable version, 1.32.0, reflects ongoing development with frequent minor and patch releases to support the latest CSS specifications, improve browser compatibility, and fix bugs. Key differentiators include its Rust-native performance, comprehensive support for modern CSS features like CSS Modules, nesting, container queries, view transitions, and its ability to replace several PostCSS plugins. This specific package, `lightningcss-android-arm64`, provides the native ARM64 binary optimized for Android environments, which is typically installed as a transitive dependency when the main `lightningcss` package is used on compatible systems.

npm install lightningcss-android-arm64
INSTALL
IMPORT
SIG · LIGHTNINGCSS-ANDRO
L
lightningcss-android-arm64
devopsjavascriptv1.32.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

transform
import { transform } from 'lightningcss';
const transform = require('lightningcss').transform;
For Node.js, `transform` is a named export. ESM is generally preferred for new projects, but CommonJS `require` is supported for Node.js environments.
bundle
import { bundle } from 'lightningcss';
const bundle = require('lightningcss').bundle;
`bundle` is used for resolving and inlining `@import` rules, and it requires filesystem access via the `filename` option. It is also a named export.
Features
import { transform, Features } from 'lightningcss';
import { Features } from 'lightningcss/features';
The `Features` enum provides flags to enable or disable specific CSS features for transpilation, such as `Nesting` or `Colors`. It's a named export directly from the main package.

Demonstrates how to use `lightningcss.transform` to minify, transpile for browser targets, and generate a source map for a CSS string, enabling CSS nesting.

import { transform, Features } from 'lightningcss'; import { readFileSync, writeFileSync } from 'node:fs'; import { Buffer } from 'node:buffer'; const inputCss = ` /* Example CSS to transform */ :root { --primary-color: #3498db; } .container { display: flex; gap: 10px; & > .item { background-color: var(--primary-color); padding: 1rem; @media (min-width: 768px) { flex-grow: 1; } } } `; // A basic browserslist target for broad compatibility const targets = { chrome: 100 << 16, firefox: 100 << 16, safari: 15 << 16, edge: 100 << 16 }; try { const { code, map } = transform({ filename: 'input.css', code: Buffer.from(inputCss), minify: true, targets: targets, sourceMap: true, drafts: { nesting: true } // Explicitly enable CSS Nesting draft syntax }); console.log('Transformed CSS:\n', code.toString()); console.log('\nSource Map:\n', map?.toString()); // Example: Write to files writeFileSync('output.min.css', code); if (map) writeFileSync('output.min.css.map', map); console.log('\nSuccessfully transformed and minified CSS to output.min.css'); } catch (error) { console.error('Error transforming CSS:', error); }
Debug
Known issues
breakingThe relative color parsing behavior was updated in v1.30.0 to align with the latest CSS spec. Colors now support numbers in addition to percentages, and calculations in colors are always treated as numbers. This can be a breaking change if your code relies on older percentage-based relative color calculations.
fix
Review and update relative color calculations in your CSS to use numbers where percentages were previously expected, as per the updated CSS Color Module Level 5 spec.
affects: >=1.30.0
breakingThe CSS nesting implementation was updated in v1.30.0 to conform to the latest spec. This may affect existing CSS files that use older or non-standard nesting syntax, potentially leading to compilation errors or different output behavior.
fix
Update your nested CSS selectors and rules to adhere to the latest CSS Nesting Module specification. Enable the `drafts: { nesting: true }` option in the `transform` or `bundle` API.
affects: >=1.30.0
gotcha`lightningcss-android-arm64` is a platform-specific native binding. Directly installing this package is usually not necessary; instead, install the main `lightningcss` package, which will automatically resolve and install the correct native binding for your system's architecture (e.g., `lightningcss-android-arm64` for ARM64 Android environments).
fix
Install the main `lightningcss` package (`npm install lightningcss` or `pnpm install lightningcss`) and let npm/yarn/pnpm handle the appropriate native binary resolution.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module '../lightningcss.linux-x64-gnu.node'
This error typically indicates that the native binary for LightningCSS could not be found or loaded for the current operating system and architecture. This can happen in Docker containers, cross-compilation environments, or if the initial installation failed to fetch the correct binding.
fix
Ensure `lightningcss` is installed on the target architecture. For Docker, specify the correct base image and run `npm install` inside the container. If cross-compiling, ensure the correct native binding is available or explicitly configure for the target platform. Consider clearing `node_modules` and reinstalling.
CSS parse error: Unexpected token
LightningCSS is strict by default and will throw errors on invalid CSS syntax. This can occur with malformed declarations, incorrect at-rules, or non-standard syntax.
fix
Review the CSS code at the indicated location for syntax errors. If processing third-party CSS with known issues, consider enabling the `errorRecovery: true` option in the `transform` or `bundle` API to skip invalid rules and declarations, converting them to warnings.
CSS Modules error: [local] must be at the end so that auto-generated grid line names work
When using CSS Modules with CSS Grid, and defining custom naming patterns, LightningCSS requires the `[local]` placeholder to be at the end of the `pattern` string to correctly handle auto-generated grid line names (e.g., `-start`, `-end`).
fix
Adjust your `cssModules.pattern` configuration to ensure `[local]` is the last placeholder. For example, use `pattern: '[hash]-[local]'` instead of `pattern: '[local]-[hash]'`.
Upgrade
Version history
1.32.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
lightningcss-android-arm64 — npm install lightningcss-android-arm64 · libregistry