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

Expose webpack stats config on webpack dev middleware #174

Conversation

andresgutgon
Copy link
Contributor

Why?

I want to be able to manage what is the output of dev server. I think passing webpack.stats options to dev middleware is a good way. What do you think?

@sapegin
Copy link
Member

sapegin commented Aug 30, 2016

Thanks! Would be nice to document it with some use cases.

And fix the build of course.

@sapegin
Copy link
Member

sapegin commented Aug 30, 2016

Now there are even more lint errors.

@andresgutgon
Copy link
Contributor Author

andresgutgon commented Aug 30, 2016

I use spaces in my editor :trollface:
uglqmy5

@sapegin
Copy link
Member

sapegin commented Aug 30, 2016

Use EditorConfig and run npm t before commit. It’s easy.

@andresgutgon
Copy link
Contributor Author

Yes! 🍏

@sapegin sapegin merged commit 085e273 into styleguidist:master Aug 30, 2016

app.use(require('webpack-dev-middleware')(compiler, {
noInfo: true,
stats,
Copy link
Contributor Author

@andresgutgon andresgutgon Aug 31, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this is right? I just installed the package from github and I'm getting this error:

~/my-code/react-component-ui-styleguide npm run react-styleguide-server

> styleguidist server

/my-code/node_modules/react-styleguidist/src/server.js:19
        stats,
             ^
SyntaxError: Unexpected token ,

This code is using ES6?

Should we change this to stats: stats? I did this becasue eslint was complaining about it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What Node version are you using? Shorthand properties should be supported in Node 4.x: http://node.green/ and I’m going to rise the minimum Node version to 4 anyway soon.

Copy link
Contributor Author

@andresgutgon andresgutgon Aug 31, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was that, we're using 0.12. Just today we switched to 4.5.x :) 🎉 . Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants