Do not use Babel's register hook in production

This commit is contained in:
Michael Jackson
2016-05-16 15:12:49 -07:00
parent 9a3f72f3a6
commit 5f2615f2ed
10 changed files with 19 additions and 15 deletions

View File

@ -0,0 +1,9 @@
import fs from 'fs'
import path from 'path'
import csso from 'csso'
export const readCSS = (...args) =>
minifyCSS(fs.readFileSync(path.resolve.apply(path, args), 'utf8'))
export const minifyCSS = (css) =>
csso.minify(css).css