Overview of Shakapacker features and capabilities
mainShakapacker is the successor to rails/webpacker, providing a manifest-backed bridge between Rails and modern bundlers like webpack 5 or Rspack.
Key Features:
- Bundler Support: First-class support for Rspack (up to 17x faster than webpack), webpack 5, and managed bundler stacks via
shakapacker-webpackorshakapacker-rspack(v10.1+). - Transpilation: Supports JavaScript/TypeScript via SWC, Babel, or esbuild.
- Rails Integration: Native manifest integration and view helpers for bundled assets.
- Modern Web Dev: Support for Code splitting, HMR (Hot Module Replacement), CDN asset hosts, Subresource Integrity (SRI), and HTTP 103 Early Hints.
- Package Managers: Compatible with npm, Yarn, pnpm, and Bun.
- Optional Integrations: Extra packages are available for React, TypeScript, Sass, Less, Stylus, CSS, PostCSS, and CoffeeScript.