Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Commit

Permalink
Merge pull request #4 from OwenMelbz/patch-1
Browse files Browse the repository at this point in the history
only include purgecss for production builds
  • Loading branch information
ky-is authored Feb 26, 2019
2 parents ae79229 + d20eee7 commit d8c2e40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions generator/templates/postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const isHotReloaded = process.argv.includes('serve')
const IN_PRODUCTION = process.env.NODE_ENV === 'production'

class TailwindVueExtractor {
static extract (content) {
Expand All @@ -14,7 +14,7 @@ module.exports = {
plugins: [
require('postcss-preset-env')({ stage: 2 }),
require('tailwindcss')('./tailwind.config.js'),
!isHotReloaded && require('@fullhuman/postcss-purgecss')({
IN_PRODUCTION && require('@fullhuman/postcss-purgecss')({
content: [ `./@(public|src)/**/*.@(${extensionsUsingCSS.join('|')})` ],
css: [ `./src/**/*.@(${extensionsOfCSS.join('|')})` ],
extractors: [
Expand Down

0 comments on commit d8c2e40

Please sign in to comment.