A modern Webpack/Rspack integration for Rails that manages JavaScript modules and assets with support for hot module replacement.
Shakapacker is a Webpack and Rspack integration for Ruby on Rails applications that manages frontend JavaScript modules, stylesheets, and assets. It provides Rails view helpers, hot module replacement, and code splitting, allowing developers to use modern JavaScript tooling within Rails projects. It solves the problem of integrating complex frontend builds with Rails' asset pipeline by offering a flexible, performant alternative.
Rails developers who need to manage JavaScript, CSS, and assets with Webpack or Rspack, especially those upgrading from rails/webpacker or seeking faster build times with SWC/Rspack.
Developers choose Shakapacker because it's the officially maintained successor to rails/webpacker, offers up to 10x faster builds with Rspack, supports multiple transpilers (Babel, SWC, esbuild), and provides seamless Rails integration with view helpers and HMR.
Use Webpack to manage app-like JavaScript modules in Rails
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports both Webpack v5+ and Rspack, with Rspack offering up to 10x faster builds as highlighted in the README, allowing teams to choose based on speed needs.
Provides Rails view helpers like javascript_pack_tag and stylesheet_pack_tag for embedding compiled assets, and integrates with HMR for live reloading during development.
Offers multiple JavaScript transpilers (Babel, SWC, esbuild), with SWC being 20x faster than Babel, giving developers optimization options without vendor lock-in.
As the official successor to rails/webpacker, it's community-supported with long-term backing from ShakaCode, ensuring updates and bug fixes.
Customizing Webpack or Rspack setups requires deep knowledge of bundler configurations, and the README admits extensive customization may need manual tweaks in config files.
Installation involves multiple steps with prerequisites like Node.js 20+, and frequent version upgrades (e.g., v6 to v9) require following detailed migration guides, risking breaking changes.
It's tightly coupled to Ruby on Rails, making it unsuitable for projects outside the Rails ecosystem, unlike more generic bundling tools.
shakapacker is an open-source alternative to the following products: