Commit be61ade
Fix ImageExample registration failure with async script loading
The commit ee80bc2 changed the main client-bundle to use async: true for
better performance, but left generated_component_packs_loading_strategy
set to :defer in the dummy app configuration. This caused a race condition
where:
1. Main bundle (async: true) executes immediately when downloaded
2. Auto-generated ImageExample pack (:defer) executes after page load
3. Main bundle tries to hydrate ImageExample before it's registered
Solution: Change generated_component_packs_loading_strategy from :defer
to :async to match the main bundle loading strategy and prevent the race
condition.
This aligns with the default behavior (async when Shakapacker >= 8.2.0)
and the documentation added in ee80bc2.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 40b79b8 commit be61ade
2 files changed
+4
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
| 270 | + | |
| 271 | + | |
270 | 272 | | |
271 | 273 | | |
272 | 274 | | |
| |||
380 | 382 | | |
381 | 383 | | |
382 | 384 | | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | 385 | | |
387 | 386 | | |
388 | 387 | | |
| |||
430 | 429 | | |
431 | 430 | | |
432 | 431 | | |
| 432 | + | |
433 | 433 | | |
434 | 434 | | |
435 | 435 | | |
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
449 | | - | |
450 | 449 | | |
451 | 450 | | |
452 | 451 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
0 commit comments