Skip to content
Please note that GitHub no longer supports Internet Explorer.

We recommend upgrading to the latest Microsoft Edge, Google Chrome, or Firefox.

Learn more
No description, website, or topics provided.
JavaScript
Branch: master
Clone or download
Latest commit e7f359b Feb 3, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
pages initial example Feb 2, 2020
.gitignore initial example Feb 2, 2020
README.md Update README.md Feb 2, 2020
next.config.js remove commented-out code Feb 2, 2020
package-lock.json initial example Feb 2, 2020
package.json initial example Feb 2, 2020

README.md

Preact example

This is a fully working example of Next.js running on Preact instead of React.

This reduces the base JavaScript weight of pages to 30kb (or far lower with additional Webpack optimizations).

How to use

Clone this repo and run npm install:

git clone git@github.com:developit/next-preact

How does it work?

The example takes advantage of npm/yarn aliases, which essentially allow installing preact/compat at node_modules/react.

Here's how this example repo was set up:

You can’t perform that action at this time.