Added
- Added supplemental npm packages
shakapacker-webpackandshakapacker-rspack. PR #1096 by justin808. Optional packages that lockstep with core and bundle the managed-build stack as directdependencies(so a singleyarn add shakapacker-webpackpulls inshakapacker,webpack,webpack-cli, andwebpack-assets-manifest; the rspack package bundlesshakapacker,@rspack/core,@rspack/cli, andrspack-manifest-plugin). Optional features (transpilers, dev-server, CSS preprocessors, react-refresh) remain as opt-inpeerDependenciesso SCSS/native-binding bloat isn't forced on every install. The wrappers emit structured warnings (SHAKAPACKER_BUNDLER_MISMATCH,SHAKAPACKER_NO_TRANSPILER) whenconfig.assets_bundlerorjavascript_transpilerdoesn't match the installed peers. See the v10.1 migration guide for adoption steps anddocs/dependency-strategy.mdfor the design rationale and v11 roadmap. - Added
shakapacker:doctorcheck for disabled Rspack cache. PR #1100 by justin808. The doctor now inspects the Rspack config file for an explicitcache: false, warns when found (disabling cache causes significantly slower builds), and also flags Rspack v1 installs (where persistent cache is experimental) with a recommendation to upgrade to v2. - Added a
shakapacker:doctorhint to compiler output. PR #1100 by justin808. The compiler now logs a one-time tip suggestingbundle exec rake shakapacker:doctorafter a failed compilation, so healthy build loops stay quiet.
Migration Notes
-
Simplify your
package.jsonby adopting a supplemental package. Existing apps can drop the explicit managed-build deps fromdevDependenciesand rely on the bundled stack:- Rspack apps can replace
shakapacker+@rspack/core+@rspack/cli+rspack-manifest-pluginwith a singleshakapacker-rspack. Seepackages/shakapacker-rspack/README.md§"Simplifying an existing rspack install" for the before/after. - Webpack apps can replace
shakapacker+webpack+webpack-cli+webpack-assets-manifestwith a singleshakapacker-webpack. Seepackages/shakapacker-webpack/README.md§"Simplifying an existing webpack install" for the before/after. - Optional peers (transpilers,
webpack-dev-server, CSS preprocessors, react-refresh) stay only if your app uses those features. - Adoption is opt-in: leaving your
package.jsonuntouched on v10.1 also continues to work.
- Rspack apps can replace
-
Adopting
shakapacker-webpackrequireswebpack-assets-manifest@^6.0.0. Coreshakapackerstill accepts both v5 and v6 (^5.0.6 || ^6.0.0), butshakapacker-webpackpins~6.5.1. Apps still onwebpack-assets-manifest@5.xmust upgrade when switching to the supplemental package; v6 fixed an ENOENT crash on clean builds withmerge: trueand dropped a Node 14 install path. See the v5→v6 release notes andpackages/shakapacker-webpack/README.mdfor details.
⚠️ Breaking Changes
- Breaking: tightened
package.jsonengines.nodeto^20.19.0 || >=22.12.0. PR #1099 by justin808. Raised from>= 20, dropping support for Node 20.0.0–20.18.x and Node 21.x to match@rspack/core@2.0.0-rc.0. Consumers on those versions will hit an engine error with--engine-strictor yarn workspaces and need to upgrade. The PR also bumps.node-versionto22.20.0and updatesconductor-setup.shto enforce the same disjoint range up front, so contributors get a clear error beforeyarn installfails with a confusing engine mismatch.
Changed
- Changed
shakapacker:installto default fresh Rspack installs to v2 (^2.0.0-0). PR #1091 by ihabadham.lib/install/package.jsonnow declares@rspack/coreand@rspack/clias^1.0.0 || ^2.0.0-0; fresh installs pick the v2 range. Existing apps are unaffected. Note: Rspack v2 requires Node.js 20.19.0+. - Slimmed the published gem from ~486K (294 files) to ~121K (75 files). PR #1110 by justin808. Replaced the broad
git ls-filesgem manifest with an explicit runtime/install allowlist (CHANGELOG.md,MIT-LICENSE,README.md, gemspec,lib,sig), excluding repo-only docs, tests, JavaScript package source, CI/tooling files, andtest_filesmetadata from the published gem. Fixes #987.
Fixed
- Fixed Rspack React Refresh plugin loading with
@rspack/plugin-react-refreshv2. PR #1116 by justin808. Shakapacker now reads the v2 namedReactRefreshRspackPluginexport while retaining compatibility with v1 direct/default CommonJS export shapes, preventingTypeError: ReactRefreshRspackPlugin is not a constructorduring rspack dev-server startup. - Widened
@rspack/plugin-react-refreshpeer range to^1.0.0 || ^2.0.0-0. PR #1091 by ihabadham. Fixes theERESOLVEconflict when installing@rspack/plugin-react-refresh@^2.0.0alongsideshakapacker@10.0.0. - Fixed
NodePackageVersion#find_versionfor local-pathshakapackerinstalls (e.g.yalc,file:, relative paths). PR #1086 by justin808. The version check now consultspackage.jsonfirst and short-circuits on../orfile:dependencies, so stale lockfile semvers no longer trigger false gem↔node version mismatches.package_json_dependencyalso consultsdevDependenciesin addition todependencies. TheLOCAL_PATH_REGEXconstant replaces a duplicated inline regex and anchors both alternatives to the start of the string, removing a latent false-positive on version strings containing..mid-value. - Detected single-dot (
./...) local-path declarations inNodePackageVersion#find_version. PR #1106 by justin808. ExtendedLOCAL_PATH_REGEXto treat./vendor/shakapacker-style declarations as local-path installs (alongside the../andfile:patterns added in #1086), so version checks short-circuit before consulting potentially stale lockfile semvers. Fixes #1103. - Fix rspack setup not reusing certain shared webpack-rspack config settings. PR #1085 by brunodccarvalho. Default config changes include
optimization.splitChunks.chunks="all",optimization.runtimeChunk="single", the webpack compression plugin in production, and the removal of minimization plugins in development. Fixes #984.