fix(preset-umi): fix clickToComponent path injection on Windows#13221
Open
rurounibatousai wants to merge 1 commit intoumijs:masterfrom
Open
fix(preset-umi): fix clickToComponent path injection on Windows#13221rurounibatousai wants to merge 1 commit intoumijs:masterfrom
rurounibatousai wants to merge 1 commit intoumijs:masterfrom
Conversation
|
@rurounibatousai is attempting to deploy a commit to the chencheng's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@xiaohuoni 大佬能合并发布下么 |
Author
哥们才看到你的回复,邮件被塞满了,你的回复消息被压倒最下面去了,不好意思,我应该是没有权限合并的,哈哈哈 可能需要他们官方的来搞吧,我也不知道,实际上你把你的文件夹名字改一下应该就好了,不要用那种 /t ,带有转义的名称开头,你看看能不能帮助到你,也不要使用数字开头。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes an issue where
clickToComponentfails to open files correctly on Windows due to path escaping issues in the generated runtime code.Issues Fixed
api.paths.cwdwas injected directly into a template string via'${api.paths.cwd}'. On Windows, paths likeC:\Userscaused syntax errors or invalid escapes in the generatedruntime.tsx.\) and forward slashes (/).editorprop being passed as a literal string"${...}"instead of a variable.Solution
JSON.stringify(winPath(api.paths.cwd))to inject the CWD safely.normalizefunction andisAbsoluteLikecheck to support Windows paths and VS Code URI schemes.