A Rust-based stylesheet compiler for the glass-easel project, version 0.19.0. It converts rpx units to vw, applies class-prefix-based style isolation, and minifies CSS. Maintained by WeChat Mini Program team, it prioritizes performance via WebAssembly. Alternatives like PostCSS plugins exist but lack integrated class-prefixing.
npm install glass-easel-stylesheet-compilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Reads a CSS file, creates a StyleSheetTransformer with a class prefix and rpx ratio, then gets the transformed CSS and source map.
Call transformer.free() when done, or use a try/finally block.
Always provide an absolute or relative file path (e.g., '/path/to/file.css') that matches the source map expectations.
Ensure rpxRatio matches your design width (typically 750).
Use Buffer.from(sourceMap).toString() or new TextDecoder().decode(sourceMap) to get a JSON string.
Use correct import: `import { StyleSheetTransformer } from 'glass-easel-stylesheet-compiler'`Run `npm install glass-easel-stylesheet-compiler`
Ensure you correctly imported `StyleSheetTransformer` and called `new StyleSheetTransformer(...)`.
No dependency data recorded yet.