question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow to disable "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." warning

See original GitHub issue

Will be great to allow disable “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.” warning message using the option, for example noWarningOnEmptyOptions (maybe best name).

Why?

We use postcss in css-loader as the parser, but here cases when developer can disable all plugins (parsing url()/@import/css modules plugins), but css-loader still has sense because it is compile CSS to JS (or other type). It is rare cases, but they exists.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:21 (9 by maintainers)

github_iconTop GitHub Comments

31reactions
cr0wg4ncommented, Nov 18, 2021

Is there any documentation anywhere that demonstrates the usage of this option? Searching the web for the string hideNothingWarning and PostCSS brings up nothing.

This is a hidden option, because in most of the cases, you should fix the problem, not hide a useful warning.

I am using Storybook in my Nuxt project, and it requires PostCSS be installed as a dev dependency. The issue is that while Storybook requires it, my main pages I build do not. Any time I run nuxt to generate the pages, I get a wall of warnings that are overshadowing more relevant errors and warnings. A clear way to suppress these warnings would be much appreciated.

Maybe it is a better way to fix Storybook and not call PostCSS if you do not use PostCSS plugins?

It turns out there is a bug logged for this issue in nuxt-community/storybook. For those with the same issue, It involves adding PostCSS as a build module in the nuxt config and updating the version of nuxt-community/storybook used. nuxt-community/storybook#266

I would still suggest that unnecessary clutter in the logs has led to a lot of frustration for those who are not directly using PostCSS in their projects, but have it as a dependency of a dependency. I have not created a project on the scale of PostCSS however, so perhaps the logs solve more issues than it creates. Just my thoughts on the topic.

Thanks for your response which indeed led to a resolution in my case. I will certainly go up the chain of dependencies in the future to seek a resolution at the root cause.

This warnings are very annoying… I only added postcss: null in the build config at nuxt.conf.js, something like this:

build: {
    postcss: null, 
    ...
}

It works well for me

8reactions
aicommented, Aug 14, 2020

PostCSS 8 will have hideNothingWarning option

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Postcss warning without using it - Stack Overflow
Github Issue - Allow to disable "You did not set any plugins, parser, or stringifier. Right now, PostCSS does nothing. Pick plugins for...
Read more >
What is PostCSS? How to Use Plugins to Automate CSS Tasks
PostCSS is a Node.js tool that transforms your styles using JavaScript plugins. It generates more downloads per week on NPM than other CSS ......
Read more >
PostCSS - a tool for transforming CSS with JavaScript
Transform CSS with the power of JavaScript. Auto-prefixing, future CSS syntaxes, modules, linting and more are possible with hundreds of PostCSS plugins.
Read more >
postcss-loader | webpack - JS.ORG
Allows to set PostCSS options and plugins. All PostCSS options are supported. There is the special config option for config files. How it...
Read more >
PostCSS | Hugo
Hugo Pipes can process CSS files with PostCSS. ... be processed using the project's or theme's own postcss.config.js or any file set with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found