---
title: "RemixPluginOptions"
description: "The options [remix](https://pitlane.tools/package/vite-plugin-remix/function/remix.md) accepts. Every one has a default, and most projects pass none."
url: "https://pitlane.tools/package/vite-plugin-remix/interface/RemixPluginOptions"
---

# RemixPluginOptions

```ts
import type { RemixPluginOptions } from "@pitlane/vite-plugin-remix";
```

The options [remix](https://pitlane.tools/package/vite-plugin-remix/function/remix.md) accepts. Every one has a default, and most projects pass none.

## See

[Vite plugin guide: Options](https://pitlane.tools/guides/vite-plugin.md#options)

## Properties

### assets?

```ts
optional assets?: Omit<AssetsPluginOptions, "serverEnvironments">;
```

Options for the asset plugin `remix()` installs: `include` for browser entries the server names with computed paths, `chunkImportMap`, which `remix()` turns on unless this option or Vite's own `build.chunkImportMap` says otherwise, and `allowFiles`, `allowPackages`, and `denyFiles` for the browser boundary. Server environments come from `serverEnvironments`.

Ignored when `server` is `false`.

#### Default

```ts
{}
```

---

### clientEntry?

```ts
optional clientEntry?: string | false;
```

Browser script entry, used as the client environment's build input. Pass `false` for fully server-rendered apps with no hydration: no browser script is built, while stylesheets and assets the server registers still go to `dist/client`.

#### Default

```ts
"app/entry.browser"
```

---

### prerender?

```ts
optional prerender?: PrerenderOption;
```

Render paths to static HTML at build time and write them into the client output, so a host can serve the file and skip the server entirely.

`true` prerenders every static path in the app's route map, which the server entry must export as `routes`. An array prerenders exactly those paths. A function computes them, and receives `getStaticPaths()` for the route-map half of a list that also has dynamic paths in it. The object form adds `concurrency` and `spider`.

Build-time only, and unsupported with `server: false`: prerendering renders through the server entry, and there is none.

#### Default

```ts
undefined
```

---

### server?

```ts
optional server?: boolean;
```

Whether the app has a server at all. Pass `false` for SPA mode: no server environment is configured, nothing is built to `dist/ssr`, and `vite build` emits a static site from `index.html`.

This is about the server, not about server rendering. With `false` every `server*` option below goes with it, because there is no server for them to describe, and `clientEntry` and `assets` go too: the browser entry is whatever `index.html` loads. An app that wants its UI rendered in the browser while its routes still answer per request keeps `true` and writes a server entry that serves data and a shell.

#### Default

```ts
true
```

---

### serverEntry?

```ts
optional serverEntry?: string;
```

Server entry module, built as `dist/ssr/index.js` and loaded for every dev request. Must default-export a fetch handler: an object exposing `fetch(request: Request): Response | Promise<Response>`, e.g. a `createRouter()` router.

#### Default

```ts
"app/entry.server"
```

---

### serverEnvironments?

```ts
optional serverEnvironments?: string[];
```

Environment names treated as "server": islands are discovered and stylesheets collected while they build, and hot module replacement classifies their modules as server code. Dev requests run in the first.

#### Default

```ts
["ssr"]
```

---

### serverHandler?

```ts
optional serverHandler?: boolean;
```

Serve dev-server and `vite preview` requests through the server entry's fetch handler. Set to `false` when another plugin owns request handling — `@cloudflare/vite-plugin` (workerd) or `nitro/vite` — so its own preview serves the build, even one Node could import. Keep the default with `@netlify/vite-plugin`, which emulates platform primitives around the dev server but leaves SSR to the app's fetch handler.

Ignored when `server` is `false`, which has no fetch handler.

#### Default

```ts
true
```
