Basics of Webpack

Rails 5.1 will support Webpack. Webpacker uses Webpack to manage app-like JavaScript modules in Rails. It's time to learn the basics of Webpack.

What is Webpack?

Webpack is a tool to build JavaScript modules in your application.

Why Webpack?

Bundlers take assets, such as JavaScript files in, and then transform them into format that's suitable for the browser of the end user to consume. This process of bundling happens to be one of the most important problems in web development and solving it well you can remove a large part of pain from the process.


Install the latest version of NodeJS. Open a new terminal and check the NodeJS version:

$ node -v

Install webpack locally.

npm install webpack --save-dev

To view the help:

webpack --help

For a simple webpack tutorial, see the link in the references section below.


Webpack Getting Started
Why Webpack
Simple webpack tutorial

Related Articles

Watch this Article as Screencast

You can watch this as a screencast Basics of Webpack

Ace the Technical Interview

  • Easily find the gaps in your knowledge
  • Get customized lessons based on where you are
  • Take consistent action everyday
  • Builtin accountability to keep you on track
  • You will solve bigger problems over time
  • Get the job of your dreams

Take the 30 Day Coding Skills Challenge

Gain confidence to attend the interview

No spam ever. Unsubscribe anytime.