I am using styled-components
library in my React project.
I would like to disable generating of vendor prefixes during the development time.
It is very cumbersome to find a specified CSS property among so many similar to toggle it and test in browser's dev tools.
Just take a look at this picture (borrowed from one of the issues regarding the same)
Anything I found on the Internet is to use the disableVendorPrefixes
prop on StyleSheetManager which is no solution for me, because:
Things I found and don't satisfy my needs:
I was in your situation and also did not use StyleSheetManager. Since StyleSheetManager is the mechanism they use for applying settings like that you may want to reconsider. Just wrap your top level component in that component. If you only want to disable vendor prefixes in developement mode you could set it conditionally like this...
import { StyleSheetManager } from 'styled-components'
<StyleSheetManager disableVendorPrefixes={process.env.NODE_ENV === 'development'}>
<YourApp />
</StyleSheetManager>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With