js-dxtools / webpack-validator

Validates your webpack config with Joi
MIT License
295 stars 29 forks source link

Strict mode - Never include anything from standard Node? #76

Closed bebraw closed 8 years ago

bebraw commented 8 years ago

This can bloat a bundle surprisingly so it would be good to at least warn against this. It's easy to end up in a situation where a dependency of a dependency brings some heavy Node part to your bundle.

jonathanglasmeyer commented 8 years ago

How should this be inferred from the config?

bebraw commented 8 years ago

It cannot be inferred trivially. That's the problem. There would have to be something that's able to peek at webpack stat output.

jonathanglasmeyer commented 8 years ago

Sounds like a tangential, new project, but not like webpack-validator, which only analyzes config, don't you think? It'd be interesting though, could be called "webpack-bundle-analyzer", analyzing result bundle by looking at stats.

bebraw commented 8 years ago

Yup. A separate project would be fine. Just wanted to dump this somewhere. 👍

bebraw commented 8 years ago

Related project btw, https://github.com/robertknight/webpack-bundle-size-analyzer .

jonathanglasmeyer commented 8 years ago

I've used https://github.com/robertknight/webpack-bundle-size-analyzer in the past to analyze bundle size. Would this already be of help for the given problem?

Edit: ok you just posted it. :D

bebraw commented 8 years ago

Yeah, I was just thinking it would make sense to discuss with that guy.

jonathanglasmeyer commented 8 years ago

So we can probably close this here, right?

bebraw commented 8 years ago

Yeah. Let's close this one.