How to use the @symfony/webpack-encore.cleanupOutputBeforeBuild function in @symfony/webpack-encore

To help you get started, we’ve selected a few @symfony/webpack-encore examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github async-aws / aws / website / webpack.config.js View on Github external
.enableSassLoader()
    .enablePostCssLoader()
    .splitEntryChunks()
    .configureSplitChunks(function (splitChunks) {
        // https://webpack.js.org/plugins/split-chunks-plugin/
        //splitChunks.name = !Encore.isProduction();
        splitChunks.cacheGroups = {
            vendors: {
                test: /[\\/]node_modules[\\/]|bootstrap.(js|scss)/
            }
        }
    })
;

if (Encore.isProduction()) {
    Encore.cleanupOutputBeforeBuild()
}

module.exports = Encore.getWebpackConfig();