Skip to content

Commit 7e81bc3

Browse files
justin808claude
andcommitted
Update README and address documentation feedback
## Changes 1. **Update main README** - Added Rspack to "What's New" section as first bullet point - Added Rspack to "Why React on Rails?" features table - Highlights ~20x faster builds with links to documentation 2. **Address comment #1: Remove redundant --no-rspack option** - File: docs/api-reference/generator-details.md:14 - Removed [--no-rspack] from options list (redundant, default is false) - Kept only [--rspack] for clarity 3. **Address comment #2: Document switch-bundler limitations** - File: docs/getting-started/quick-start.md:47 - Added detailed note about limitations in quick-start - File: docs/api-reference/generator-details.md - Added comprehensive "Limitations of bin/switch-bundler" section: * Custom webpack plugins not auto-updated * Manual updates needed for custom configs * Third-party webpack packages not detected * YAML formatting may change (but preserves functionality) - Cross-references to unified configuration docs 4. **TypeScript handling confirmed working** - Rspack uses SWC which handles TypeScript natively - No .ts file updates needed - --rspack --typescript combination works seamlessly ## Documentation Now Complete The Rspack feature is now documented in: - Main README (prominent placement) - Quick Start guide (with limitations) - Generator Details (comprehensive with limitations) - Webpack Configuration (technical details) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 117cf47 commit 7e81bc3

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
**🚀 React on Rails v16.0 Released!** Major modernization with ESM support, enhanced React Server Components, and streamlined configuration.
2222

23+
- **⚡ Rspack Support**: New `--rspack` generator flag for ~20x faster builds! Use Rspack instead of Webpack for dramatically improved build performance. See [Rspack documentation](https://www.shakacode.com/react-on-rails/docs/api/generator-details#rspack-support) for details.
2324
- **ESM-only package**: Modern module system with better tree-shaking and performance
2425
- **React Server Components**: Improved rendering flow and new `RSCRoute` component for seamless SSR
2526
- **Performance improvements**: New async loading strategies and optimized bundle generation
@@ -111,8 +112,9 @@ To provide a high-performance framework for integrating Ruby on Rails with React
111112

112113
| Feature | Benefit |
113114
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
115+
|**Rspack Support** | [~20x faster builds](./docs/api-reference/generator-details.md#rspack-support) with Rspack bundler - dramatically reduce build times in development and CI |
114116
| 🎯 **Smart Bundle Loading** | [Automated bundle optimization](./docs/guides/auto-bundling-file-system-based-automated-bundle-generation.md) based on components used - no more manual `javascript_pack_tags` configuration |
115-
| **Server-Side Rendering** | Enhanced React Server Components support for better SEO and UX performance |
117+
| 🌟 **Server-Side Rendering** | Enhanced React Server Components support for better SEO and UX performance |
116118
| 🚀 **Advanced Loading** | `sync`, `async`, and `defer` options for optimal performance based on your needs |
117119
| 🔥 **Hot Module Replacement** | Instant feedback during development with tight [Shakapacker](https://github.com/shakacode/shakapacker) integration |
118120
| 📦 **Easy Props Passing** | Direct Rails → React data flow without separate API calls |

docs/api-reference/generator-details.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Usage:
1111
Options:
1212
-R, [--redux], [--no-redux] # Install Redux package and Redux version of Hello World Example. Default: false
1313
-T, [--typescript], [--no-typescript] # Generate TypeScript files and install TypeScript dependencies. Default: false
14-
[--rspack], [--no-rspack] # Use Rspack instead of Webpack as the bundler. Default: false
14+
[--rspack] # Use Rspack instead of Webpack as the bundler. Default: false
1515
[--ignore-warnings], [--no-ignore-warnings] # Skip warnings. Default: false
1616
1717
Runtime options:
@@ -156,6 +156,17 @@ The switch-bundler script automatically:
156156
- Installs/removes appropriate dependencies
157157
- Works with npm, yarn, and pnpm
158158

159+
**Limitations of `bin/switch-bundler`:**
160+
161+
The switch-bundler utility handles the standard configuration and dependencies, but has some limitations:
162+
163+
- **Custom webpack plugins**: Does not modify custom webpack plugins or loaders in your config files
164+
- **Manual updates needed**: If you have custom webpack configuration, you may need to update it to use unified patterns (see examples in [Webpack Configuration](../core-concepts/webpack-configuration.md#unified-configuration))
165+
- **Third-party dependencies**: Does not detect or update third-party webpack-specific packages you may have added
166+
- **YAML formatting**: Uses YAML.dump which may change formatting/whitespace (but preserves functionality)
167+
168+
For apps with custom webpack configurations, review the generated config templates to understand the unified configuration patterns that work with both bundlers.
169+
159170
**Combining with other options:**
160171

161172
```bash

docs/getting-started/quick-start.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ Take a look at the files created by the generator.
4545
- Webpack configuration
4646

4747
> 💡 **Performance Tip:** Add the `--rspack` flag for significantly faster builds (~20x improvement). You can also switch bundlers later with `bin/switch-bundler rspack`.
48+
>
49+
> **Note on `bin/switch-bundler`:** This utility safely switches between webpack and rspack by updating `shakapacker.yml` and managing dependencies. However, it does not modify custom webpack configuration code. If you have custom webpack plugins or loaders, you may need to update those manually to work with rspack. See [Rspack documentation](../api-reference/generator-details.md#rspack-support) for details on unified configuration patterns.
4850
4951
## 🎯 Step 2: Start the Development Server (1 minute)
5052

0 commit comments

Comments
 (0)