Re-enable the purify CSS plugin

This commit is contained in:
Matt Isenhower
2017-08-03 12:26:44 -07:00
parent 38c0538d57
commit 2a0ad69a28

View File

@@ -73,16 +73,18 @@ module.exports = function(env) {
// Extract CSS to a separate file
new ExtractTextPlugin('assets/css/[name].[contenthash].css'),
// Remove unused CSS styles
// new PurifyCSSPlugin({
// paths: [
// ...glob.sync(path.join(__dirname, 'src/html/*.html')),
// ...glob.sync(path.join(__dirname, 'src/js/components/*.vue')),
// ],
// minimize: production,
// purifyOptions: {
// // whitelist: ['.columns'],
// },
// }),
new PurifyCSSPlugin({
paths: [
...glob.sync(path.join(__dirname, 'src/html/*.html')),
...glob.sync(path.join(__dirname, 'src/js/components/*.vue')),
],
minimize: production,
purifyOptions: {
whitelist: [
'.title:not(.is-spaced)+.subtitle', // Fix subtitle spacing
],
},
}),
// Favicon
// new FaviconsWebpackPlugin({
// logo: './src/img/1f389.svg',