From 71429b922f5ae28bbd92d4844bd5d29ad30814db Mon Sep 17 00:00:00 2001 From: schneefux Date: Sat, 2 Jun 2018 16:43:32 +0200 Subject: Purge unused css, remove unused images --- webpack.config.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'webpack.config.js') diff --git a/webpack.config.js b/webpack.config.js index 0b61aba..69363f9 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,7 +1,9 @@ const path = require('path'); +const glob = require('glob-all'); const VueLoaderPlugin = require('vue-loader/lib/plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); +const PurgecssPlugin = require('purgecss-webpack-plugin'); const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin'); const SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin'); @@ -50,5 +52,15 @@ module.exports = { staticFileGlobs: ['index.html', 'dist/**/*'], minify: true, }), + new PurgecssPlugin({ + paths: glob.sync([ + './src/*.html', + './src/*.js', + './src/*.vue', + './src/**/*.vue', + './node_modules/buefy/src/components/table/*', + './node_modules/buefy/src/components/pagination/*', + ]) + }), ] : []), }; -- cgit v1.3.1