Open Stas-Buzunko opened 5 years ago
I have scripts -> templates -> customers -> account.js
it's loaded and executed when i'm on /account and reload the page
but it doesn't load when i visit '/' -> click '/account'
I can't understand why. Content of a script doesn't matter in my case. Even simple console.log not called.
Here is how I import script-tag in templates -> customers -> account.liquid
{% include 'script-tags', template: 'customers/account' %} {% include 'script-tags' %} <script src='{{ 'template.account.js' | asset_url }}' defer='defer'></script>
2 of these 3 work on reload, but none works on route change. I have no idea what's going on. Any help would be appreciated
UPD: in deployed theme script is not executed even on page load
it's referenced, content is correct, why the hell it's not executed?
I have scripts -> templates -> customers -> account.js
it's loaded and executed when i'm on /account and reload the page
but it doesn't load when i visit '/' -> click '/account'
I can't understand why. Content of a script doesn't matter in my case. Even simple console.log not called.
Here is how I import script-tag in templates -> customers -> account.liquid
2 of these 3 work on reload, but none works on route change. I have no idea what's going on. Any help would be appreciated