How can I configure components to download their required JavaScript files on initial load

I am writing a Blazor Progressive Webapp using Syncfusion controls.If the progressive webapp is Offline when a component is first loaded the application crashes because it cannot find the javascript file that the component needs.

If the user has used the component while online and then later goes offline the component works correctly as the JavaScript is cached. However, some controls only appear on a single page somehwere in the app. (e.g. the ColorPicker) and so it's quite likely that they will not get used until later (when the app may be offline).

How can I force all these JavaScript files to be downloaded up front so that the application doesn't crash later when looking for them if it has gone offline?



1 Reply 1 reply marked as answer

YA YuvanShankar Arunagiri Syncfusion Team August 22, 2022 08:02 AM UTC

Hi Kaine,


We have validated your reported query and if you use the CDN(https://blazor.syncfusion.com/documentation/common/adding-script-references#cdn-reference) link for referring the Syncfusion script file, please use static web assets(https://blazor.syncfusion.com/documentation/common/adding-script-references#static-web-assets) to resolve this issue. And if you still facing the same issue while using the static web assets, then please using below CRG link to download the Syncfusion script file as minified file and can use in your application.


CRG link: https://blazor.syncfusion.com/documentation/common/adding-script-references#custom-resource-generator


Please get back to us if you have any queries.

Regards,

YuvanShankar A


Marked as answer
Loader.
Up arrow icon