hey everyone,
i need some help on below issue, can you suggest
We have dynamic-modules clientlib and it doesnt load on first hit in the browser, 2nd load onwards, it works fine and keeps working for few hours
do you have some pointer
tried, webpack chunking, code exclusion, dumplibs, nothing is of help
please some explain what is going wrong with clientlib-dynamic-modules
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @devendrabhn ,
Other clientlibs are getting added via script tag like below which load as page loads
How ever dynamic clientlibs are getting called from js on some condition, which is not fulfilled at first load.
Either check your condition in debug mode or share the code how your are adding dynamic module cleintlibs
check and debug these condition in non-minified file I.z.isStorybookMode()
"app-init"),
document.addEventListener("DOMContentLoaded", function() {
I.z.isStorybookMode() || (D(e),
Thanks
Hi @devendrabhn ,
Are you loading clientlib-dynamic-modules based on some condition or from ajax call.
$(document).ready() or DOMContentLoaded should be enough to check if elements loaded
You may remove zero class or implement logic accordingly.
I can see extra zero class attribute on first load.
Second onward load
Thanks
Thanks @MukeshYadav_ for replying
this domId is different and is a DOM node, and class zero is not contributing to the issue
If you observe the above SS in my question, or on the site (chrome incongnito mode) and source bundle, the clientlib-dynamic-modules folder itself doesnt show up in 1st attempt to load. In 2nd attempt onwards its loads fine and keep running fine for next few hours
Hi @devendrabhn ,
Other clientlibs are getting added via script tag like below which load as page loads
How ever dynamic clientlibs are getting called from js on some condition, which is not fulfilled at first load.
Either check your condition in debug mode or share the code how your are adding dynamic module cleintlibs
check and debug these condition in non-minified file I.z.isStorybookMode()
"app-init"),
document.addEventListener("DOMContentLoaded", function() {
I.z.isStorybookMode() || (D(e),
Thanks
Thank you buddy, its helpful
Views
Likes
Replies
Views
Likes
Replies