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

hide chunks/warnings in storybook #560

Closed
joscha opened this issue Oct 24, 2016 · 5 comments
Closed

hide chunks/warnings in storybook #560

joscha opened this issue Oct 24, 2016 · 5 comments

Comments

@joscha
Copy link
Member

joscha commented Oct 24, 2016

Has anyone had any luck disabling the chunk display when running storybook with a warning, e.g.:

...
 [2572] ./~/react-modal/lib/index.js 49 bytes {1} [built]
 [2573] ./~/react-simple-di/dist/index.js 2.96 kB {1} [built]
 [2574] ./~/shallowequal/modules/index.js 1.18 kB {1} [built]
 [2611] ./~/uuid/rng-browser.js 735 bytes {1} [built]
 [2612] ./~/uuid/uuid.js 5.29 kB {1} [built]

WARNING in ./packages/ak-editor-schema/~/ajv/dist/ajv.bundle.js
Critical dependencies:
1:476-483 This seems to be a pre-built javascript file. Though this is possible, it's not recommended. Try to require the original source to get better results.
 @ ./packages/ak-editor-schema/~/ajv/dist/ajv.bundle.js 1:476-483

I tried

  storybookBaseConfig.stats = {
      warnings: false,
      chunks: false,
    };
  storybookBaseConfig.devServer = {
    stats: {
      warnings: false,
      chunks: false,
    },
  };
  storybookBaseConfig.webpackMiddleware = {
    stats: {
      warnings: false,
      chunks: false,
    },
  };

to no avail

@pierrecholhot
Copy link

I'm also struggling trying to hide those chunks and warnings. However @joscha regarding your specific warning, you could try and circumvent it by making webpack ignore this file.

storybookBaseConfig.module = {
  noParse: [/ajv\.bundle\.js/],
  loaders: [ ... ]
}

@evandavis
Copy link

Same, this is currently driving me nuts.

I want to see warnings and errors; I never want to see chunk output.

@arunoda
Copy link
Member

arunoda commented Jan 12, 2017

Yep. This is needed.
We may wanna use this: https://github.com/geowarin/friendly-errors-webpack-plugin

I'm open for a PR for this.

@banditrider
Copy link

Did anyone achieve this issue's goal with @arunoda's suggestion?

Nice plugin, but it doesn't silence Webpack's output, needs to be done manually. Which this issue is all about.

Has anyone found a working solution?

@danielduan
Copy link
Member

I think the output has been silenced for the default webpack config. If you're using a custom config, you might still run into this. Closing.

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

7 participants