Ahoy friendly package devs!
I just found out that assetService.LoadJs doesn't support modules 😢
How are y'all lazy loading JS in the backoffice?
d
D_Inventor
01/23/2023, 11:33 AM
Maybe not the answer you were looking for, but my javascript has never gotten large enough to make it worthwhile to lazy load anything. I do use assetsService to lazily import non angular js libraries, like google charts for example.
l
leekelleher
01/23/2023, 1:51 PM
I've only lazy loaded regular (non-module) JS libs, using
assetsService.load()
. Doesn't help, sorry.
j
Jason
01/23/2023, 3:21 PM
No worries, maybe I'm the first to try 🤷 - I raised an issue, will look at fixing it if I find the time.
In the meantime I guess I'll just create my own script tag and append to the DOM.
Jason
01/23/2023, 3:24 PM
It looks like the underlying library is from 2011, so before attributes on Script tags become commonplace.