News for hackers. Stuff that matters.
Re:Forgo JavaScript packaging? Not so fast by chowes on Tuesday November 24, 2015 @11:10AM (#10621518)
Webpack's chunking (https://github.com/webpack/docs/wiki/optimization#multi-page...) will help you get the "hybrid" approach easily. It lets you separate out common modules into JS files for you to load when needed.
Re:Forgo JavaScript packaging? Not so fast by zackify on Tuesday November 24, 2015 @02:28PM (#10622962)
That's what came to mind reading this. Why a whole post on this when you can literally just go look at the webpack docs and do this in 5 seconds.
Re:Forgo JavaScript packaging? Not so fast by vectorpush on Tuesday November 24, 2015 @03:47PM (#10623566)
I love webpack and highly recommend it, but it is not trivial to integrate it into an existing project and pretty much nothing about webpack can be described as "done in 5 seconds".
Re:Forgo JavaScript packaging? Not so fast by dustingetz on Tuesday November 24, 2015 @04:00PM (#10623647)
I did it in a big project it took a couple days, really wasn't that big a deal, and legacy JavaScript still goes through webpack and works unmodified, then a couple weeks to iron out any kinks in the CI scripts (but was still developing during this time)
Re:Forgo JavaScript packaging? Not so fast by vectorpush on Tuesday November 24, 2015 @04:46PM (#10623800)
A couple days sounds about right and jives with my own experiences, but I feel like "do this in 5 seconds" is pretty misleading, especially for someone who may have never used webpack before. It's absolutely worth the effort, but I wouldn't want someone to be discouraged had they expected a "5 second" solution but then realized it's not quite that simple.
Re:Forgo JavaScript packaging? Not so fast by muzmath on Wednesday November 25, 2015 @12:25AM (#10625491)
This is typical programmer attitude. Standard estimates go like this:

When trying to make themselves look good on online developer forums: 1/100th real development time

When estimating time involved for co-worker: 1/10th real development time

When estimating time involved for themselves at work: 1/2 real development time

Re:Forgo JavaScript packaging? Not so fast by phleet on Tuesday November 24, 2015 @04:35PM (#10623731)
Webpack's algorithm for doing this is not black magic -- it has to consciously consider the same tradeoffs as were involved in this post. How many chunks should you have?