~/lightning

Hacking create react app to use preact

Lightningat JSUnconf 2018 · on Sunday, 2018-04-22· [react, web-performance]
slides:none on file

Hacks replace react and react-dom with preact via modified react-scripts and webpack so the bundle shrinks dramatically while keeping the same JSX API; Jest needs a patched resolve and slightly different test setup, Babel requires a small tweak, and targets can be changed to IE11. Adds a tiny less watcher and the SubresourceIntegrity webpack plugin. Concrete outcomes include preact-compat replacement and 123KB → 38KB → 13KB bundle measurements and a link to the repo with the patches.

AI-written summary · about

  1. 0:00Intro
  2. 0:31What is preact
  3. 0:50Steps
  4. 1:09Project setup
  5. 1:54Testing
  6. 2:49Compiler
  7. 3:23ESRI
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.