Revert "Smaller CSS with purge CSS (130kb removed)"

This reverts commit 7ed3a24723.
This commit is contained in:
Eliot Berriot 2018-12-20 17:54:41 +01:00
parent ba89cc640f
commit 712418ecb6
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
3 changed files with 3 additions and 86 deletions

View file

@ -1,22 +1,10 @@
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const webpack = require('webpack');
const PurgecssPlugin = require('purgecss-webpack-plugin')
const glob = require('glob-all')
const path = require('path')
let plugins = [
// do not include moment.js locales since it's quite heavy
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
// Remove unused CSS using purgecss. See https://github.com/FullHuman/purgecss
// for more information about purgecss.
new PurgecssPlugin({
paths: glob.sync([
path.join(__dirname, './public/index.html'),
path.join(__dirname, './**/*.vue'),
path.join(__dirname, './src/**/*.js')
])
}),
]
if (process.env.BUNDLE_ANALYZE === '1') {
plugins.push(new BundleAnalyzerPlugin())