0
votes

I'm new to Shopify and i'm trying to wrap my head around the following. I know that the liquid templating engine parses the javascript on the Shopify servers.

Is there a way to prevent this? For instance i have a variable to configure my interpolation delimiter like so :

    var delimiters = ['{{', '}}']

After it gets parsed it looks like this:

    var delimiters = ['', '']

My javscript doesn't like this. I have a workaround to change the delimiter into something the parsing engine ignores but i was wondering if i could prevent the parsing completely (for my javascript files).

If anyone knows i would appreciate any information.

Thank you in advance.

1
you can use liquid in a javascript file too. - miglio
Thank you for your answer miglio but what if i don't want that? Is there an option to disable this? - SirBennyLavaThe3rd

1 Answers

1
votes

If you don't want to parse something, enclose it within {% raw %} {% endraw %} tags.