Subscribe to a Premium Development Newsletter by TheDevCouple! What is TheDevTakeaway?

In late 2014, to split JavaScript files into maintainable modules, Browserify was introduced. Recently, WordPress is rapidly moving towards JavaScript.

A significant part of Gutenberg is composed of JavaScript. So, it is quite obvious to take a step towards the latest bundle manager available for JavaScript.

That’s why Adam Silverstein proposed to replace Browserify with Webpack four months ago.

Webpack Makes It to the WordPress Core as A JS Bundle Manager 1 Community

While Browserify has served us well, Webpack is probably a better long-term choice for the project, especially with the introduction of a new JavaScript framework that may require a build.

β€” Use Webpack instead of Browserify for build process

WordPress contributors made this decision four months ago. They even reached out to the contributors of Webpack for their review.

πŸ† After four months of hard work, the ticket finally made it to WordPress core on October 4th, 2017.

πŸŽ‰Β Kudos to the contributors who made it all possible.

πŸ€”Β What is a Bundle Manager?

To put in simple words, a bundle manager lets you use all of your project dependencies in the browser. It can also perform some other tasks like minifying, linting, testing, etc. Browserify and Webpack are the names of bundleΒ managers for JavaScript.

WordPress used to have Browserify to maintain its JS components. Webpack replaced it last week.

Here are some of the qualities of Webpack which made it a more natural choice.

βœ”οΈŽ Pros of Using Webpack

  • Webpack is easy to implement.
  • Webpack does not require automation scripts like Gulp or Grunt.
  • It has a single configuration file for the entire build process.
  • Webpack provides automation tasks like minification out of the box.
  • It also supports liveΒ reloading.
  • And it does all of these tasks without requiring help from the outside scripts.

It is imminent that a JavaScript framework might land in WordPress core.Β So, Webpack looks like a smart choice to have around when that happens.

Do you think it was a smart decision? Let us know in the comments.



A Premium Development Newsletter by TheDevCouple! What is TheDevTakeaway?

Meet Ameer Dagha the man behind ReviewsPK Platform Improvements by Kinsta Hosting That You Should Not Miss Hacktoberfest 2019 Meetup β€” DigitalOcean, JAMstack, & Everything Else!
There are currently no comments.

πŸ™Œ You must have something to say here...