From 2a0ad69a28b8834963a0175a87c68b7fc80d1e38 Mon Sep 17 00:00:00 2001 From: Matt Isenhower Date: Thu, 3 Aug 2017 12:26:44 -0700 Subject: [PATCH] Re-enable the purify CSS plugin --- webpack.config.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 02695f0..e5a1fb2 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -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',