diff --git a/webpack.config.js b/webpack.config.js index daf3d611..e6f9188e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -27,18 +27,20 @@ Encore.cleanupOutputBeforeBuild() }) .enableSourceMaps(!Encore.isProduction()); -Encore.addPlugin( - new PurgecssPlugin({ - paths: glob.sync([ - path.join(__dirname, "output_*/**/*.html"), - ]), - extractors: [ - { - extractor: TailwindExtractor, - extensions: ['twig', 'html', 'md'] - } - ] - }) -); +if (Encore.isProduction()) { + Encore.addPlugin( + new PurgecssPlugin({ + paths: glob.sync([ + path.join(__dirname, "output_*/**/*.html"), + ]), + extractors: [ + { + extractor: TailwindExtractor, + extensions: ['twig', 'html', 'md'] + } + ] + }) + ); +} module.exports = Encore.getWebpackConfig();