Skip to content

Commit

Permalink
Revert "refactor(dev): use cssnano as postcss plugin"
Browse files Browse the repository at this point in the history
This reverts commit 6868716.
  • Loading branch information
andelf committed Feb 18, 2022
1 parent 126f0b1 commit 44ddd10
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
14 changes: 10 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@ const css = {
},

buildCSS (...params) {
return cp.spawn(`yarn css:build`, {
shell: true,
stdio: 'inherit'
})
return gulp.series(
() => exec(`yarn css:build`, {}),
css._optimizeCSSForRelease
)(...params)
},

_optimizeCSSForRelease () {
return gulp.src(path.join(outputPath, 'css', 'style.css'))
.pipe(cleanCSS())
.pipe(gulp.dest(path.join(outputPath, 'css')))
}
}

Expand Down
1 change: 0 additions & 1 deletion postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ module.exports = (ctx) => ({
require('postcss-import-ext-glob')({}),
require('postcss-import')({}),
require('tailwindcss')('tailwind.config.js'),
...(process.env.NODE_ENV === 'production' ? [require('cssnano')({})] : [])
],
})

0 comments on commit 44ddd10

Please sign in to comment.