Skip to content

Configure Routes

Environment: client
This setup function will only run on client side. Make sure the browser compatibility when importing packages.

Add custom pages to the Slidev app.

Usage

Create ./setup/routes.ts with the following content:

./setup/routes.ts
ts
import {  } from '@slidev/types'

export default (() => {
  return [
    ...,
    {
      : '/my-page',
      : () => import('../pages/my-page.vue'),
    },
  ]
})

Learn more about routes in the Vue Router documentation.

Released under the MIT License.