Commit adb0aa9
Fix webpack config to fallback when privateOutputPath is undefined
The generated serverWebpackConfig.js was failing when Shakapacker 9+ was
detected but private_output_path wasn't configured in shakapacker.yml.
This caused config.privateOutputPath to be undefined, resulting in webpack
building to an incorrect location.
Changes:
- Add fallback to hardcoded path when config.privateOutputPath is undefined
- Ensures server bundle is always built to a valid location
- Maintains backward compatibility with all Shakapacker versions
This fixes the "server-bundle.js cannot be read" error in generator examples.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 1bad118 commit adb0aa9
File tree
1 file changed
+1
-1
lines changed- lib/generators/react_on_rails/templates/base/base/config/webpack
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
0 commit comments