Hacking create react app to use preact
summary
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
chapters (7)
related talks
41mWe need to talk about Preact
30mWebpack – The React Parts
25mWe Need to Talk about Preact
20mExperiments with React Compiler in Production Code
41m10KB or Bust: The Delicate Power of Webpack and Babel
25mReact developer? How are your production skills?
28mPreact: Into the void 0
24mHoussein Djirdeh - Progressive React
