Skip to main content

JavaScript Bundling for Rails

Shakapacker

Production-focused docs for configuring, deploying, and upgrading Shakapacker in Rails applications.

Quick Start

Install Files

bin/rails shakapacker:install

Open guide

Rspack Support

Shakapacker ships with first-class Rspack support — a Rust-powered bundler that’s wire-compatible with Webpack 5 but dramatically faster. Switch bundlers with a one-line config change; no migration rewrite needed.

Drop-in Webpack replacement

Rspack is wire-compatible with Webpack 5. Existing loaders, plugins, and config files work without rewriting your build pipeline.

2-4x faster builds

Written in Rust, Rspack delivers dramatically faster cold starts, warm-cache rebuilds, and incremental production builds compared to Webpack.

Rails-native integration

Unlike Vite, Rspack works with Shakapacker out of the box — no ejecting from the Rails asset pipeline, no custom server configuration.

Why Teams Use It

Drop-in Rails integration for modern JavaScript bundling with Webpack 5 and Rspack support.

Rails-first workflowKeep your existing conventions

Full guides for configuration, upgrades, and troubleshooting ship with every release — always in sync with the version you're running.

Docs from sourceBrowse docs in the docs/ directory
Academia.eduCase Study

2-4x build speed increase. Warm-cache startup went from ~1m to ~20s, and incremental prod builds now take ~10s.

2-4xfaster builds
~20swarm-cache startup
~10sincremental deploys

Jon Rajavuori — ShakaCode helped Academia.edu migrate from Webpack to Rspack

Docs Architecture

Canonical markdown stays in shakapacker/docs. This site syncs that content at build time, so docs stay co-located with the code while deployment remains independent.