Nativescript Angular lazyloading module from CDN


Hi, I’ve been researching the features of Nativescript, and am wondering about a usecase:

Is it possible to lazyload a module at runtime from a remote host (CDN). This would probably have to be a compiled nativescript file of some kind. Could you please tell me if it is possible.


It’s a native app not a browser, hence loading scripts from CDN is not recommended.

Also as per Apple’s guidelines your app UI should not be completely depended on remote server like a web app, it should be ready to go even at offline. You may break this rule by lazy loading your Angular module from remote server which might result in app rejection.

If you still want to do it, I think you it’s possible with some customizations on webpack and nativescript-angular plugin.