Open YaroED opened 9 months ago
【@plugin-web-update-notification/vite'】1.7.0
import { webUpdateNotice } from '@plugin-web-update-notification/vite'
webUpdateNotice({ versionType: 'custom', customVersion: '1.0.1', // default: '0.0.0 logVersion: true, checkInterval: 0, notificationProps: { title: "📢 system update", description: "System update, please refresh the page", buttonText: "refresh", dismissButtonText: "dismiss", }, notificationConfig: { primaryColor: "red", secondaryColor: "blue", placement: "topRight", }, })
+1
https://github.com/vuejs/vitepress/issues/3314
这是一个vitepress 的问题,pluginWebUpdateNotice 内部使用了transformIndexHtml这个hook。
pluginWebUpdateNotice
transformIndexHtml
但是在vitepress 使用 vite 构建文档时,不会调用transformIndexHtml。建议等待官方修复后,升级vitepress 至最新版本
【@plugin-web-update-notification/vite'】1.7.0
import { webUpdateNotice } from '@plugin-web-update-notification/vite'
webUpdateNotice({ versionType: 'custom', customVersion: '1.0.1', // default: '0.0.0 logVersion: true, checkInterval: 0, notificationProps: { title: "📢 system update", description: "System update, please refresh the page", buttonText: "refresh", dismissButtonText: "dismiss", }, notificationConfig: { primaryColor: "red", secondaryColor: "blue", placement: "topRight", }, })