DEV: Introduce postcss for autoprefix and light-dark() polyfill (#31393)

Introduces PostCSS at the end of our CSS compilation pipeline. For now,
just adds autoprefixer and light-dark polyfill.
This commit is contained in:
David Taylor
2025-02-20 14:40:27 +00:00
committed by GitHub
parent 1b33a9900f
commit 087e8e4bdb
11 changed files with 273 additions and 44 deletions

View File

@ -185,5 +185,15 @@ class DiscourseJsProcessor
def terser(tree, opts)
self.class.v8_call("minify", tree, opts, fetch_result_call: "getMinifyResult")
end
def post_css(css:, map:, source_map_file:)
self.class.v8_call(
"postCss",
css,
map,
source_map_file,
fetch_result_call: "getPostCssResult",
)
end
end
end