aex351 / home-assistant-neerslag-app

Neerslag app for Home Assistant. All-in-one package (Sensors + Card).
62 stars 18 forks source link

Include all the required javascript instead of load it from unpkg.com #40

Closed teranex closed 6 months ago

teranex commented 1 year ago

Would it be possible to include all necessary javascript, rather than load a bunch from unpkg.com? By default I block all external javascript using ublock origin, which causes the neerslag card to fail to load. When I allow unpkg.com from ublock origin the card works. A privacy oriented home automation such as Home Assistant shouldn't rely on external CDN's for javascript imho

airmaxx commented 1 year ago

+1 for this. I now understand why my card failed to load in first place.

aex351 commented 1 year ago

Yes, it is possible. The neerslag-app needs to be refactored and use a package manager to bundle/compile all JavaScript files together. Currently no package manager is used.

Using a package manager would probably also minimize other Home Assistant cards/integrations conflicting with the neerslag-app, as the neerslag-app would be more isolated. In the past there were a couple of issues with other Home Assistant cards/integrations breaking the neerslag-card. However, after those got fixed no further bug reports were made.

In any case, using a package manager and not being dependent on an external CDN is favorable. I will have a look in to this.

pvossel commented 1 year ago

Would love to see a offline version of this.

aex351 commented 6 months ago

The neerslag-app now contains a compiled neerslag-card that has all the required dependencies bundled. This means that there is no local dependency anymore on an external resource like unpkg.com, for running the neerslag-card in Home Assistant. This should improve speed, stability and improve privacy.