FROM CACHE - en_header

Theme App Extension Structure: JS in Liquid Block VS Asset file?

Shopify Partner
24 6 8

Conceptually, what are the differences between including custom JavaScript for a theme app extension (app block or app block embed) in the app block's liquid file, versus a static asset file bundled with the extension? 

Similarly, is there any difference between loading a JS asset via the "javascript" field in the app block settings, VS just including the <script> tag inline in the Liquid file? 

It seems like the existence of external asset files is extraneous, if you can just add <script> tags to the liquid file itself. Is the only difference in performance optimization / load time? 

Reply 1 (1)
Shopify Partner
7 0 1

I encountered strange behaviour with including JS/CSS assets through the schema and wrote about it in this post


I'm not sure if this is still happening, but including the assets with tags is working with custom templates as well.