create-react-library
create-react-library copied to clipboard
How do I set up postcss?
For create-react-app I used craco to setup postcss. Any ideas how can i implement my postcss styles around here?
I had craco.config.js
const postcssFlexbugsFixes = require('postcss-flexbugs-fixes');
const autoprefixer = require('autoprefixer');
const postcssPresetEnv = require('postcss-preset-env');
const postcssCustomMedia = require('postcss-custom-media');
const mq = require('mylib/mq/mq.json');
module.exports = {
style: {
postcss: {
plugins: [
postcssFlexbugsFixes,
postcssPresetEnv({ stage: 1 }),
autoprefixer({
flexbox: 'no-2009', // I'd opt in for this - safari 9 & IE 10.
}),
postcssCustomMedia({
importFrom: [
{
customMedia: mq,
},
],
}),
],
},
},
};