File tree Expand file tree Collapse file tree 4 files changed +15
-10
lines changed Expand file tree Collapse file tree 4 files changed +15
-10
lines changed Original file line number Diff line number Diff line change
1
+ import { defineClientConfig } from '@vuepress/client'
2
+ import ReferenceSection from './client/components/reference-section'
3
+ import { h } from 'vue'
4
+
5
+ export default defineClientConfig ( {
6
+ async enhance ( { app, router, siteData} ) {
7
+ if ( ! __VUEPRESS_SSR__ ) {
8
+ // wrap the `<ComponentReference />` component with plugin options
9
+ app . component ( 'ComponentReference' , ( props ) => h ( ReferenceSection , { } ) )
10
+ }
11
+ } ,
12
+ setup ( ) { } ,
13
+ rootComponents : [ ] ,
14
+ } )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export const componentReference: Plugin<ComponentReferenceOptions> = ({
23
23
baseDir = 'component-references' ,
24
24
} ) => ( {
25
25
name : 'plugin-object' ,
26
- clientAppEnhanceFiles : path . resolve ( __dirname , './client/clientAppEnhance .ts' ) ,
26
+ clientConfigFile : path . resolve ( __dirname , './client.ts' ) ,
27
27
extendsPage ( page , app : App ) {
28
28
const { filePath} = resolvePageComponentReferencePath ( baseDir , page , app )
29
29
let componentReference = null
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import {defineClientConfig} from '@vuepress/client'
2
2
import 'bootstrap/scss/bootstrap.scss'
3
3
import 'bootstrap-vue-3/dist/bootstrap-vue-3.css'
4
4
import DocReference from './components/DocReference.vue'
5
- import ReferenceSection from './PluginComponentReference/client/components/reference-section'
6
5
import { h } from 'vue'
7
6
8
7
export default defineClientConfig ( {
@@ -12,7 +11,6 @@ export default defineClientConfig({
12
11
app . use ( BootstrapVue3 )
13
12
app . use ( BToastPlugin )
14
13
app . component ( 'doc-reference' , DocReference )
15
- app . component ( 'ComponentReference' , ( props ) => h ( ReferenceSection , { } ) )
16
14
}
17
15
} ,
18
16
setup ( ) { } ,
You can’t perform that action at this time.
0 commit comments