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

How to enable [HMR] console logging in 5.2 #8308

Closed
dnielbowen opened this issue Oct 7, 2019 · 10 comments
Closed

How to enable [HMR] console logging in 5.2 #8308

dnielbowen opened this issue Oct 7, 2019 · 10 comments

Comments

@dnielbowen
Copy link
Contributor

dnielbowen commented Oct 7, 2019

I'm hesitant to upgrade from 5.1 to 5.2, as it appears Webpack's [HMR] console logging has been disabled. Can this be re-enabled through configuration?

I've tried creating ./.storybook/webpack.config.js with:

module.exports = async ({ config, mode }) => {
  config.devServer = { stats: "verbose" };
  return config;
};

...and an assortment of variations, but no change.

@shilman
Copy link
Member

shilman commented Oct 7, 2019

@ndelangen any ideas?

@stale
Copy link

stale bot commented Oct 28, 2019

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!

@stale stale bot added the inactive label Oct 28, 2019
@cliffpyles
Copy link

cliffpyles commented Nov 20, 2019

I haven't figured out the solution, but I believe I've tracked down what is causing the behavior. From what I can tell the devServer configuration is being passed to Webpack correctly, and the configuration goes to webpack-dev-middleware as intended. The issue is with webpack-hot-middleware though. It allows for a quiet property to be passed and currently it is being set with a true value, which is suppressing output.

router.use(webpackHotMiddleware(previewCompiler));

https://github.com/webpack-contrib/webpack-hot-middleware

I hope this helps!

@stale stale bot removed the inactive label Nov 20, 2019
@dnielbowen
Copy link
Contributor Author

dnielbowen commented Nov 21, 2019

That's it! I'm not seeing an easy way to get to it through configuration, but in the line...

result = result.concat(
`${require.resolve('webpack-hot-middleware/client')}?reload=true&quiet=true`
);

...changing quiet=true to quiet=false enables the console output again. Thanks!

@cliffpyles
Copy link

No problem. Glad you figured out!

@BPScott
Copy link

BPScott commented Dec 12, 2019

Yo @eldewen will you be opening up a PR for bring the warnings back?

@stale stale bot removed the inactive label Dec 12, 2019
@storybookjs storybookjs deleted a comment from stale bot Dec 13, 2019
@stale
Copy link

stale bot commented Jan 3, 2020

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!

@stale stale bot added the inactive label Jan 3, 2020
@BPScott
Copy link

BPScott commented Jan 4, 2020

poke stale bot, I'd still like to see this ticket addressed

@stale stale bot removed the inactive label Jan 4, 2020
@stale stale bot added the inactive label Jan 25, 2020
@storybookjs storybookjs deleted a comment from stale bot Jan 26, 2020
@stale stale bot removed the inactive label Jan 26, 2020
@shilman
Copy link
Member

shilman commented Jan 26, 2020

@BPScott see #9535
@ndelangen can we close?

@ndelangen
Copy link
Member

Yes, I think that resolves this issue.

@shilman shilman closed this as completed Jan 27, 2020
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

5 participants