|
|
|
|
|
by maemilius
2529 days ago
|
|
Why? Webpack has gotten significantly easier to get up and running with since Webpack 4 (iirc). Sure, it starts getting complicated if you want to add language features that haven't made it into browsers yet (i.e. Babel) or use something that transpiles to JavaScript (e.g. TypeScript), but the really popular ones have plenty of good documentation on how to set them up and what each piece is doing. I've only had to set up Webpack a couple times and I've already internalized most of the important stuff. Source Maps are still black magic to me though... |
|
OK, so...
And finally... It's a solution to a problem that only exists because of the dependency culture in the JS community. Because each dependency contains a lot more code than is needed to solve the one problem it was imported to solve, web apps tend to bloat. So we need to break them into modules and only import the modules we need. So we need a tool to do that and package the modules up. So we get Webpack. Instead, why don't we just import less code in the first place? We really (and I mean really) don't need 500Kb of javascript to create a basic web app. If we could cut that down to 100Kb then we could just minimise it and we wouldn't need webpack at all (maybe Gulp to run Babel for those oh-so-necessary new cool JS features).