npm.io
7.16.0 • Published 9 months ago

gatsby-plugin-preact

Licence
MIT
Version
7.16.0
Deps
4
Size
50 kB
Vulns
0
Weekly
0
Stars
55.9K

gatsby-plugin-preact

Provides drop-in support for replacing React with Preact.

While Preact doesn't provide full support for the React ecosystem, it is an intriguing option for Gatsby sites as it saves ~30kb of JavaScript vs. using React.

Note: This plugin uses Preact X, any version prior to v10.0.0 is incompatible with Gatsby v2.

Install

npm install gatsby-plugin-preact preact preact-render-to-string

How to use

// In your gatsby-config.js
plugins: [`gatsby-plugin-preact`]

Keywords