File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
packages/postcss-if-function/src Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " postcss-if-function " : patch
3+ ---
4+
5+ fix: support ` async ` PostCSS plugins in ` postcss-if-function `
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ function postcssIfFunction(options = {}) {
5959
6060 return {
6161 postcssPlugin : PLUGIN_NAME ,
62- Once ( root , { result } ) {
62+ async Once ( root , { result } ) {
6363 // Collect all CSS text first
6464 const cssText = root . toString ( ) ;
6565
@@ -85,13 +85,14 @@ function postcssIfFunction(options = {}) {
8585 // double parsing overhead identified by static analysis tools.
8686
8787 try {
88- const transformedRoot = result . processor . process (
88+ const processed = await result . processor . process (
8989 transformed . nativeCSS ,
9090 {
9191 from : undefined ,
9292 parser : result . processor . parser
9393 }
94- ) . root ;
94+ ) ;
95+ const transformedRoot = processed . root ;
9596
9697 // Clone nodes to preserve original formatting and avoid reference issues
9798 transformedRoot . each ( ( node ) => {
You can’t perform that action at this time.
0 commit comments