Closed Faisal-Manzer closed 1 year ago
How do you use this plugin and what tool you use to compile CSS?
I am using it with preact-cli
. Also, I am using node-sass
.
# postcss.config.js
module.exports = {
plugins: [
require('postcss-viewport-height-correction'),
require('postcss-normalize')({ forceImport: 'normalize.css' }),
require('autoprefixer'),
require('postcss-combine-media-query'),
require('postcss-dark-theme-class')({ darkClass: 'dt', lightClass: 'lt' }),
require('postcss-combine-duplicated-selectors')
]
};
Do you call postcss-cli
on already compiled CSS from previous step or you have separated src/
and dist/
folders?
Yeah, the Webpack config first converts sass
to CSS
then it processed by PostCSS. preact-cli
is just like create-react-app
so I don't know all those internal workings.
I don't know what's happening but it seems like there is duplicate selector being made. I guess to check for the pre-processed style is not there.