npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tuqulore-inc/eleventy-plugin-preact

v4.0.2

Published

Eleventy plugin for Preact server-side rendering with JSX/MDX support

Readme

@tuqulore-inc/eleventy-plugin-preact

Eleventy plugin for Preact server-side rendering with JSX/MDX support.

This plugin enables you to use JSX and MDX files as Eleventy templates, rendering Preact components to HTML on the server.

Installation

npm install -D @11ty/eleventy @tuqulore-inc/eleventy-plugin-preact preact

Usage

// eleventy.config.mjs
import preact from "@tuqulore-inc/eleventy-plugin-preact";

export default function (eleventyConfig) {
  eleventyConfig.addPlugin(preact);
}

What it does

  1. Adds JSX/MDX template formats - Use .jsx and .mdx files as Eleventy templates
  2. Server-side rendering - Renders Preact components to HTML using preact-render-to-string
  3. Hydration bundles - Optionally bundles *.hydrate.jsx files with esbuild for client-side hydration

Options

hydrateGlob

  • Type: string
  • Default: undefined

Glob pattern for hydration entry points. Files matching this pattern will be:

  • Ignored by Eleventy (not processed as templates)
  • Bundled with esbuild for client-side use
eleventyConfig.addPlugin(preact, {
  hydrateGlob: "./src/**/*.hydrate.jsx",
});

Eleventy Data Access

This plugin provides a singleton object for accessing Eleventy data from any template or component during SSR, without prop drilling.

Usage

import { eleventy } from "@tuqulore-inc/eleventy-plugin-preact/eleventy";

// In layout
<title>{eleventy.title} | {eleventy.site.name}</title>

// In partials (no need to pass props)
<footer>&copy; {eleventy.site.author}</footer>

Available Data

| Property | Description | | ---------------------------------------------- | ----------------------------------------- | | eleventy.content | Rendered HTML from child template | | eleventy.title, eleventy.description, etc. | Values from data export or front matter | | eleventy.site, eleventy.nav, etc. | Global data from _data/ directory | | eleventy.page | Eleventy page data (url, date, etc.) |

Important Notes

  • The eleventy singleton is only available during SSR. Accessing it outside of SSR context will throw an error.
  • For hydrated components (<is-land>), continue to pass props via props={JSON.stringify(...)} since client-side hydration cannot access server-side data.

With Partial Hydration

For partial hydration, use this plugin together with @tuqulore-inc/eleventy-plugin-preact-island:

import preact from "@tuqulore-inc/eleventy-plugin-preact";
import preactIsland from "@tuqulore-inc/eleventy-plugin-preact-island";

export default function (eleventyConfig) {
  // Server-side rendering
  eleventyConfig.addPlugin(preact, {
    hydrateGlob: "./src/**/*.hydrate.jsx",
  });

  // Partial hydration
  eleventyConfig.addPlugin(preactIsland);
}

Requirements

  • Node.js 20 or higher
  • Eleventy 3.0 or higher
  • Preact 10 or higher

License

MIT