Skip to content

Commit 31cd41e

Browse files
authored
docs: clarify rspack wrapper peer deps (#1193)
## Summary - Clarify that importing through `shakapacker-rspack` lets pnpm/Yarn users drop only the direct `shakapacker` dependency - Keep the required Rspack peers and `rspack-manifest-plugin` documented as explicit dependencies for strict package managers - Follow-up to #1185 and #1185 (comment) ## Validation - `yarn prettier --check docs/common-upgrades.md packages/shakapacker-rspack/README.md` - `git diff --check` - Ruby local markdown link existence check for touched docs - `yarn test --runInBand` - `.agents/bin/validate` progressed through RuboCop, ESLint, and gem specs (`1197 examples, 0 failures, 6 pending`), then stopped in local dummy browser specs because ChromeDriver supports Chrome 146 while installed Chrome is 149. Hosted CI should verify that browser lane with its runner browser/driver pair. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Clarified Rspack upgrade guidance for apps using supplemental packages. * Updated instructions to explain when the direct `shakapacker` dependency can be removed after switching config imports. * Added clearer dependency requirements so the needed Rspack packages and manifest plugin remain explicit. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 57d3bf1 commit 31cd41e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

docs/common-upgrades.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Shakapacker 10.1 introduces two optional npm packages — `shakapacker-webpack`
104104

105105
**This is opt-in.** Apps that don't change anything keep working on 10.1 exactly as they did on 10.0.
106106

107-
**Rspack apps** on npm 7+ can replace `shakapacker` + `@rspack/core` + `@rspack/cli` + `@rspack/dev-server` + `rspack-manifest-plugin` with a single `shakapacker-rspack` dev dependency. npm <7, Yarn Classic, pnpm, and Yarn PnP apps should list `shakapacker-rspack` plus those direct imports explicitly unless their config imports the supplemental wrapper directly.
107+
**Rspack apps** on npm 7+ can replace `shakapacker` + `@rspack/core` + `@rspack/cli` + `@rspack/dev-server` + `rspack-manifest-plugin` with a single `shakapacker-rspack` dev dependency. npm <7, Yarn Classic, pnpm, and Yarn PnP apps should list `shakapacker-rspack`, `shakapacker`, and the required Rspack peers explicitly. If the app changes its config imports from `shakapacker/rspack` to `shakapacker-rspack`, it can drop only the direct `shakapacker` dependency; `@rspack/core`, `@rspack/cli`, `@rspack/dev-server`, and `rspack-manifest-plugin` still need to stay explicit.
108108

109109
**Webpack apps** on npm 7+ can replace `shakapacker` + `webpack` + `webpack-cli` + `webpack-assets-manifest` with a single `shakapacker-webpack` dev dependency. npm <7, Yarn Classic, pnpm, and Yarn PnP apps should list direct imports explicitly. One caveat: `shakapacker-webpack` pins `webpack-assets-manifest` to `~6.5.1`, so apps still on `webpack-assets-manifest@5.x` need to upgrade to v6 when adopting it.
110110

packages/shakapacker-rspack/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ If your app already runs Shakapacker on Rspack, you can drop the managed-build d
5555
}
5656
```
5757

58-
Optional peers (`@rspack/plugin-react-refresh`, `css-loader`, `sass`, `sass-loader`) stay only if your app uses those features. Run `yarn install` (or the npm/pnpm equivalent) and the lockfile collapses to the managed stack. npm 7+ can auto-install the required peers; pnpm and Yarn users should keep `shakapacker`, `@rspack/core`, `@rspack/cli`, `@rspack/dev-server`, and `rspack-manifest-plugin` as explicit `devDependencies` unless their config imports the wrapper package directly.
58+
Optional peers (`@rspack/plugin-react-refresh`, `css-loader`, `sass`, `sass-loader`) stay only if your app uses those features. Run `yarn install` (or the npm/pnpm equivalent) and the lockfile collapses to the managed stack. npm 7+ can auto-install the required peers; pnpm and Yarn users should keep `shakapacker`, `@rspack/core`, `@rspack/cli`, `@rspack/dev-server`, and `rspack-manifest-plugin` as explicit `devDependencies`. If the app changes its config imports from `shakapacker/rspack` to `shakapacker-rspack`, it can drop only the direct `shakapacker` dependency; the Rspack packages and manifest plugin still need to stay explicit.

0 commit comments

Comments
 (0)