Proof of Concept: Mounting react applications efficiently as a custom lovelace card using @preact/signals-react.
This project was bootstrapped from the @vite template which provides a minimal setup to get React working in Vite with some ESLint rules.
Node.js
npm install
Bun.js
bun install
Node.js
npx vite build --mode development
Bun.js
bun x vite build --mode development
Node.js
npx vite build
Bun.js
bun x vite build
dist/react-card.js
/config/www/react-card.js
of your Home Assistant setup/local/react-card.js
as a resource on Lovelace
type: custom:react-card
entity: sun.sun
Note: Be sure to open Home Assistant using it's local address if your component does not seem to update after inserting a new version.