GitHub logo rails / webpacker

Use Webpack to manage app-like JavaScript modules in Rails

Webpacker

Build Status node.js Gem

Webpacker makes it easy to use the JavaScript pre-processor and bundler webpack 4.x.x+ to manage application-like JavaScript in Rails. It coexists with the asset pipeline as the primary purpose for webpack is app-like JavaScript, not images, CSS, or even JavaScript Sprinkles (that all continues to live in app/assets).

However, it is possible to use Webpacker for CSS, images and fonts assets as well in which case you may not even need the asset pipeline. This is mostly relevant when exclusively using component-based JavaScript frameworks.

NOTE: The master branch now hosts the code for v5.x.x. Please refer to 4-x-stable branch for 4.x documentation.

Table of Contents

Prerequisites

  • Ruby 2.4+
  • Rails 5.2+
  • Node.js 10.13.0+
  • Yarn 1.x+

Features

View on GitHub