From ed4c7598d4c1715a8306190f6e8e2aa8d851b95b Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Sun, 8 May 2022 13:52:45 +0800 Subject: [PATCH] docs: version selector (#8065) --- docs/.vitepress/{config.js => config.ts} | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) rename docs/.vitepress/{config.js => config.ts} (94%) diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.ts similarity index 94% rename from docs/.vitepress/config.js rename to docs/.vitepress/config.ts index ee76a29986d3fb..4659ea5ab7ae4f 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.ts @@ -1,9 +1,6 @@ -// @ts-check +import { defineConfig } from 'vitepress' -/** - * @type {import('vitepress').UserConfig} - */ -module.exports = { +export default defineConfig({ title: 'Vite', description: 'Next Generation Frontend Tooling', head: [['link', { rel: 'icon', type: 'image/svg+xml', href: '/logo.svg' }]], @@ -64,6 +61,15 @@ module.exports = { } ] }, + { + text: 'v3 (next)', + items: [ + { + text: 'v2.x (stable)', + link: 'https://v2.vitejs.dev' + } + ] + }, { text: 'Languages', items: [ @@ -169,4 +175,4 @@ module.exports = { ] } } -} +})