You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the compatibility mode (preact/compat) and the vite plugin preact/preset-vite I only needed to replace react() with preact() in the vite.config.ts.
It saves 36KB in Flash so now we're able to use the espressif IDF4.4.4/pio 6.3.2 library on an 2MB ESP32. Pretty impressive for changing one line.
Inspired by rjwats/esp8266-react#327 I thought I'd have another go at trying out preact. preact is a lightweight version of react, with a much smaller bundle size and ideal for slow connections where loading speed could be a problem. There are drawbacks obviously (see https://www.merixstudio.com/blog/what-preact-and-when-should-you-consider-using-it) but for our project, I think it's safe and worth experimenting with.
Using the compatibility mode (
preact/compat
) and the vite pluginpreact/preset-vite
I only needed to replacereact()
withpreact()
in thevite.config.ts
.It saves 36KB in Flash so now we're able to use the espressif IDF4.4.4/pio 6.3.2 library on an 2MB ESP32. Pretty impressive for changing one line.
Thanks @rjjrbatarao :-)
The text was updated successfully, but these errors were encountered: