Commit 664e514
Fix: Properly access Pro configuration methods in ensure_webpack_generated_files_exists
The previous implementation used `respond_to?` to check for Pro-only methods
(rsc_bundle_js_file, react_client_manifest_file, react_server_client_manifest_file)
on the ReactOnRails::Configuration instance. However, these methods don't exist
on the base Configuration class - they only exist on ReactOnRailsPro.configuration.
This change follows the established pattern used in lib/react_on_rails/utils.rb:158-161
and lib/react_on_rails/packer_utils.rb:61-62 by:
1. Checking if Pro is available with ReactOnRails::Utils.react_on_rails_pro?
2. Accessing the Pro configuration object (ReactOnRailsPro.configuration)
3. Calling the Pro-specific methods on that object
This ensures the code works correctly in both scenarios:
- Open-source only: Pro check returns false, Pro files not added
- With Pro loaded: Pro files are correctly added to webpack_generated_files
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 38edb35 commit 664e514
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
364 | | - | |
365 | | - | |
366 | | - | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
367 | 371 | | |
368 | 372 | | |
369 | 373 | | |
| |||
0 commit comments