-
|
Hi everyone, 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.
Replies: 1 comment 1 reply
-
|
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.
Yes, defer should retain load order, which means that there's async logic somewhere.
Possibly an eventlistener running a callback?