You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 <[email protected]>
0 commit comments