News for hackers. Stuff that matters.
Re:Webpack: The Missing Tutorial by Blaiz0r on Monday September 05, 2016 @11:45AM (#12430860)
I hate to say it (I've enjoyed the benefits of using webpack on a few projects now) but I feel like it's all a bit too late for webpack (2).

Rollup or Brunch seem to offer a preferable alternative with speed, ease of use, and optimisation.

Re:Webpack: The Missing Tutorial by sotojuan on Monday September 05, 2016 @12:30PM (#12431095)
Considering the React community has settled on Webpack and from what I hear so has Angular 2, I think it's here to stay for a while.
Re:Webpack: The Missing Tutorial by thelarkinn on Monday September 05, 2016 @02:41PM (#12431673)
Yes exactly! Out of the box webpack solves a bunch of really complex problems that frameworks or 10tools combined would have to solve (code-splitting, lazy-loading, multiple targets (webworker, web, node, electron, etc.).

Our vision is to be able to integrate as many perf features as possible, (sw-precache, rollup module inlining, a universal generic compressor/minifier for es6).

Re:Webpack: The Missing Tutorial by tiles on Monday September 05, 2016 @11:48AM (#12430873)
What is Rollup vs Brunch? Coming from someone who just understood why we have Webpack vs Browserify.
Re:Webpack: The Missing Tutorial by Blaiz0r on Monday September 05, 2016 @12:15PM (#12431023)
They're both alternative build tools

Rollup is very similar to Webpack but is architectually different to allow it to optimise assets further and faster.

Brunch has actually been around since before Grunt, it's just not marketed. It works in very simple fashion, just install plugins via npm and start using them, no need to edit configuration files (unless you have very specific requirements).

I would consider Rollup as the new hotness, building upon the success of other tools and starting from a better position to create an optimised tool.

Brunch is a long time standing tool that does a job very well and if your project doesn't require any special configuration or architecture it's so easy to use (it can be configured though).

Re:Webpack: The Missing Tutorial by thelarkinn on Monday September 05, 2016 @02:45PM (#12431690)
Rollup as the new hotness for _libraries_. We know that libraries see a weak point for us as well as runtime overhead for many modules in Webpack bundles, but Rollup is just tackling one challenge and that is js perf. Webpack manages all of your assets (even if they don't get bundled together). Along with a hundred different out of the box features.
Re:Webpack: The Missing Tutorial by namelezz on Monday September 05, 2016 @01:51PM (#12431436)
How fast is Brunch and Rollup compared to Webpack? Is there something similar to Webpack dev server [0] in Rollup?

[0] - https://webpack.github.io/docs/webpack-dev-server.html

Re:Webpack: The Missing Tutorial by thelarkinn on Monday September 05, 2016 @02:43PM (#12431683)
Here is a up to date write-up for our proposal and review of performance in our repo https://github.com/webpack/webpack/issues/2873#issuecomment-...
Re:Webpack: The Missing Tutorial by namelezz on Monday September 05, 2016 @02:49PM (#12431709)
Thank you for the link. This sounds scary though.

> Webpack will perform less-favorably compared to Rollup as the number of modules increases.

Re:Webpack: The Missing Tutorial by thelarkinn on Monday September 05, 2016 @07:06PM (#12432691)
It's not, in the end load and runtime perf boil down more to what and how much you load up front.
Re:Webpack: The Missing Tutorial by bansheehash on Monday September 05, 2016 @12:45PM (#12431167)
Google Chrome developers just made a video about it: https://www.youtube.com/watch?v=OhPUaEuEaXk
Re:Webpack: The Missing Tutorial by pluma on Monday September 05, 2016 @01:03PM (#12431235)
To clarify because I nearly skipped over this video thinking it's about those two:

The video actually explains what browserify/webpack do, as well as what rollup brings to the table. I don't think it covers brunch, however -- maybe I missed it.

Make sure to watch the video with annotations. There are a lot of related links and clarifications.

Re:Webpack: The Missing Tutorial by RobertKerans on Monday September 05, 2016 @12:58PM (#12431213)
Brunch is purely an asset build tool. Almost zero-config, very fast, older than Grunt, used for Elixir's Phoenix framework to deal with frontend so got a bit of traction recently.
Re:Webpack: The Missing Tutorial by raarts on Monday September 05, 2016 @06:13PM (#12432508)
And recently introduced hot reloading support.
Re:Webpack: The Missing Tutorial by nnain on Monday September 05, 2016 @01:02PM (#12431233)
Hah, I hear you! It's barely been 2 month that I got started with Webpack/React. Gave me a pretty hard time, learning all it's quirks... specially the way it handles CSS. And seems there's something new on the block already!
Re:Webpack: The Missing Tutorial by thelarkinn on Monday September 05, 2016 @02:39PM (#12431654)
The margin in size and speed for webpack2 compared to rollup is pretty minimal ~5%. Plus we plan on integrating rollup scope hoisting after we release webpack 2.x (which is stable, however pending the finishing of our documentation)!!!
Re:Webpack: The Missing Tutorial by sergiotapia on Monday September 05, 2016 @01:13PM (#12431285)
I agree, Brunch is infinitely easier to use. It's used as the default asset compilation tool for new Elixir Phoenix projects.
Re:Webpack: The Missing Tutorial by tdumitrescu on Monday September 05, 2016 @02:17PM (#12431547)
Interesting, I've pretty much entirely replaced brunch with webpack in my projects over the last few years, and found it much easier. The larger adoption and active community made it a lot easier to move forward when encountering webpack issues; surely that's thanks to the rapid spread of react, but if it means I spend less time wading through build problems in my non-react projects then that's fine with me.
Re:Webpack: The Missing Tutorial by Blaiz0r on Monday September 05, 2016 @04:31PM (#12432091)
What Sort of problems did you come across with Brunch that Webpack solved for you?
Re:Webpack: The Missing Tutorial by tootie on Monday September 05, 2016 @03:57PM (#12431952)
The rate of new JavaScript build tools is absolutely ludicrous.
Re:Webpack: The Missing Tutorial by flukus on Monday September 05, 2016 @08:37PM (#12433004)
I get the impressions javascript devs can't google, the just write a new version of whatever tool they need.