App reviews, troubleshooting, and recommendations
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?
I encountered strange behaviour with including JS/CSS assets through the schema and wrote about it in this post https://community.shopify.com/c/online-store-2-0/theme-app-extension-css-javascript-not-working-corr...
I'm not sure if this is still happening, but including the assets with tags is working with custom templates as well.
I think the differences lie below:
inline js in liquid:
JS asset:
User | RANK |
---|---|
6 | |
4 | |
4 | |
4 | |
3 |
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023