thomasloven / lovelace-card-mod

🔹 Add CSS styles to (almost) any lovelace card
MIT License
1.13k stars 168 forks source link

Correctly detect script imports #280

Closed patrickli closed 10 months ago

patrickli commented 1 year ago

The getResources function does not correctly list all scripts If all import statements are rendered in one line. So split on both newline and ; characters.

This should fix the problem where You may not be getting optimal performance out of card-mod. is still printed in the console even the js is loaded in frontend via extra_module_url.

patrickli commented 1 year ago

Oh, didn't realize that #278 also fixes this but with a different approach. Feel free to pick either.

thomasloven commented 10 months ago

Yes, I think #278 is more stable. Thanks anyway!