lovelace-card-mod
lovelace-card-mod copied to clipboard
Lazy Load Resources
I have a bunch of different resources I am trying to use on different dashboards. Tablets vs phones, etc. Normally the interface lazy loads the resources, but card mod seems to change this behavior to force everything to load. The issue with this is that as the number of resources references increases the load time increases as well causing issues. It's there a way to keep lazy loading?
What resources? What makes you think card-mod forces anything to load?
https://community.home-assistant.io/t/custom-element-doesnt-exist-but-loads-a-few-seconds-later/266349/2
See that. I read it somewhere else also. Basically all my JavaScript files download and seem to try to load even if the dashboard doesn't use them. Not a big deal on most devices but it's killing my tablets.
Is this not true?
No. It's not.
All custom resources are always loaded immediately. For the core frontend functionality, things are loaded as they are needed. And there isn't even any way to force everything to download as far as I know.
Alright. Good to know. Sorry for opening this then. Several places implied card mod was changing the behavior some how.
I wish there was actually a way to use different resources per dashboard.