Skill Tracer
Skills › Compound Engineering › ce-polish › dev-server-remix.md

dev-server-remix.md

58 lines · skills/ce-polish/references/dev-server-remix.md at 3449230

Open on GitHub
1# Remix dev-server recipe (auto-detect fallback)
2
3Loaded when `detect-project-type.sh` returns `remix` and the startup tuple still lacks a command.
4

Remix dev-server recipe (auto-detect fallback)

Loaded when detect-project-type.sh returns remix and the startup tuple still lacks a command.

Raw lines 1 to 4
5## Signature
6
7- `remix.config.js` or `remix.config.ts` exists (classic Remix)
8- Remix 2.x+ on Vite has no `remix.config.*` -- it uses `vite.config.ts` with the Remix plugin, so it resolves as `vite` type, not `remix`
9

Signature

  • remix.config.js or remix.config.ts exists (classic Remix)
  • Remix 2.x+ on Vite has no remix.config.* -- it uses vite.config.ts with the Remix plugin, so it resolves as vite type, not remix
Raw lines 5 to 9
10## Start command
12Standard:
14```bash
15npm run dev
16```
18The `dev` script in `package.json` typically wraps `remix dev`. Also valid (read `package.json` scripts to confirm which the project uses):
20```bash
21pnpm dev
22yarn dev
23bun run dev
24```
26Prefer the package manager indicated by the lockfile:
27- `pnpm-lock.yaml` -> `pnpm dev`
28- `yarn.lock` -> `yarn dev`
29- `bun.lock` / `bun.lockb` -> `bun run dev`
30- `package-lock.json` or none -> `npm run dev`

Start command

Standard:

npm run dev

The dev script in package.json typically wraps remix dev. Also valid (read package.json scripts to confirm which the project uses):

pnpm dev
yarn dev
bun run dev

Prefer the package manager indicated by the lockfile:

  • pnpm-lock.yaml -> pnpm dev
  • yarn.lock -> yarn dev
  • bun.lock / bun.lockb -> bun run dev
  • package-lock.json or none -> npm run dev
Raw lines 10 to 31
32## Port
34Default: `3000`. Remix respects `--port <port>` flag. Classic Remix dev server also reads the `PORT` env var. Overrides follow the cascade in `references/dev-server-detection.md`.

Port

Default: 3000. Remix respects --port <port> flag. Classic Remix dev server also reads the PORT env var. Overrides follow the cascade in references/dev-server-detection.md.

Raw lines 32 to 35
36## Stub generation
38```json
40 "version": "0.2.0",
41 "configurations": [
42 {
43 "name": "Remix dev",
44 "runtimeExecutable": "npm",
45 "runtimeArgs": ["run", "dev"],
46 "port": 3000
47 }
48 ]
50```
52Substitute the resolved package manager (`npm` / `pnpm` / `yarn` / `bun`) and port.

Stub generation

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Remix dev",
      "runtimeExecutable": "npm",
      "runtimeArgs": ["run", "dev"],
      "port": 3000
    }
  ]
}

Substitute the resolved package manager (npm / pnpm / yarn / bun) and port.

Raw lines 36 to 53
54## Common gotchas
56- **Classic vs Vite:** Classic Remix uses `remix.config.js`; new Remix (v2+) uses Vite -- detected as `vite` type, not `remix`. The `remix` type is specifically for classic Remix projects that still have a `remix.config.*` file.
57- **Remix v1 vs v2 dev server:** `remix dev` in v2 starts an Express-based dev server that binds a port; `remix dev` in v1 was a watcher only (no server). Polish needs v2+ for the dev server to bind a port and respond to reachability probes.
58- **Remix on Vite inherits Vite's port:** When Remix runs on Vite (no `remix.config.*`), the default port is 5173 (Vite's default), not 3000. That case is handled by the `vite` recipe, not this one.

Common gotchas

  • Classic vs Vite: Classic Remix uses remix.config.js; new Remix (v2+) uses Vite -- detected as vite type, not remix. The remix type is specifically for classic Remix projects that still have a remix.config.* file.
  • Remix v1 vs v2 dev server: remix dev in v2 starts an Express-based dev server that binds a port; remix dev in v1 was a watcher only (no server). Polish needs v2+ for the dev server to bind a port and respond to reachability probes.
  • Remix on Vite inherits Vite's port: When Remix runs on Vite (no remix.config.*), the default port is 5173 (Vite's default), not 3000. That case is handled by the vite recipe, not this one.
Raw lines 54 to 58