Gorakh Nath
Gorakh Nath

Reputation: 9828

What is difference between webpack 1 and webpack 2?

We are going to migrate from Webpack1 to Webpack2. but I want to know the basic difference between these two. How and Why the execution of webpack 2 is faster the webpack1?

Upvotes: 1

Views: 727

Answers (2)

Leandro Soares
Leandro Soares

Reputation: 2972

You can see what was changed here and see the changelog of v1. They recommend v2, because a lot of progress was made on performance.

I would recommend v3, since it has a lot of more features that have a great impact of build time and file sizes.

See Larkin's post about V3 official release

Edit

Since you're asking the real impact, I can't give you the answer, but it was a webpack's internal rework.

Beware that changing to v2/v3 has a lot of modifications on the configuration file.

But don't let those scary modifications prevent you from upgrading it. It's worth.

Upvotes: 1

Digger2000
Digger2000

Reputation: 546

There are some API changes in webpack 2. Here is a migration guide from webpack 1 to webpack 2: https://webpack.js.org/guides/migrating/

However, I don't really know if the second version is faster than the first (I didn't notice any difference in a build performance).

Upvotes: 1

Related Questions