Skip to content

Search the guides, deployment pages, and API reference.

Pitlane guides

Pitlane is a composable toolkit for Remix 3. Its Vite plugin runs the dev server and builds the app for its host. Additional packages resolve built assets and handle content and styling, with a Cloudflare D1 driver and an in-memory crawler available separately.

Remix owns routing and UI. Pitlane's packages compose with its APIs: content collections validate with remix/data-schema, and the D1 driver plugs into remix/data-table.

These guides explain how each piece behaves and when to reach for it. The API reference documents every export separately.

Guides

Build and develop

  • Using the Vite plugin

    What remix() does in dev, preview, and the build, including the clientEntry() transform.

  • Hot module replacement

    Component state across edits and server-data revalidation through the frame runtime.

  • Single-page apps

    A client-rendered app with remix({ server: false }), and what the plugin still does without a server.

  • Prerendering

    Rendering paths to static HTML during vite build, and where those paths come from.

  • Fetch server

    Serving a fetch handler through Vite's dev server with fetchServer().

Assets

  • Asset resolution

    Script entries, stylesheets, and preloads from createAssetResolver(), with or without Remix.

  • Manifest integrations

    Turning another bundler's output into an asset manifest with createAssetManifest().

Deploy

  • Cloudflare Workers

    Local development with workerd and deployment through Wrangler.

  • Netlify

    A one-file Netlify Function around the built fetch handler.

  • Vercel

    Deploying server functions through Nitro.

  • Railway

    Container deployment with a choice of runtime.

  • Deno Deploy

    The fetch handler behind a short Deno.serve entrypoint.

  • GitHub Pages

    A single-page app or a fully prerendered site, with the base path a project site needs.

Content and styling

  • Content

    Querying schema-validated collections of Markdown, MDX, JSON, or YAML.

  • Theme

    Typed design tokens for styling with css() mixins.

Crawling

  • Crawler

    Walking the app's router in memory for sitemaps and link checks.

Data

  • Cloudflare D1

    Running remix/data-table on a D1 binding, and the D1 limits the driver cannot hide.

Content, prerendering, and the Railway and Deno Deploy guides also cover apps that run straight from source with no build step. Their pages switch between the Vite and No Build versions.

Start a new app

The starter templates are one guest book app, wired once for each deploy target. Scaffold the Cloudflare one with giget:

Terminal window
npx giget github:pitlane-tools/templates/cloudflare my-app

The repository names the other targets, and the deploy guides cover each one.

Add Pitlane to a Remix app

Install the pitlane package. It needs remix 3 and vite 8.1 or later as peer dependencies.

npm
npm add pitlane
yarn
yarn add pitlane
pnpm
pnpm add pitlane
bun
bun add pitlane
deno
deno add npm:pitlane
vp
vp add pitlane
vlt
vlt add pitlane
nub
nub add pitlane

Then add the Vite plugin from pitlane/vite-plugin-remix to vite.config.ts:

vite.config.ts
import { remix } from "pitlane/vite-plugin-remix";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [remix()],
});

Using the Vite plugin shows the server and browser entry files the plugin expects, and what changes between dev, preview, and the build.

Imports

pitlane installs every Pitlane package and re-exports each one under a subpath named after it: @pitlane/vite-plugin-remix becomes pitlane/vite-plugin-remix, and @pitlane/theme/schema becomes pitlane/theme/schema. Bare pitlane has no exports, so every import names a subpath.

Each package also installs on its own under its @pitlane/* name. That route suits an app that uses one package or needs a release newer than the one pitlane pins. Installing Pitlane compares the installs and explains the version pins, with a full subpath reference.

For coding agents

pitlane releases after 1.0.0-alpha.1 install these guides with the package, so an agent working in an app can read the version the app depends on. Documentation for coding agents explains where the files are and how to point an agent at them.