flixlix / power-flow-card-plus

A power distribution card inspired by the official Energy Distribution card for Home Assistant
577 stars 72 forks source link

fix: transpile node_modules to support older ios devices #645

Closed steveworkman closed 1 month ago

steveworkman commented 3 months ago

Fixes #414 (and maybe #77 and #150) by transpiling the superstruct library - please can you give this a test as it seems to be very eager to transpile everything in node_modules

steveworkman commented 3 months ago

@flixlix I thought about this a little more this morning - there's another way to resolve it partially without transpiling everything. If you change inlineDynamicImports to false it creates different chunks for the dynamically imported parts like the ui-editor and the sortable library. This would confine the ?? from superstruct to the ui-editor file and whilst that part of the code wouldn't work on iOS 12, the main display of the card would work and that's everything that I would want from this - I have no intention of editing the card on my display iPad.

What do you think?

steveworkman commented 3 months ago

I've tested the above fix on my iOS 12 device and its working great

flixlix commented 1 month ago

hey @steveworkman, thank you for this PR, up until now I just built the card and used the exported power-flow-card-plus.js file into the release. I noticed that using this variant, the exported file only exports the contents from another exported file. How do you think I can use this approach to make new releases?