Skip to content

升级依赖

bash
yarn add -D vuepress@next @vuepress/plugin-back-to-top@next @vuepress/plugin-google-analytics@next @vuepress/plugin-medium-zoom@next @vuepress/plugin-pwa@next

pwa

manifest.json -> manifest.webmanifest

config.ts

./docs/.vuepress/config.ts

config.js 改成 config.ts

删除默认插件

['@vuepress/back-to-top', true],

['@vuepress/medium-zoom', true],
nav -> navbar

其他插件 api 变化

['@vuepress/google-analytics', { id: 'UA-141261528-1' }],

['@vuepress/pwa', { skipWaiting: true }],

删除

title: 'Blog',
path: '',

增加

text: 'Blog',

变化

children 元素都要加后缀 例如 书签 -> 书签.md

其他报错

  • md 使用 vue 组件方式

    内容含有 jsx 标签的可能 build 失败,例如 <App /> 改成 <App />