headers
field has been removed from page data, but it's still available on page objectcontent
have higher priority than filePath
in page options (12dbc67)markdown.code
option is remove. Please use @vuepress/plugin-shiki
and @vuepress/plugin-prismjs
instead.*.module.[ext]
files. The previous *.[ext]?module
usage is no longer supported.vuepress-vite
and vuepress-webpack
packages have been removed, and the corresponding commands have been moved to vuepress
package. With vuepress
command, you need to install bundler package and set bundler in config file manually. With vuepress-vite
and vuepress-webpack
command, you still need to install bundler package, but you can omit bundler option in config file.ariaHidden
to headerLink
for better accessibility, which would be a potential breaking change for theme authorsTEMPLATE_RENDERER_OUTLETS
in @vuepress/utils
package./
(#1103) (b7d71be)
, paths without ./
or /
or protocol will be treated as relative linksexcerpt
has been removed from page object and page data@vuepress/utils
no longer exports chalk
, use colors
insteadext-xxx
class name of code fences has been removedlayouts
has been removed, layouts should be set in client config instead of theme entry404
layout should be renamed to NotFound
layoutapp.layouts
has been removedpage.sfcBlocks
has been changedmarkdown.extractHeaders
has been renamed to markdown.headers
markdown.extractTitle
has been renamed to markdown.title
markdown.hoistTags
has been renamed to markdown.sfc
page.hoistedTags
has been renamed to page.sfcBlocks
markdown.customComponent
has been renamed to markdown.component
colorMode
and colorModeSwitch
options (close #796) (d89cf86)darkMode
has been replaced with colorMode
and colorModeSwitch
toggleDarkMode
has been renamed to toggleColorMode
base
manuallyclientAppEnhanceFiles
, clientAppRootComponentFiles
and clientAppSetupFiles
hooks are removed, use clientConfigFile
hook instead.vuepress/clientAppEnhance.{js,ts}
has been renamed to .vuepress/client.{js,ts}
, and the usage has been changed toocode.vPre
option changed from boolean
to
Record<'block' | 'inline', boolean>
bundler
should import the bundler directly, and bundlerConfig
has been removedtheme
should import the theme directly, and themeConfig
has been removedplugins
should import the plugins directlyplugins
should import the plugins directlyextends
should import the parent theme directlyshouldPrefetch
option has been changed from false
to true
configureWebpack
option to return void (#662) (4488cb3)@vuepress/plugin-debug
package has been removedtemplateSSR
is renamed to templateBuild
beforeDevServer
and afterDevServer
options are removed, use devServerSetupMiddlewares
insteadmarkdown.links.externalIcon
is removed, use plugin-external-link-icon insteadexternalIcon
is removed, use externalLinkIcon
from plugin-external-link-iconOutboundLink
is removed, use ExternalLinkIcon
from plugin-external-link-iconapp.markdown
is only available in and after onInitialized
hookextendsPageOptions
hook does not allow a return value any moreextendsPageData
hook should be migrated to extendsPage
hookPageOptions
does not accept relative file pathVUEPRESS
prefix nowlogoDark
locale option (close #283) (991c07a)code.lineNumbers
to be set to number (close #231) (#276) (a7fbdec)toggleDarkMode
locale option (#275) (a685a1b)extendsPageData
hook is processed before onInitialized
hookmarkdown.anchor
has changed, see changelog of markdown-it-anchor 8.0.0isGroup
field of sidebar config is removedapp.themeApi
is removedpagePath
prop of <Content>
renamed to pageKey
evergreen
option is moved to bundlerConfig.evergreen
for bundler-webpackplugin-foo/lib/client
@vuepress/plugin-palette-stylus
to @vuepress/plugin-palette
themeConfig
is not available in site data any more./
(#1103) (b7d71be)
, paths without ./
or /
or protocol will be treated as relative links__VUEPRESS_BASE__
constant (fe047fe)excerpt
has been removed from page object and page data@vuepress/utils
no longer exports chalk
, use colors
insteadext-xxx
class name of code fences has been removedlayouts
has been removed, layouts should be set in client config instead of theme entry404
layout should be renamed to NotFound
layoutapp.layouts
has been removedpage.sfcBlocks
has been changedmarkdown.extractHeaders
has been renamed to markdown.headers
markdown.extractTitle
has been renamed to markdown.title
markdown.hoistTags
has been renamed to markdown.sfc
page.hoistedTags
has been renamed to page.sfcBlocks
markdown.customComponent
has been renamed to markdown.component
colorMode
and colorModeSwitch
options (close #796) (d89cf86)darkMode
has been replaced with colorMode
and colorModeSwitch
toggleDarkMode
has been renamed to toggleColorMode
base
manuallyclientAppEnhanceFiles
, clientAppRootComponentFiles
and clientAppSetupFiles
hooks are removed, use clientConfigFile
hook instead.vuepress/clientAppEnhance.{js,ts}
has been renamed to .vuepress/client.{js,ts}
, and the usage has been changed toocode.vPre
option changed from boolean
to
Record<'block' | 'inline', boolean>
This release contains important breaking changes. The way to use bundler, theme and plugins has been totally changed.
The old way is a legacy of VuePress v1. We finally decided to drop it for following reasons:
require.resolve
dependencies inside the core package, which could not work with some strict package manager like pnpm.You could migrate your config file as follow, and check our latest docs for more details:
- module.exports = {
- theme: '@vuepress/theme-default',
- themeConfig: {
- // default theme config
- },
- }
+ const { defaultTheme } = require('vuepress')
+ module.exports = {
+ theme: defaultTheme({
+ // default theme config
+ })
+ }
- module.exports = {
- bundler: '@vuepress/bundler-vite',
- bundlerConfig: {
- // vite bundler config
- },
- }
+ const { viteBundler } = require('vuepress')
+ module.exports = {
+ bundler: viteBundler({
+ // vite bundler config
+ })
+ }
- module.exports = {
- plugins: [
- [
- '@vuepress/plugin-google-analytics',
- {
- id: 'G-XXXXXXXXXX',
- },
- ],
- ],
- }
+ const { googleAnalyticsPlugin } = require('@vuepress/plugin-google-analytics')
+ module.exports = {
+ plugins: [
+ googleAnalyticsPlugin({
+ id: 'G-XXXXXXXXXX',
+ }),
+ ],
+ }
bundler
should import the bundler directly, and bundlerConfig
has been removedtheme
should import the theme directly, and themeConfig
has been removedplugins
should import the plugins directlyplugins
should import the plugins directlyextends
should import the parent theme directlyshouldPrefetch
option has been changed from false
to true
configureWebpack
option to return void (#662) (4488cb3)@vuepress/plugin-debug
package has been removedtemplateSSR
is renamed to templateBuild
beforeDevServer
and afterDevServer
options are removed, use devServerSetupMiddlewares
insteadmarkdown.links.externalIcon
is removed, use plugin-external-link-icon insteadexternalIcon
is removed, use externalLinkIcon
from plugin-external-link-iconOutboundLink
is removed, use ExternalLinkIcon
from plugin-external-link-iconapp.markdown
is only available in and after onInitialized
hookextendsPageOptions
hook does not allow a return value any moreextendsPageData
hook should be migrated to extendsPage
hookPageOptions
does not accept relative file pathVUEPRESS
prefix nowlogoDark
locale option (close #283) (991c07a)code.lineNumbers
to be set to number (close #231) (#276) (a7fbdec)toggleDarkMode
locale option (#275) (a685a1b)extendsPageData
hook is processed before onInitialized
hookmarkdown.anchor
has changed, see changelog of markdown-it-anchor 8.0.0isGroup
field of sidebar config is removedpagePath
prop of <Content>
renamed to pageKey
evergreen
option is moved to bundlerConfig.evergreen
for bundler-webpackplugin-foo/lib/client
Note: Version bump only
@vuepress/plugin-palette-stylus
to @vuepress/plugin-palette
themeConfig
is not available in site data any moreВы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )