We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

ejs script reference using async or defer mode

Hi,

I have referred ejs scripts in my page in async or defer mode like given below, because this is JS file is very bog like 4 MB size. So that i am loading this file as asynchronous mode.

<script src="~/lib/ej2/ej2-CRMWeb.min.js" defer="defer" async></script>

But while loading the page it is showing the console error like ejs undefined

Please kindly help me to resolve this.

Thanks and Regards,
Mani

3 Replies

KS Kumaresan Subramani Syncfusion Team April 22, 2019 10:37 AM UTC

Hi Mani, 
 
Currently we are validating your query. We will update the further details in one business day. 
 
Please let us know if you have any concern. 
 
Regards, 
Kumaresan S 



MA Mani May 4, 2019 01:41 PM UTC

Hi kumresan,

Any update on this?


VR Vairamuthu Ramamoorthi Syncfusion Team May 6, 2019 01:14 PM UTC

Hi Mani , 

Async parameter in script tag loads the script asynchronously. The execution of script manager starts before script is completely loaded, so it throws script error(ejs undefined). For reducing script loading time, we can generate component specific scripts (which is smaller in size) using Customer Resource Generator (CRG). Refer the below links for further details. 

CRG application link : https://crg.syncfusion.com/ 

Regards, 
Vairamuthu R 


Loader.
Live Chat Icon For mobile
Up arrow icon