Unverified Commit 08a125e9 authored by Renée Kooi's avatar Renée Kooi Committed by GitHub
Browse files

Only minify CSS when `watch: false`. (#442)

parent 18ba9505
......@@ -17,15 +17,17 @@ function node (state, createEdge) {
var bundle
try {
bundle = purify(script, style, { minify: true })
bundle = purify(script, style)
} catch (e) {
this.emit('error', 'styles', 'purify-css', e)
}
try {
bundle = clean.minify(bundle).styles
} catch (e) {
this.emit('error', 'styles', 'clean-css', e)
if (!state.metadata.watch) {
try {
bundle = clean.minify(bundle).styles
} catch (e) {
this.emit('error', 'styles', 'clean-css', e)
}
}
createEdge('bundle', Buffer.from(bundle), {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment