Commit 482d1ed
fix: normalize path separators in comfyAPIPlugin for Windows compatibility (#7087)
## Summary
Normalize the path separators by replacing all backslashes with forward
slashes before using relativePath
Root Cause
In build/plugins/comfyAPIPlugin.ts, the path.relative() function
generates relative paths that contain backslashes on Windows (e.g.,
scripts\ui.ts). When this path is directly embedded into a JavaScript
string literal, the \u sequence is interpreted as the start of a Unicode
escape sequence, causing the SyntaxError: Invalid Unicode escape
sequence error
## Screenshots
previous error
<img width="720" height="208" alt="image"
src="https://github.com/user-attachments/assets/45b9a6e1-f35e-473d-af29-9e181bbe24eb"
/>
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7087-fix-normalize-path-separators-in-comfyAPIPlugin-for-Windows-compatibility-2bd6d73d365081cb88c1c6a0f168a5b5)
by [Unito](https://www.unito.io)1 parent c8a1df3 commit 482d1ed
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
96 | | - | |
| 98 | + | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
| |||
0 commit comments