New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable PostCSS deprecation warning #14440
Comments
@thany what's your proposed solution? |
I'm not sure. On the one hand, a warning is neccesary for folks relying on postcss. On the other hand it's just noise for folks who don't use it. To them, it might even look like the warning is telling them to install said addon, which shouldn't be the goal of this warning... Isn't there a way to detect if postcss is (going to be) used? Perhaps it's possible move the warning to trigger at runtime, rather than at build time. That might help to know when it's being used/called. |
@shilman We also do not use postCSS and this warning is more than annoying as we configured our builds to fail when any deprecation warning is thrown. How about providing a setting we can add to Although if you can also only throw that warning during runtime ONLY when necessary as @thany suggests that could also work. |
I actually get this error and I'm not using postcss in our storybook itself, it's actually trying to run a postcss.config.js inside a node module import, while I'm just importing the dist css from that module. Seems like a bug? |
Crikey!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.2.3 containing PR #14478 that references this issue. Upgrade today to the
Closing this issue. Please re-open if you think there's still more to do. |
For people who can't upgrade to 6.2.3 yet, this is a workaround:
|
If you dont use Postcss you can paste this in your
As suggested in the documentation: |
Yes, adding this property to the exports object fixed the warning issue |
Describe the bug
Starting Storybook 6.2+ will trigger a deprecation warning, which will make the console output look quite noisy. The warning is about deprecating the implicit PostCSS loader, which is guess is fine to show... if it's actually being used. I'm not using any CSS in our project, and so I don't want such a warning to clutter the console output. My OCD wants to do away with warnings 😀, but this one seems to be hardcoded into Storybook.
In the source I can see that it's always generating that warning for everyone. Except if you explicitly add addon-postcss.
This seems backwards to me. Why should I add an addon that I don't need, in order to hide a warning about its functionality that I wasn't using in the first place??
To Reproduce
Steps to reproduce the behavior:
Expected behavior
If not using PostCSS: don't bother the console with it.
If using PostCSS: do warn about installing the addon.
Screenshots
System
Please paste the results of
npx sb@next info
here.┆Issue is synchronized with this Asana task by Unito
The text was updated successfully, but these errors were encountered: