Skip to content

Commit 38d860a

Browse files
committed
Purgecss only in production
1 parent 4d2892d commit 38d860a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

purgecss/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
const isHotReloaded = process.argv.includes('serve');
21
const postcss = require('postcss');
32

43
class TailwindExtractor {
@@ -18,7 +17,7 @@ let config = {
1817
};
1918

2019
module.exports = postcss.plugin('tailwind-purgecss', function(opts) {
21-
if (isHotReloaded) return () => {};
20+
if (process.env.NODE_ENV !== 'production') return () => {};
2221
const purgecss = require('@fullhuman/postcss-purgecss');
2322
return purgecss(Object.assign(config, opts));
2423
});

0 commit comments

Comments
 (0)