Storybook: warning filtering (analagous to webpack's stats.warningsFilter)

Created on 24 Apr 2019  路  12Comments  路  Source: storybookjs/storybook

Is your feature request related to a problem? Please describe.

In our main frontend build we're using Webpack's stats warningsFilter to suppress innocuous warnings from ts-loader.

There doesn't seem to be a way to do this in our storybook build, so we get pages of unwanted warnings.

The Webpack stats doc mentions:

This option does not have any effect when using the Node.js API.

I assume that's what's going on here?

Describe the solution you'd like
An equivalent for Webpack's stats option that I can use in Storybook builds.

Describe alternatives you've considered
I looked into other ways to control the Storybook build output, but all I could find was build-storybook's --quiet option, which doesn't filter the warnings out.

Are you able to assist bring the feature to reality?
Maybe, with some guidance about where to start!

Additional context
Here's what we're doing in our app builds, that doesn't work in Storybook:

  stats: {
    warningsFilter: /export .* was not found in/,
  },
babel / webpack has workaround inactive question / support

Most helpful comment

I just used this webpack plugin to sort, filter and organize webpack stats: https://www.npmjs.com/package/webpack-shower

All 12 comments

@igor-dv , @ndelangen , @shilman before the garbage collector bot closes this issue, could you offer any guidance on where to start? I'm willing to take a crack at it, but I've never touched the internals of Webpack or Storybook before, and don't really understand how they interact.

I think @igor-dv 's your man here. 馃槈

@jrr Happy to help you get started, message me on our discord, if you'd like some help getting setup and understanding the code!

https://discord.gg/sMFvFsG

@igor-dv anything i can do to get this going?

edit: someone has to hold the stale bot off ;)

Interim solution: I just used this webpack plugin https://www.npmjs.com/package/webpack-filter-warnings-plugin

@hipstersmoothie the bot will not act on any issue or PR that's a labelled with todo or in progress FYI

@hipstersmoothie That sounds like a fine permanent solution to the problem, don't you agree?

I'd more expect the webpack stats object to work to some degree, but this is ok too. idk where it should be documented though.

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

I just used this webpack plugin to sort, filter and organize webpack stats: https://www.npmjs.com/package/webpack-shower

anyone still using webpack-shower or webpack-filter-warnings-plugin? I am on Storybook 6.0.22 and can not get rid of that warning. Tried both plugins.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shilman picture shilman  路  3Comments

arunoda picture arunoda  路  3Comments

miljan-aleksic picture miljan-aleksic  路  3Comments

oriSomething picture oriSomething  路  3Comments

purplecones picture purplecones  路  3Comments