How do I incude another js file from a js file where ES6 modules aren't supported?

I'm using Shopify App block Extension. There are some absurd limitations like the liquid file can't exceed 100 KB size. One can also reference a JS file from the schema of the liquid file which should be stored inside the assets folder and this referenced JS file can't exceed 10 Kb file size. However the assets folder has a size limitation of 100 MB and has the flexibility to create as much as required JS file inside the assets folder. As I was acceding all of their size limitations, I decided to create a helpers.js file inside the assets folder and then call the functions from this helpers.js file inside the liquid file and the liquid referenced JS file. Now the problem is I can't use import or use require inside the liquid referenced JS file. So I wondering what steps can I take to solve this issue? Thanks!

Comment (0)

You’ll be in good company