postcss / autoprefixer , how to supress IE warnings?

420 views Asked by At

how do I use

OnceExit: result.messages = []

Or

var postcss = require('postcss');
module.export = postcss.plugin('postcss-warn-cleaner', function () {
    return function (css, result) {
        result.messages = [];
    };
});

In my current postcss.config.js :

module.exports = {
  plugins: {
    OnceExit: result.messages = [],
    autoprefixer: { grid: true },
    "postcss-import": {},
    "postcss-cssnext": {
      warnForDuplicates: false,
      map: true,
      remove: false,
      browsers: ["> 1%", "IE 11"],
      extensions: {
        "--phone": "(min-width: 544px)",
        "--tablet": "(min-width: 768px)",
        "--desktop": "(min-width: 992px)",
        "--large-desktop": "(min-width: 1200px)"
      }
    },
    "postcss-inherit": {},
    "postcss-assets": {},
    "postcss-nested": {},
    cssnano: {
      reduceIdents: false,
      zindex: false
    },
    "postcss-hexrgba": {},
    "postcss-reporter": {
      clearMessages: true
    }
  },
  sourceMap: true || "inline"
};

After recent migration I have hundreds of these warnings and they push our actuall errors to point it breaks development :( . Authors mentioned one of 2 above solution to supress these warnings, I struglle at right syntax on how to put that into existing config.

0

There are 0 answers