I’m trying my first lovelace custom card. When I make changes to the js file, they are not updating in the UI. Simple things like changing the text that is printed out. I’m using the content-card-example as a template. When I change the text it doesn’t get reflected on the UI. I’m tried the following.
The first is a useful way to force the script to load even before the dashboard gets selected. It means that if you open on the default dashboard, your script still runs. The second lets you look at the javascript console and see which version of the script (if any) is loaded.
For whoever is still pulling his/her hair out: You need to open the javascript file in a seperate tab and refresh that a couple of times. Than refresh HA. Caching is a ***
I do not know if this also fixes your problem, but it might be helpful for others who want to test out writing custom cards: Disable your browser cache on the dashboard tab!
To do so, go to the network tab of your browser and tick the box saying Disable cache there.
Then I can just edit the code of the card in one tab (preferably in VSCode) and - after saving - refresh the tab that is running the dashboard (where I have disabled the cache) and see the updated card there. This makes it much more convenient to develop a custom card imo.