We are using postcss with cssnano and autoprefixer. My problem is that postcss does not use the "grid: autoplace" in my postcss.config.js
.
This is my postcss.config.js:
const cssnano = require('cssnano');
const mqpacker = require('css-mqpacker');
const postcssPresetEnv = require('postcss-preset-env');
module.exports = (ctx) => ({
map: ctx.options.map,
parser: false,
plugins: [
postcssPresetEnv(),
mqpacker({ sort: true }),
cssnano({
preset: [
'advanced',
{
autoprefixer: {
add: true,
grid: 'autoplace',
},
reduceIdents: false,
zindex: false,
},
],
}),
],
});
On the other hand, when I add /* autoprefixer grid: autoplace */
to my css file and run:
postcss ./dist/*.css --verbose > test.css
Postcss uses grid and adds the -ms
prefixes.
Why is it ignoring the property in the config file?