postcss-loader: You did not set any plugins, parser, or stringifier. Right now, PostCSS does nothing.
Have tried a bunch of configurations from the documentation but postcss-loader is not picking up the postcss plugins. I had the configuration working on webpack v3 using older versions of the libraries/plugins. Upgraded to webpack v4 and latest plugins versions and now postcss can’t pickup the plugin configuration.
Details
Configuring postcss-loader with following plugins:
- precss
- autoprefixer
- lost
Error (Logs|Stacks)
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.
Reproduction (Code)
Please see:
https://gist.github.com/trigun539/2b8ebf739b64881ec0b3ea2a9e37ba92
Environment
OS: Windows node: 8.15.0 npm: 6.4.1 postcss-loader: 3.0.0 precss: 4.0.0 autoprefixer: 9.4.10 lost: 8.1.0 mini-css-extract-plugin: 0.5.0
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 17
- Comments: 39 (11 by maintainers)
in the nuxt.config.js file
build: { postcss: null, },
If you are on Nuxt.js and just want to remove the anoying warning, this will solve:
https://github.com/webpack-contrib/postcss-loader/issues/405
If you have the same problem, i’ve found an explication/solution here : https://github.com/postcss/postcss/issues/1247
As an aside, I have discovered that despite a valid (webpack) postcss-loader configuration with plugins present, from what I can tell
postcss-advanced-variables
will cause this error to be emitted since it apparently invokes postcss internally without plugins; I’m not sure if this is a bug per se, or whether there is some way to refrain from warning when explicitly invoked like this.https://github.com/jonathantneal/postcss-advanced-variables/blob/master/src/lib/transform-import-atrule.js#L75
it is due module hoist in monorepos and default cwd…
In my case, changing the value of
plugins
property from function to array has solved the issue.Before:
After:
Seems like people have different experience on this, I just want to share mine.
I meet the same problem when I use autoprefixer plugin. I tried many solutions I’ve found by Google , none of they woked. But ironically, it’s just beacuse I just wrote plugin rather plugins in postcss.config.js.
I was getting this warning in my NX workspace . I don’t know how to find the webpack in my NX workspace and post config.css , I tried creating a webpack.conf.js and post.config.js but didn’t solved my problem . Can anyone guide me on this ?
This is my project structure
Is it possible to get more of a stack trace for this error? I’m getting it now but everything seems to be working correctly otherwise. I presume it’s some other dependency somewhere in the tree.
Because you do not have plugins for postcss-loader, it is error from postcss