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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@hendotcat/11tysnap

v0.0.11

Published

Eleventy plugin for server-side React

Downloads

5

Readme

11tysnap is a server-side React plugin for Eleventy. It lets you hook up React to do server-side rendering in your Eleventy site without any painful Webpack or Babel configuration work. Just add the plugin, set up the runtime JSX/TSX loader of your choice, and start writing Eleventy templates in React right away.

This plugin deliberately doesn't include any client-side React bundling. If you really need client-side React then Eleventy might not be the best option for you. If you really really really need client-side React and Eleventy then unfortunately this probably isn't the plugin for you.

Installation

yarn add -D @hendotcat/11tysnap react react-dom

Usage

This example uses esbuild-register. If you're trying to set up a React-based Eleventy site for the first time and aren't sure of yourself yet, esbuild-register is your best option: it'll work with both JSX and TSX without requiring any config of its own apart from the register() call below.

const { reactPlugin } = require("@hendotcat/11tysnap")
const { register } = require("esbuild-register/dist/node")

register()

module.exports = function(eleventyConfig) {
  eleventyConfig.addPlugin(reactPlugin)
}

If you know what you're doing and you want to use another loader such as @babel/node, @babel/runner, @esbuild/runner, or ts-node, those all work just fine with 11tysnap too. Check out the examples directory to see usage examples of all of those and more.

Options

verbose

Pass verbose: true to the plugin and it'll output a whole bunch of information about what it's doing. This is mostly useful for debugging. Please enable this this option if you're reporting a bug in 11tysnap.

Error Codes

11tysnap will try to help you set it up properly. If you make a mistake, it'll try to help you understand. For some mistakes that it can recognize, it'll print a link in the build output pointing at one of these error codes to help you troubleshoot.

extension-missing

This error code is generated when you add the plugin to Eleventy without setting up a way for Node to load your .jsx or .tsx files.

Double check your .eleventy.js against the [usage example][#usage] at the top of this readme. Have you set up esbuild-register using the register() call?

Contributing

License

MIT