Replies: 1 comment
-
Try using
or
I would have half expected this to work without it though since defer should retain load order. Wondering if there are any side effects that end up messing this up here. Ref If that still doesn't work, can you post the generate HTML script tags that you end up with? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I'm looking for a way to ensure that a specific JavaScript file (msw_init) is loaded before another one (layout) when using Shakapacker.
For example, I tried these approaches:
However, I'm encountering a race condition where sometimes layout is loaded before msw_init, which breaks the expected behavior.
Is there a reliable way to ensure that msw_init is always loaded before layout and only then to load layout, either through configuration or by changing the way the packs are imported?
I'm trying to use MSW JS for my react on rails app: https://mswjs.io/
Beta Was this translation helpful? Give feedback.
All reactions