Shakapacker (v10)
Shakapacker is the official, actively maintained successor to rails/webpacker. It gives Rails apps a manifest-backed bridge to webpack 5 or Rspack, with view helpers, installer tasks, binstubs, and configuration conventions that still allow direct bundler customization.
Shakapacker 10 supports Rspack β up to 17x faster than webpack per upstream benchmarks.
The canonical markdown source stays in this repository's docs/
directory and is published to the docs site.
Documentation
Full documentation lives at shakapacker.com/docs. Start here:
| Need | Link |
|---|---|
| Decide if Shakapacker + Rspack is right | Why Shakapacker with Rspack |
| Install Shakapacker | Installation |
Configure config/shakapacker.yml
|
Configuration |
| Use the JavaScript/Node API | Node Package API |
| Render assets with view helpers | API Reference |
| Add React, TypeScript, or CSS | React & integrations |
| Move from webpack to Rspack | Rspack Migration |
| Compare generated webpack/Rspack configs | Config Diff |
| Deploy compiled assets | Deployment |
| Upgrade an existing app | Common Upgrades |
| Troubleshoot builds | Troubleshooting |
| Review releases | Changelog |
Why Shakapacker
- Rails-native manifest integration and view helpers for bundled assets.
- Support for webpack 5 and first-class Rspack builds.
- JavaScript and TypeScript transpilation through SWC, Babel, or esbuild.
- Development binstubs for watch mode and the webpack dev server.
- Code splitting, HMR, CDN asset hosts, Subresource Integrity, and HTTP 103 Early Hints support.
- Compatibility with npm, Yarn, pnpm, and Bun.
- Optional
shakapacker-webpackandshakapacker-rspackpackages in 10.1+ that consolidate the managed bundler stack into one dependency.
Optional support
Optional integrations require extra packages only when you use them: React, TypeScript, stylesheets with Sass, Less, Stylus, CSS, PostCSS, and CoffeeScript.
For why you might choose this stack over importmaps, jsbundling-rails, or
vite-rails, see
Why Shakapacker with Rspack.
See also a comparison of
Shakapacker with jsbundling-rails.
For an in-depth discussion of choosing between shakapacker and
jsbundling-rails, see the discussion
Webpacker alternatives - which path should we go to? #8783
and the resulting PR
Switch away from Webpacker to Shakapacker #10389.
Installation
For an existing Rails app:
bundle add shakapacker --strict
bundle exec rake shakapacker:installFor a new Rails 6+ app:
rails new myapp --skip-javascript
cd myapp
bundle add shakapacker --strict
bundle exec rake shakapacker:installSee the installation guide for requirements, package-manager selection, non-interactive installer modes, and verification steps.
Upgrading
Shakapacker ships as both a Ruby gem and an npm package; keep them on matching versions. Use the common upgrade guides for package-manager changes, Babel-to-SWC migration, webpack-to-Rspack migration, and release-to-release upgrade paths.
Older major-version docs:
- v10.0.0 release notes
- v9 upgrade guide
- v8 upgrade guide
- v7 upgrade guide
- v6 upgrade guide
- v6 stable branch
Example Apps
ShakaCode Support
ShakaCode focuses on helping Ruby on Rails teams use React and Webpack better. We can upgrade your project and improve your development and customer experiences, allowing you to focus on building new features or fixing bugs instead.
For an overview of working with us, see our Client Engagement Model article and how we bill for time.
We also specialize in helping development teams lower infrastructure and CI costs. Check out our project Control Plane Flow, which can allow you to get the ease of Heroku with the power of Kubernetes and big cost savings.
If you think ShakaCode can help your project, click here to book a call with Justin Gordon, the creator of React on Rails and Shakapacker.
Here's a testimonial of how ShakaCode can help from Florian GΓΆΓler of Blinkist, January 2, 2023:
Hey Justin π
I just wanted to let you know that we today shipped the webpacker to shakapacker upgrades and it all seems to be running smoothly! Thanks again for all your support and your teams work! π
On top of your work, it was now also very easy for me to upgrade Tailwind and include our external node_module based web component library which we were using for our other (more modern) apps already. That work is going to be shipped later this week though as we are polishing the last bits of it. π
Have a great 2023 and maybe we get to work together again later in the year! π
Read the full review here.
Here's a testimonial from Jon Rajavuori of Academia.edu about migrating frontend builds from Webpack to rspack with ShakaCode's help, shared in March 2026:
We've been running rspack most of the week now for frontend builds! It's a performance-focused drop-in replacement for Webpack that apparently works as advertised. The impact has been between a 2-4x build speed increase depending on the environment and conditions.
The typical case of first startup with a warm cache has gone from roughly 1m with Webpack down to about 20s β close to the amount of time other dev components take to startup.
As for production incremental builds, they now take around 10s when only a few lines in one bundle have changed!
Additional stats from follow-up conversation with Jon:
- Cold-cache startup: 4m30s β 3m30s (~22% faster; 2-4x gains apply to warm-cache and incremental builds)
- Production incremental builds: ~10 seconds
- HMR rebuild time: unchanged at ~8s (bottleneck is orchestration, not compilation)
Community and Support
- Ask questions in the React + Rails Slack community.
- Report bugs or request features in GitHub Issues.
- Get direct help from ShakaCode, the team that maintains Shakapacker and helps Rails teams migrate to Rspack, speed up build pipelines, and stabilize production deploys.
Contributing
See CONTRIBUTING.md for development setup, test commands, and pull request guidelines.
License
Shakapacker is released under the MIT License.
Supporters
The following companies support our Open Source projects, and ShakaCode uses their products!