From 27f81130c3e9382b82ffef838a64988be94352ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franco=20S=C3=A1nchez?= Date: Wed, 27 Sep 2023 23:18:41 -0300 Subject: [PATCH] Use extends instead of spreading default theme (#503) * docs: feedback about experimental features * docs: update the proxy options link * docs: use extends instead of spreading default theme --- docs/.vitepress/theme/index.ts | 11 ++++++----- docs/config/build-options.md | 1 - 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index 39f1f2f..dce9a8f 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -1,19 +1,20 @@ import { h } from 'vue' -import Theme from 'vitepress/theme' +import type { Theme } from 'vitepress' +import DefaultTheme from 'vitepress/theme' import './styles/vars.css' import HomeSponsors from './components/HomeSponsors.vue' import AsideSponsors from './components/AsideSponsors.vue' import SvgImage from './components/SvgImage.vue' export default { - ...Theme, + extends: DefaultTheme, Layout() { - return h(Theme.Layout, null, { + return h(DefaultTheme.Layout, null, { 'home-features-after': () => h(HomeSponsors), 'aside-ads-before': () => h(AsideSponsors) }) }, enhanceApp({ app }) { app.component('SvgImage', SvgImage) - } -} + }, +} satisfies Theme diff --git a/docs/config/build-options.md b/docs/config/build-options.md index f291890..e48a275 100644 --- a/docs/config/build-options.md +++ b/docs/config/build-options.md @@ -217,7 +217,6 @@ De forma predeterminada, Vite vaciará `outDir` en la compilación si está dent ## build.copyPublicDir - **Experimental** [Hacer Comentarios](https://github.com/vitejs/vite/discussions/13807) - - **Tipo:** `boolean` - **Por defecto:** `true`