Skip to content

ルートの設定

環境: client
このセットアップ関数は、クライアント環境でのみ実行されます。パッケージをインポートする際はブラウザの互換性に注意してください。

Slidev アプリにカスタムページを追加します。

使用方法

./setup/routes.ts ファイルを以下の内容で作成します:

./setup/routes.ts
ts
import { 
defineRoutesSetup
} from '@slidev/types'
export default
defineRoutesSetup
((
routes
) => {
return [ ...
routes
,
{
path
: '/my-page',
component
: () => import('../pages/my-page.vue'),
}, ] })

ルートについて、詳しくは Vue ルーターのドキュメント をご覧ください。

Released under the MIT License.