OptionalcssOptionaloptimizeRun the inlined CSS through lightningcss
before replaceSync — lower CSS nesting for the target browsers and
minify (#10). (@import is left as-is: this uses lightningcss transform,
which does not resolve/bundle imports.) lightningcss is an optional dependency, loaded
lazily (like Playwright/axe); a clear error is thrown if it's missing.
OptionalreadReads the CSS at an absolute path, or returns undefined if it can't be
read (in which case the import is left untouched). Defaults to a
synchronous disk read; injectable for tests / virtual filesystems.
OptionaltransformOverrides the CSS optimizer (default: lightningcss when optimizeCss is
set). Injectable for tests and custom pipelines.
lightningcss
targets(e.g. from itsbrowserslistToTargets); narrows nesting lowering.