Use Laravel Mix

This commit is contained in:
Oliver Davies 2019-11-12 09:45:06 +00:00
parent ee18292499
commit c418a1b8d6
21 changed files with 11079 additions and 7274 deletions

View file

@ -1,27 +0,0 @@
const Encore = require('@symfony/webpack-encore')
const glob = require('glob-all')
const PurgecssPlugin = require('purgecss-webpack-plugin')
Encore
.disableSingleRuntimeChunk()
.cleanupOutputBeforeBuild()
.setOutputPath('source/build/')
.setPublicPath('/build')
.addEntry('app', './assets/js/app.js')
.enablePostCssLoader()
.enableVueLoader()
.enableSourceMaps(!Encore.isProduction())
if (Encore.isProduction()) {
Encore
.enableVersioning()
.addPlugin(new PurgecssPlugin({
defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || [],
paths: () => glob.sync([
'assets/**/*.vue',
'source/**/*.{md,twig}'
])
}))
}
module.exports = Encore.getWebpackConfig()