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?
已存档?
是复刻?
已锁定?
是镜像?
是私有?