Open pichfl opened 4 years ago
I'd strongly recommend adding ember-cli-workbox as a dependency here and preloading the images with that. The current implementation with the <link rel="preload">
tags has significant performance implications and I'd say service workers are kind of the standard solution for preloading anything now.
I was hoping to keep this addon as light and free of dependencies as possible, but I think you're also right.
This issue however is not about prefetching in the background, but actually blocking application init until all assets are loaded. While this is not good behavior for an existing ember app, it is sensible to do in a blank project that exists just as a prototype.
So the service worker will preload once the application has started but you can of course call the service's load
in the application route's model
to make sure all images are in fact loaded before the app starts up.