> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# router

- **Type:** `Object`
- **Default:** `{}`

This configuration item is used to configure client-side routing, supporting the use of [conventional routing](/guides/concept/entries.md#convention-routing) provided by Modern.js for routing management.

:::note
The `router` configuration item **only takes effect when using conventional routing entries** (i.e., when there is a `routes/` directory in the entry). For controlled routing entries or custom entries, this configuration will not take effect.

In multi-entry applications, you can configure different routing behaviors for different entries using the function form of `defineRuntimeConfig`. For more details, see [Runtime Configuration Introduction](/configure/app/runtime/0-intro.md#multi-entry-configuration).
:::

## basename

- **Type:** `string`
- **Default:** `/`

Sets the `basename` for client-side routing, typically used when the application needs to be deployed under a non-root path of the domain.

:::tip
It is recommended to use [`server.baseUrl`](/configure/app/server/base-url.md) for configuration.
:::

## supportHtml5History

- **Type:** `boolean`
- **Default:** `true`

If the value of `supportHtml5History` is `true`, `BrowserRouter` would be used, otherwise `HashRouter` would be used. `BrowserRouter` is recommended.

:::warning
When SSR is enabled, `supportHtml5History` is not supported.

:::
