CSS Modules support for .module.css files.
Uses LightningCSS (via Vize) for proper CSS parsing and class name scoping.
LightningCSS handles selectors, keyframes, custom identifiers, composes,
nested rules, and all other CSS constructs correctly.
Example
Given button.module.css:
.primary { color: blue }
.large { font-size: 2em }Produces scoped CSS and a JS module exporting the name mapping:
export default {"primary":"ewq3O_primary","large":"ewq3O_large"}
Summary
Functions
Compile a CSS Module file.
Returns {:ok, js_code, scoped_css} where js_code exports the
class name mapping and scoped_css has LightningCSS-rewritten names.
Check if a file path is a CSS Module.