Open rabbitfufu opened 2 months ago
Useful plugin,
However it no longer works in combination with postcss-nesting v 13.
Hi @rabbitfufu, thanks for the comment and report – I'll look into it in the coming days/weeks.
Hey @rabbitfufu, could you post an example of your PostCSS config, please? I'd like to know whether you're running the nesting plugin before or after hover media feature.
Hey @rabbitfufu, could you post an example of your PostCSS config, please?
You bet, here is the complete config I am using for postcss:
postcss: {
plugins: [
postcssGlobalData({
files: ['./src/assets/breakpoints.css']
}),
postcssEach(),
postcssCustomMedia(),
postcssNesting({edition: '2021'}), // postcssHover requires this edition
postcssHover
]
}
I have postcssHover set directly after postcssNesting -- and in fact I am using v13 of postcssNesting here. In order to get it working, postcssNesting needs to be set to legacy mode. If postcssNesting is initialized without that parameter, then if postcssHover is also present in the project, Vite seems to crash. (It doesn't throw any errors that I can see, the build just hangs.)
Hope this helps!
Useful plugin, However it no longer works in combination with postcss-nesting v 13.