Hi, I detected strange behavior working with the Liquid tag {% javascript %}.
I move to other file some of the custom components created by default in the Dawn theme, but I do not change the JS code. All seemed to work well, and I deployed to production. In production, this code not works properly, and after a long time debugging it, I found that the code inside {% javascript %} always show the previous state of code, like there’s a cache or something.
For instance:
-
I create a console.log(“a”) in my code, inside the {% javascript %} tag, and save it.
-
The web console not shows nothing.
-
I modify the console log to console.log(“b”) and save it.
-
The web console shows “a”.
-
I remove the console.log and save it.
-
The web console shows “b”.
This happens in local (with Shopify CLI) and in production.
-
Dawn v.7.0.1
-
Shopify CLI and GitHub integration