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

@resolid/dev

v0.4.0

Published

Development utils for Resolid applications

Downloads

623

Readme

Development utils for Resolid applications

GitHub License NPM Version

Documentation | Framework Bundle

Installation

pnpm add -D @resolid/dev @react-router/dev

If you use npm/yarn/bun, replace with the equivalent command.

What is included

  • defineDevConfig (@resolid/dev): generate unified vitePluginOptions and reactRouterConfig.
  • resolidVite (@resolid/dev/vite): combine Resolid plugin behavior with React Router Vite plugin.
  • Route helpers (@resolid/dev/routes):flexRoutes, relativeFactory.
  • Router helpers (@resolid/dev/router): mergeMeta.
  • HTTP server helpers (@resolid/dev/http.server): requestId, clientIp, requestOrigin, httpProblem, httpNotFound, httpRedirect.
  • HTTP platform adapters (@resolid/dev/http.server): createHonoNodeServer, createHonoNetlifyServer, createHonoVercelServer.

Usage patterns

1) Central config

// resolid.config.ts
import { defineDevConfig } from "@resolid/dev";
import { env } from "node:process";

export const { vitePluginOptions, reactRouterConfig } = defineDevConfig({
  appDirectory: "src",
  nodeVersion: 24,
  platform: env.VERCEL == 1 ? "vercel" : env.NETLIFY ? "netlify" : "node",
  reactRouterConfig: {
    future: {
      unstable_optimizeDeps: true,
    },
  },
});

2) Vite config

// vite.config.ts
import { resolidVite } from "@resolid/dev/vite";
import { defineConfig } from "vite";
import { vitePluginOptions } from "./resolid.config";

export default defineConfig({
  plugins: [resolidVite(vitePluginOptions)],
});

3) React Router config

// react-router.config.ts
import { reactRouterConfig } from "./resolid.config";

export default reactRouterConfig;

4) Server entry

// src/server.ts
import { createHonoVercelServer, createHonoNodeServer } from "@resolid/dev/http.server";

export default await (import.meta.env.RESOLID_PLATFORM == "vercel"
  ? createHonoVercelServer()
  : createHonoNodeServer());

5) React Router document

Visit: https://reactrouter.com/home

6) Flex routes

// src/routes.ts
import { flexRoutes, type RouteConfig } from "@resolid/dev/routes";

export default flexRoutes() satisfies RouteConfig;

Router Rules

  • Routes are defined and nested using folders, very similar to how HTML files are laid out on the nginx server
  • The _layout file wraps all downstream routes, which require an <Outlet /> to render sub-routes
  • The _index file is the default file for the folder, for example: /users/_index.tsx will match /users
  • Variables are represented by $ in the file path, for example: /users/$id/edit.tsx will match /users/123/edit
  • Enclosing a route segment in parentheses will make the segment optional, for example: /($lang)/categories.tsx will match /categories, /zh/categories
  • You can use [] to escape special characters in routing conventions, for example: /make-[$$$]-fast-online.tsx will match /make-$$$-fast-online
  • Files and folders prefixed with _ become invisible, allowing folder organization without affecting routing paths, for example: /_legal-pages/privacy-policy.tsx will match / privacy-policy
  • $.tsx splash route will match the rest of the URL, including slashes, e.g. /files/$.tsx will match /files, /files/one, /files/one/two

License

MIT License (MIT). Please see LICENSE for more information.