vssue
vssue copied to clipboard
[Question] How to integrate with Vitepress?
I'm attempting to bring this into a Vitepress project with the following theme config:
import DefaultTheme from 'vitepress/dist/client/theme-default'
import 'vssue/dist/vssue.css'
import Vssue from 'vssue'
import GithubV3 from '@vssue/api-github-v3'
export default {
...DefaultTheme,
enhanceApp({ app }) {
app.component('Vssue', Vssue, {
api: GithubV3,
owner: 'CodyBontecou',
repo: 'blog',
clientId: process.env.GITHUB_CLIENT_ID,
clientSecret: process.env.GITHUB_CLIENT_SECRET,
})
},
}
This gives me the errors:
Vite Error, /@fs/Users/codybontecou/Code/blog/node_modules/.vite/deps/@vssue_api-github-v3.js?v=08f3ac7d optimized info should be defined
Vite Error, /@fs/Users/codybontecou/Code/blog/node_modules/.vite/deps/vssue.js?v=f937cd3e optimized info should be defined
Even just importing Vssue or GithubV3 creates the error as well. Any ideas?
This works for me:
rm -rf node_modules/.vite
难道不会出现不适配情况?如下图,这个是不是没辙,只有等vssue适配了,才能用到vitepress里了。