integrations icon indicating copy to clipboard operation
integrations copied to clipboard

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

Open northword opened this issue 7 months ago • 0 comments

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 avatar Jul 27 '24 14:07 northword