make Debug global

pull/1/head
Evan You 5 years ago
parent cae5bbaf90
commit 61904b3a76

@ -4,6 +4,7 @@ import { useUpdateHead } from './composables/head'
import { siteDataRef } from './composables/siteData'
import { pageDataSymbol } from './composables/pageData'
import { Content } from './components/Content'
import Debug from './components/Debug.vue'
import Theme from '/@theme/index'
import { hot } from '@hmr'
@ -73,6 +74,7 @@ export function createApp() {
app.provide(pageDataSymbol, pageDataRef)
app.component('Content', Content)
app.component('Debug', __DEV__ ? Debug : () => null)
Object.defineProperties(app.config.globalProperties, {
$site: {

@ -7,16 +7,6 @@
<Debug/>
</template>
<script>
import { Debug } from 'vitepress'
export default {
components: {
Debug: __DEV__ ? Debug : () => null
}
}
</script>
<style>
.theme-container {
font-family: Arial, Helvetica, sans-serif;

Loading…
Cancel
Save