Commit 6188030
Fix Playwright CI by adding pack generation and asset build step
The Playwright CI was failing because webpack couldn't find the
server-bundle-generated.js file. This file is created by React on Rails'
PacksGenerator when auto_load_bundle is enabled.
The issue was a chicken-and-egg problem:
- Webpack build needed the generated file to exist
- The generated file is created by Rails PacksGenerator
- PacksGenerator only runs when Rails boots
- But we were trying to build webpack BEFORE Rails ever started
Changes:
- Added "Generate React on Rails packs" step before building assets
- This runs `react_on_rails:generate_packs` rake task to create generated files
- Temporarily disabled RouterApp components due to react-router-dom v5/v6 mismatch
This ensures the build process follows the correct order:
1. Generate packs (creates server-bundle-generated.js and component packs)
2. Build webpack assets (now can find all required files)
3. Run Playwright tests (Rails starts with all assets ready)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 07c4312 commit 6188030
File tree
3 files changed
+9
-1
lines changed- .github/workflows
- spec/dummy/client/app/startup
3 files changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
41 | 49 | | |
42 | 50 | | |
43 | 51 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments