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
-
What
remix()does in dev, preview, and the build, including theclientEntry()transform. -
Component state across edits and server-data revalidation through the frame runtime.
-
A client-rendered app with
remix({ server: false }), and what the plugin still does without a server. -
Rendering paths to static HTML during
vite build, and where those paths come from. -
Serving a
fetchhandler through Vite's dev server withfetchServer().
Assets
-
Script entries, stylesheets, and preloads from
createAssetResolver(), with or without Remix. -
Turning another bundler's output into an asset manifest with
createAssetManifest().
Deploy
-
Local development with workerd and deployment through Wrangler.
-
A one-file Netlify Function around the built fetch handler.
-
Deploying server functions through Nitro.
-
Container deployment with a choice of runtime.
-
The fetch handler behind a short
Deno.serveentrypoint. -
A single-page app or a fully prerendered site, with the base path a project site needs.
Content and styling
Crawling
-
Walking the app's router in memory for sitemaps and link checks.
Data
-
Running
remix/data-tableon 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:
npx giget github:pitlane-tools/templates/cloudflare my-appThe 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 pitlaneyarn
yarn add pitlanepnpm
pnpm add pitlanebun
bun add pitlanedeno
deno add npm:pitlanevp
vp add pitlanevlt
vlt add pitlanenub
nub add pitlaneThen add the Vite plugin from pitlane/vite-plugin-remix to 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.