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


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,

3 Replies

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

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. 
Kumaresan S 

MA Mani May 4, 2019 08:41 AM

Hi kumresan,

Any update on this?

VR Vairamuthu Ramamoorthi Syncfusion Team May 6, 2019 08:14 AM

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/ 

Vairamuthu R 

Live Chat Icon For mobile
Up arrow icon