Live data from Hacker News

Getting Started with Webpack 2

blog.madewithenvy.com

21–30 of 59 posts

Re: Getting Started with Webpack 2

#21

Now that Webpack has tree shaking, are there still reasons to use Rollup?

FWIW, Rollup's tree shaking results in a little smaller bundle than Webpack 2's and faster execution speed of the optimized code from testing of using it with ng-bootstrap (an Angular 2 library on top of Bootstrap), but not significant enough for us to justify moving our demo to Rollup.

That is just one situation though.

Re: Getting Started with Webpack 2

#22

Now that Webpack has tree shaking, are there still reasons to use Rollup?

Rollup's gains come mainly from the way it combines modules into a single scope, rather than wrapping them in functions and shipping a module loader with the bundle. It's not uncommon to see parse/evaluate time plummet when switching to Rollup because of this, which is often more important than the number of bytes.

However Rollup currently lacks a lot of features that make Webpack a good choice for large and complex apps.

You can get a feel for the code Rollup generates at http://rollupjs.org.

Re: Getting Started with Webpack 2

#23
post #8

Semi-related: I also found it useful to name the config file webpack.config.babel.js instead of webpack.config.js so I can use ES6 in my Webpack config.

Also see interpret [1] which is used by Webpack internally (afaik). For instance, when you name you configuration webpack.config.ts it will be transpiled by TypeScript before being loaded.

[1] https://www.npmjs.com/package/interpret

Re: Getting Started with Webpack 2

#24
post #20

Webpack 2 is so awesome that I'm really confused why haven't they released it as a non-beta yet. It's way past MVP and has more than enough quality for a non-beta. It looks like the maintainers want it to get perfect and release it "when it's done", and that is so wrong.

I can understand your concerns but we made a promise early on that we wouldnt release v2 from beta until our MVP docs milestone is complete.

We are just around 90% completion (http://github.com/webpack/webpack.js.org/milestone/1)

After that we will release v2. Help always wanted! <3

Re: Getting Started with Webpack 2

#25
post #2

What is the difference from Webpack 1? This tutorial seems identical to every other Webpack getting started I've read.

There's a list from the start of the year here: https://gist.github.com/sokra/27b24881210b56bbaff7

Id recommend our newer upgrade guide. https://webpack.js.org/how-to/upgrade-from-webpack-1/

Re: Getting Started with Webpack 2

#26
post #2

What is the difference from Webpack 1? This tutorial seems identical to every other Webpack getting started I've read.

There's a list from the start of the year here: https://gist.github.com/sokra/27b24881210b56bbaff7

Id recommend our newer upgrade guide. https://webpack.js.org/how-to/upgrade-from-webpack-1/

Re: Getting Started with Webpack 2

#28

Now that Webpack has tree shaking, are there still reasons to use Rollup?

Rollup's gains come mainly from the way it combines modules into a single scope, rather than wrapping them in functions and shipping a module loader with the bundle. It's not uncommon to see parse/evaluate time plummet when switching to Rollup because of this, which is often more important than the number of bytes. However Rollup currently lacks a lot of features that make Webpack a good choice for large and complex…

Rich couldn't have said better !!!!
Post reply on HN