nextjs-preact-demo

Next.js 9.3 + Preact = 21kB

  • 所有者: developit/nextjs-preact-demo
  • 平台:
  • 許可證:
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

Preact example

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

This reduces the base JavaScript weight of pages to 21kB.

? In the future, this can be even smaller with some additional Webpack optimizations.

How to use

Clone this repo and run npm install:

git clone https://github.com/developit/nextjs-preact-demo.git
cd nextjs-preact-demo
npm install

There are three commands available:

# start a development server:
npm run dev

# create a production build:
npm run build

# start a production server:
npm start

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:

主要指標

概覽
名稱與所有者developit/nextjs-preact-demo
主編程語言JavaScript
編程語言JavaScript (語言數: 1)
平台
許可證
所有者活动
創建於2020-02-02 17:32:10
推送於2020-11-02 07:55:38
最后一次提交2020-11-02 08:55:35
發布數0
用户参与
星數384
關注者數12
派生數23
提交數30
已啟用問題?
問題數25
打開的問題數4
拉請求數8
打開的拉請求數0
關閉的拉請求數2
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?