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

bug(git-changelog): wrong git data fetched for rewrited paths during dev #278

Open
northword opened this issue Jul 27, 2024 · 0 comments
Open
Labels
bug Something isn't working pkg/git-changelog Related to @nolebase/vitepress-plugin-git-changelog

Comments

@northword
Copy link
Member

In dev mode, if the user has a rewritePath, especially if there is a rewrite of a non-md file (such as a ts file) to a md file, then the fetched Git data is inaccurate because the client sends the filepath of the md file to the vite, not the path of the ts file, and therefore fetches and displays Git data for the md file.

We need to do a reverse rewrite when vite receives the path sent by the client, and then perform the subsequent steps. However, since the user-configured rewritePathBy is ts->md, it is difficult to accurately infer the path of the ts file from md.

@northword northword added bug Something isn't working pkg/git-changelog Related to @nolebase/vitepress-plugin-git-changelog labels Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg/git-changelog Related to @nolebase/vitepress-plugin-git-changelog
Projects
None yet
Development

No branches or pull requests

1 participant