This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
oliverdavies.uk-old-sculpin/webpack.config.js

20 lines
546 B
JavaScript
Raw Normal View History

2019-12-09 12:00:00 +00:00
let Encore = require('@symfony/webpack-encore')
let PurgecssConfig = require('./purgecss.config')
let PurgecssPlugin = require('purgecss-webpack-plugin')
2019-12-07 22:01:32 +00:00
Encore
.disableSingleRuntimeChunk()
.cleanupOutputBeforeBuild()
.setOutputPath('source/build/')
.setPublicPath('/build')
.addEntry('app', './assets/js/app.js')
.enablePostCssLoader()
.enableVueLoader()
.enableSourceMaps(!Encore.isProduction())
if (Encore.isProduction()) {
2019-12-09 12:00:00 +00:00
Encore.addPlugin(new PurgecssPlugin(PurgecssConfig))
2019-12-07 22:01:32 +00:00
}
module.exports = Encore.getWebpackConfig()