Skip to content

Commit 0e45b87

Browse files
justin808claude
andcommitted
Fix CI: Revert OSS dummy to defer: true for Redux compatibility
The OSS dummy app uses Redux shared stores with inline component registration, which requires defer: true. With async: true, the bundle executes before inline scripts, causing component registration failures. Changes: - spec/dummy: Reverted to defer: true (was async: true) - Updated comment to explain Redux inline registration requirement - Pro dummy: Remains async: true (has getOrWaitForStore support) This fixes CI test failures: - "Could not find component registered with name ReduxApp" - "Could not find store registered with name 'SharedReduxStore'" Root cause: async scripts execute immediately upon download, before inline <script> tags in HTML. defer scripts wait for HTML parsing, ensuring proper execution order. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 8c50236 commit 0e45b87

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

spec/dummy/app/views/layouts/application.html.erb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99

1010
<%= yield :head %>
1111

12-
<%# async: true is the recommended approach per docs/building-features/streaming-server-rendering.md.
13-
It enables React 18's Selective Hydration and provides optimal Time to Interactive (TTI).
14-
Requires Shakapacker >= 8.2.0 (currently using 9.3.0). %>
15-
<%= javascript_pack_tag('client-bundle', 'data-turbo-track': 'reload', async: true) %>
12+
<%# defer: true is required because this app uses Redux shared stores with inline component
13+
registration. With async: true, the bundle executes before inline <script> tags, causing
14+
"Could not find component" errors. See docs/building-features/streaming-server-rendering.md
15+
for details. Modern apps should move registration to bundles and use async: true. %>
16+
<%= javascript_pack_tag('client-bundle', 'data-turbo-track': 'reload', defer: true) %>
1617

1718
<%= csrf_meta_tags %>
1819
</head>

0 commit comments

Comments
 (0)