summaryrefslogtreecommitdiff
path: root/webpack.config.js
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2018-06-02 16:43:32 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2018-12-13 17:09:13 +0100
commit71429b922f5ae28bbd92d4844bd5d29ad30814db (patch)
tree3c2ccaed11c62ab822d4c9e3c7acf0a3b3c0a871 /webpack.config.js
parentd6a8bac147b196118d3e2ed56bd67522bc4c5da6 (diff)
downloadbrokentalents-71429b922f5ae28bbd92d4844bd5d29ad30814db.tar.gz
brokentalents-71429b922f5ae28bbd92d4844bd5d29ad30814db.zip
Purge unused css, remove unused images
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js12
1 files changed, 12 insertions, 0 deletions
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/*',
+ ])
+ }),
] : []),
};