C-Lodder / grunt-postcss

Apply several post-processors to your CSS using PostCSS.
MIT License
39 stars 7 forks source link

You did not set any plugins, parser, or stringifier. Right now, PostCSS does nothing. Pick plugins for your case on https://www.postcss.parts/ and use them in postcss.config.js. #12

Closed peterchang2 closed 5 years ago

peterchang2 commented 5 years ago

I am using grunt watch and the error above shows up in terminal even tho the processors/plugins are working.

postcss: {
    options: {
        processors: [
            require('precss')(), // allows use of Sass-like markup

            require('postcss-cachebuster')({cssPath: '/assets/css/src/'}), 

            require('autoprefixer')({browsers: 'last 2 versions'}), 

            require('cssnano')({safe:true}) // modular minifier
        ]
    },
    dist: {
        expand: true,
        flatten: true,
        src: 'assets/css/src/*.css', // postcss runs on all css files here
        dest: 'assets/css/dest/' // output saved here
    }
},  
C-Lodder commented 5 years ago

Are you using @import in any of the CSS?

peterchang2 commented 5 years ago

There was version mismatch for some of the packages. Reverted back and that fixed it. Transferred over to gulp instead