mirror of https://github.com/YunYouJun/valaxy
fix: vite clientDeps optimize make unplugin-vue-router Symbol(loaderEntries) invalid
This commit is contained in:
parent
6a9a36e4a6
commit
3fe4a742e3
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
import type { Post } from 'valaxy'
|
||||
|
||||
// import { useLayout } from 'valaxy'
|
||||
import { useLayout } from 'valaxy'
|
||||
import YunPostMeta from 'valaxy-theme-yun/components/YunPostMeta.vue'
|
||||
|
||||
defineProps<{
|
||||
|
@ -9,13 +9,13 @@ defineProps<{
|
|||
}>()
|
||||
|
||||
// 仅在 Post 布局显示
|
||||
// const isPost = useLayout('post')
|
||||
const isPost = useLayout('post')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<YunPostMeta :frontmatter="frontmatter">
|
||||
<!-- <span v-if="isPost" id="busuanzi_container_page_pv">
|
||||
<span v-if="isPost" id="busuanzi_container_page_pv">
|
||||
本文总阅读量 <span id="busuanzi_value_page_pv" /> 次
|
||||
</span> -->
|
||||
</span>
|
||||
</YunPostMeta>
|
||||
</template>
|
||||
|
|
|
@ -30,7 +30,6 @@ const clientDeps = [
|
|||
// vue
|
||||
'vue',
|
||||
'vue-router',
|
||||
'unplugin-vue-router/data-loaders/basic',
|
||||
|
||||
'vue-i18n',
|
||||
// dev
|
||||
|
@ -72,6 +71,12 @@ const EXCLUDE = [
|
|||
'/@valaxyjs/addons',
|
||||
'/@valaxyjs/locales',
|
||||
'/@valaxyjs/styles',
|
||||
|
||||
/**
|
||||
* unplugin-vue-router
|
||||
* exclude to avoid vite optimize, will make Symbol('loaderEntries') valid
|
||||
*/
|
||||
'unplugin-vue-router/data-loaders/basic',
|
||||
]
|
||||
|
||||
export function createConfigPlugin(options: ResolvedValaxyOptions): Plugin {
|
||||
|
|
Loading…
Reference in New Issue