Skip to content

Commit 6a4d63c

Browse files
author
Alexandr Zaitsev
committed
fix pcss configuration
1 parent 7d66976 commit 6a4d63c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

postcss.config.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,18 @@
1919
*/
2020

2121
import postcssPresetEnv from 'postcss-preset-env';
22+
import postcssGlobalData from '@csstools/postcss-global-data';
2223
import postcssSvg from 'postcss-svg';
23-
import postcssNested from 'postcss-nested';
2424

2525
export default {
2626
plugins: [
27-
postcssPresetEnv({ stage: 3 }),
27+
// should go before postcss-custom-media to correctly inject media rules
28+
postcssGlobalData({ files: ['./Extension/src/pages/common/styles/media.pcss'] }),
29+
'postcss-import',
30+
// should go before postcssPresetEnv with nesting-rules enabled
31+
'postcss-nested',
32+
[postcssPresetEnv, { stage: 3, features: { 'nesting-rules': true } }],
33+
'postcss-custom-media',
2834
postcssSvg(),
29-
postcssNested(),
3035
],
3136
};

0 commit comments

Comments
 (0)