From e0ae82921aaa74e75f24537327805fe583fd7831 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Tue, 23 Apr 2024 11:31:31 +0200 Subject: [PATCH] docs: fix hydration mismatch (#5596) --- docs/guide/index.md | 2 +- docs/vite.config.ts | 20 -------------------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/docs/guide/index.md b/docs/guide/index.md index 36530fd8a..24d3e455a 100644 --- a/docs/guide/index.md +++ b/docs/guide/index.md @@ -221,7 +221,7 @@ Learn more about [IDE Integrations](/guide/ide) ## Examples -[@@include](../../../examples/README.md) + ## Projects using Vitest diff --git a/docs/vite.config.ts b/docs/vite.config.ts index 2bd868822..606ceb5c8 100644 --- a/docs/vite.config.ts +++ b/docs/vite.config.ts @@ -1,10 +1,8 @@ -import fs from 'node:fs' import type { Plugin } from 'vite' import { defineConfig } from 'vite' import Components from 'unplugin-vue-components/vite' import Unocss from 'unocss/vite' import { presetAttributify, presetIcons, presetUno } from 'unocss' -import { resolve } from 'pathe' export default defineConfig({ optimizeDeps: { @@ -37,23 +35,5 @@ export default defineConfig({ }), ], }), - IncludesPlugin(), ], }) - -function IncludesPlugin(): Plugin { - return { - name: 'include-plugin', - enforce: 'pre', - transform(code, id) { - let changed = false - code = code.replace(/\[@@include\]\((.*?)\)/, (_, url) => { - changed = true - const full = resolve(id, url) - return fs.readFileSync(full, 'utf-8') - }) - if (changed) - return code - }, - } -} -- 2.51.2