Replace postcss-cssnext with postcss-preset-env

This commit is contained in:
Shweelan Samson authored and Zaid Abdulla committed 2019-07-17 19:35:35 -07:00
1 parent 461950749f
commit 8a0ebd26d8
4 files changed
+383 -1288

No files matched your search

+8 -2
View File
@@ -28,7 +28,7 @@ import { terser } from "rollup-plugin-terser";
import webpack from "webpack";
import postcss from "postcss";
import postcssImport from "postcss-import";
import postcssCssNext from "postcss-cssnext";
import postcssPresetEnv from "postcss-preset-env";
import cssnano from "cssnano";
const MODE = process.env["NODE_ENV"] || "production";
@@ -162,7 +162,13 @@ async function generateCss(): Promise<void> {
const cssIn = fs.readFileSync(cssInPath);
const cssOut = await postcss([
postcssImport,
postcssCssNext({ warnForDuplicates: false }),
postcssPresetEnv({
stage: 3,
features: {
"nesting-rules": true,
"color-mod-function": true
}
}),
cssnano
]).process(cssIn, { from: cssInPath, to: cssOutPath });
fs.writeFileSync(cssOutPath, cssOut.css);