madiator.com/postcss.config.js
2021-08-16 12:11:25 +02:00

17 lines
469 B
JavaScript

module.exports = ({ file, options, env }) => {
env = env || {};
file = file || {};
options = options || {};
options.cssnext = options.cssnext || null;
options.autoprefixer = options.autoprefixer || null;
options.cssnano = options.cssnano || null;
return {
parser: file.extname === '.sss' ? 'sugarss' : false,
plugins: {
'postcss-import': { root: file.dirname },
cssnano: env === 'production' ? options.cssnano : false,
},
};
};