Hi. After a full day struggling with this, I will post my findings in a answer-my-own question format.
Problem: I’m trying to make changes to the Javascript of a HACS-loaded card, and my changes never get effective
The card in this case is todoist-card, but it could be any other.
The file I’m changing is
/config/www/community/todoist-card/todoist-card.js
This gets referenced in the front-end via this virtual url:
http://hass:8123/hacsfiles/todoist-card/todoist-card.js
Wait! How do I know if this is not a browser caching problem? I mean, those are the most common caching problems…
Correct - this is the first thing you need to check. If you search this community for caching issues, you get answers about that. Solutions typically involve forcing browser refreshes, and sometimes changing the URL by appending something like ?v=0.0.1
to trick the browser into thinking it’s a new file.
But after trying many such tricks, I started getting really suspicious because I was always getting the original version of the js file… never my changes.
So I checked by opening a different browser, in incognito mode, and pasting the URL pointing directly to the js file, without the entire HASS UI. And I still got the original file, which I am sure was not cached in this browser.
So, I knew for sure that the server was serving the old file, which I searched and searched the file system, and couldn’t find anywhere… I could only find my changed version.