Open fowlercraig opened 5 years ago
You can find more info on the Slate Configuration page
const PostcssCssnano = require("cssnano")()
const PostcssAutoprefixer = require("autoprefixer")({ browsers: 'last 2 versions' })
const PostcssPurgeCss = require('@fullhuman/postcss-purgecss')
module.exports = {
'webpack.postcss.plugins': (config) => {
const plugins = [
AnyDevPlugin,
AnyOtherDevPlugin
];
if (process.env.NODE_ENV === 'production') {
plugins.push(
PostcssPurgeCss({
content: ['./src/**/*.liquid'],
whitelistPatterns: [/^(is-|has-|will-|js-)/],
keyframes: true,
fontFace: true
}),
PostcssAutoprefixer,
PostcssCssnano
)
}
return plugins;
}
};
Perfect, thank you. I've been scouring the docs, but somehow missed this page!
Is there any guidance on how to include a plugin like PurgeCss to the build process of Slate? I've tried a couple things, but am somewhat lost.