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

19 lines
541 B
JavaScript

let Encore = require('@symfony/webpack-encore')
let PurgecssConfig = require('./purgecss.config')
let PurgecssPlugin = require('purgecss-webpack-plugin')
Encore
.disableSingleRuntimeChunk()
.cleanupOutputBeforeBuild()
.setOutputPath('source/build/')
.setPublicPath('/build')
.addEntry('app', './assets/js/app.js')
.enablePostCssLoader()
.enableSourceMaps(!Encore.isProduction())
if (Encore.isProduction()) {
Encore.addPlugin(new PurgecssPlugin(PurgecssConfig))
}
module.exports = Encore.getWebpackConfig()