浏览代码

build: Enable cssnano safe mode.

Renée Kooi 6 年之前
父节点
当前提交
81c500c8cb
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      bin/build-css.js

+ 3 - 2
bin/build-css.js

@@ -60,8 +60,9 @@ async function compileCSS () {
       chalk.magenta(path.relative(cwd, outfile))
     )
 
-    const minifiedResult = await postcss([ cssnano ])
-        .process(postcssResult.css, { from: outfile })
+    const minifiedResult = await postcss([
+      cssnano({ safe: true })
+    ]).process(postcssResult.css, { from: outfile })
     minifiedResult.warnings().forEach(function (warn) {
       console.warn(warn.toString())
     })