From 1e6ec5e624536faba043ecb075f5cbb0223d5a36 Mon Sep 17 00:00:00 2001 From: pengzhanbo Date: Sun, 14 Apr 2024 19:30:01 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E4=BF=AE=E6=94=B9=20?= =?UTF-8?q?permalink=20=E6=97=B6=E5=AD=98=E5=9C=A8=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pnpm-lock.yaml | 3 +++ theme/package.json | 1 + theme/src/node/theme.ts | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 91c3f7a9..140ed0a8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -398,6 +398,9 @@ importers: '@vuepress-plume/plugin-shikiji': specifier: workspace:* version: link:../plugins/plugin-shikiji + '@vuepress/helper': + specifier: 2.0.0-rc.21 + version: 2.0.0-rc.21(typescript@5.4.4)(vuepress@2.0.0-rc.9) '@vuepress/plugin-active-header-links': specifier: 2.0.0-rc.21 version: 2.0.0-rc.21(typescript@5.4.4)(vuepress@2.0.0-rc.9) diff --git a/theme/package.json b/theme/package.json index 0c026f93..066c19e7 100644 --- a/theme/package.json +++ b/theme/package.json @@ -65,6 +65,7 @@ "@vuepress-plume/plugin-notes-data": "workspace:*", "@vuepress-plume/plugin-search": "workspace:*", "@vuepress-plume/plugin-shikiji": "workspace:*", + "@vuepress/helper": "2.0.0-rc.21", "@vuepress/plugin-active-header-links": "2.0.0-rc.21", "@vuepress/plugin-comment": "2.0.0-rc.21", "@vuepress/plugin-container": "2.0.0-rc.21", diff --git a/theme/src/node/theme.ts b/theme/src/node/theme.ts index 499abb1c..1d81baea 100644 --- a/theme/src/node/theme.ts +++ b/theme/src/node/theme.ts @@ -1,5 +1,6 @@ import type { Page, Theme } from 'vuepress/core' import { logger, templateRenderer } from 'vuepress/utils' +import { addViteConfig } from '@vuepress/helper' import type { PlumeThemeOptions, PlumeThemePageData } from '../shared/index.js' import { mergeLocaleOptions } from './defaultOptions.js' import { setupPlugins } from './plugins.js' @@ -72,6 +73,11 @@ export function plumeTheme({ .replace(/\n/g, '') return templateRenderer(template, context) }, + extendsBundlerOptions: (options, app) => { + addViteConfig(options, app, { + server: { fs: { cachedChecks: false } }, + }) + }, } } }