Skip to content

Commit

Permalink
chore(docs): use client config file
Browse files Browse the repository at this point in the history
Breaking change in VuePress Beta 2.45
  • Loading branch information
stfsy committed May 16, 2022
1 parent 7d0b5f4 commit fd8edf5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 20 deletions.
14 changes: 14 additions & 0 deletions docs/.vuepress/client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import * as components from '@discue/ui-components/ssr'
import * as internalComponents from '@discue/ui-components/ssr/internal'
import { defineClientConfig } from '@vuepress/client'

export default defineClientConfig({
enhance({ app, _router, _siteData }) {
Object.entries(components).forEach(([key, value]) => {
app.component(key, value)
})
Object.entries(internalComponents).forEach(([key, value]) => {
app.component(key, value)
})
}
})
2 changes: 0 additions & 2 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const { viteBundler } = require('@vuepress/bundler-vite');

const defaultTheme = require('./theme')

const clientAppEnhanceFiles = require('./configs/client-app-enhance-files')
const head = require('./configs/head')
const extendsMarkdown = require('./configs/extends-markdown')
const markdown = require('./configs/markdown')
Expand Down Expand Up @@ -31,7 +30,6 @@ module.exports = {
},
),
plugins,
clientAppEnhanceFiles,
extendsMarkdown,
markdown,
head,
Expand Down
6 changes: 0 additions & 6 deletions docs/.vuepress/configs/client-app-enhance-files.js

This file was deleted.

12 changes: 0 additions & 12 deletions docs/.vuepress/enhance/clientAppEnhance.js

This file was deleted.

0 comments on commit fd8edf5

Please sign in to comment.