Skip to content
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

Way to disable Storybook from logging verbose on Travis? #2029

Closed
erichdev opened this issue Oct 12, 2017 · 7 comments
Closed

Way to disable Storybook from logging verbose on Travis? #2029

erichdev opened this issue Oct 12, 2017 · 7 comments

Comments

@erichdev
Copy link

I have an app that runs Storybook in its Travis build, and Storybook is logging several thousand lines. Is there a way to disable this? It's making it hard to go through the log and causes lag with scrolling because of how long it is.

storybook

@danielduan
Copy link
Member

Looks like you're already using a custom webpack file. You can just add some additional configuration to silence the output.

https://webpack.js.org/configuration/stats/

@erichdev
Copy link
Author

@danielduan Thanks for the response. Adding stats: 'none' did not stop the logging. I also tried stats: { chunks: false, chunkModules: false, maxModules: false } based on tips I found here, still no effect. I even tried adding both variations directly to the config at @storybook/react/dist/server/config/defaults/webpack.config(&prod).js and it still logs. Is this purely a webpack issue? Any ideas why adding the stats option had no effect?

@danielduan
Copy link
Member

you shouldn't be running start-storybook on a server. that's intended for development purposes.

take a look at build-storybook. it outputs a static bundle so you can host it on any http server.

@erichdev
Copy link
Author

Found the root cause -- Storybook's webpack config uses ProgressPlugin which does all the logging, regardless of the { stats: 'none' } config. My solution was to remove that plugin with storybookBaseConfig.plugins.pop(). Let me know if there's a better solution, since this may not be safe if Storybook's config changes in the future.

@Hypnosphi
Copy link
Member

Hypnosphi commented Oct 18, 2017

I'd suggest this:

storybookBaseConfig.plugins = storybookBaseConfig.plugins.filter(plugin =>
  plugin.constructor.name !== 'ProgressPlugin')

@stale
Copy link

stale bot commented Dec 2, 2017

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 60 days. Thanks!

@stale stale bot added the inactive label Dec 2, 2017
@stale
Copy link

stale bot commented Dec 17, 2017

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!

@stale stale bot closed this as completed Dec 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants