Tidy webpack config

This commit is contained in:
Oliver Davies 2018-01-30 23:03:06 +00:00
parent 6312dc507d
commit ad64d11ec0

View file

@ -1,5 +1,4 @@
var Encore = require('@symfony/webpack-encore');
var tailwindcss = require('tailwindcss');
var glob = require('glob-all');
var path = require('path');
var PurgecssPlugin = require('purgecss-webpack-plugin');
@ -15,8 +14,7 @@ class TailwindExtractor {
}
}
Encore
.cleanupOutputBeforeBuild()
Encore.cleanupOutputBeforeBuild()
.setOutputPath('source/build/')
.setPublicPath('/build')
.enableLessLoader()
@ -27,10 +25,8 @@ Encore
path: 'postcss.config.js'
};
})
.enableSourceMaps(!Encore.isProduction())
;
.enableSourceMaps(!Encore.isProduction());
// PurgeCSS
Encore.addPlugin(
new PurgecssPlugin({
paths: glob.sync([