Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] How to integrate with Vitepress? #153

Open
CodyBontecou opened this issue May 19, 2022 · 2 comments
Open

[Question] How to integrate with Vitepress? #153

CodyBontecou opened this issue May 19, 2022 · 2 comments

Comments

@CodyBontecou
Copy link

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?

@ForkKILLET
Copy link

This works for me:

rm -rf node_modules/.vite

@Perrywzp
Copy link

Perrywzp commented Jan 4, 2024

难道不会出现不适配情况?如下图,这个是不是没辙,只有等vssue适配了,才能用到vitepress里了。
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants