Revert "Disable PurgeCSS for now"

This reverts commit 73a7a80a33.
This commit is contained in:
Oliver Davies 2018-01-30 22:52:53 +00:00
parent de03517b20
commit a8088c148c

View file

@ -15,7 +15,8 @@ class TailwindExtractor {
}
}
Encore.cleanupOutputBeforeBuild()
Encore
.cleanupOutputBeforeBuild()
.setOutputPath('source/build/')
.setPublicPath('/build')
.enableLessLoader()
@ -26,19 +27,22 @@ Encore.cleanupOutputBeforeBuild()
path: 'postcss.config.js'
};
})
.enableSourceMaps(!Encore.isProduction());
.enableSourceMaps(!Encore.isProduction())
;
// PurgeCSS
// Encore.addPlugin(new PurgecssPlugin({
// paths: glob.sync([
// path.join(__dirname, "source/**/*.{twig,html,md}")
// ]),
// extractors: [
// {
// extractor: TailwindExtractor,
// extensions: ['twig', 'html', 'md']
// }
// ]
// }));
Encore.addPlugin(
new PurgecssPlugin({
paths: glob.sync([
path.join(__dirname, "source/**/*.{twig,html,md}")
]),
extractors: [
{
extractor: TailwindExtractor,
extensions: ['twig', 'html', 'md']
}
]
})
);
module.exports = Encore.getWebpackConfig();