integrations
integrations copied to clipboard
bug(git-changelog): wrong git data fetched for rewrited paths during dev
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.