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 your pages to the Slidev app.


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

import { defineRoutesSetup } from '@slidev/types'

export default defineRoutesSetup((routes) => {
  return [
      path: '/my-page',
      component: () => import('../pages/my-page.vue'),

Learn more about routes in the Vue Router documentation.

Released under the MIT License.