Next.js 9.3 + Preact = 21kB
This is a product analysis of a fully working example of Next.js 9.5 running on Preact instead of React. The example aims to reduce the base JavaScript weight of pages to around 22kB, with the potential for even further reduction in the future through additional Webpack optimizations. The setup involves using npm/yarn aliases to install Preact in place of React, allowing for a lighter-weight application.
To use this example:
npm install to install the necessary dependencies.This product analysis showcases a working example of Next.js 9.5 using Preact instead of React, aiming to reduce the base JavaScript weight of pages. By leveraging npm/yarn aliases and utilizing Preact/compat, the setup offers a more lightweight alternative for web development. Further enhancements are possible through Webpack optimizations, making this example an efficient solution for building applications with reduced page weight.