Commit 08d44f8
committed
fix(Wind): Enable WKWebView compatibility with relative imports
Set VSCODE_DEV: "true" in both Install.ts userEnv and ProcessPolyfill default config. This tells the Electron workbench to use relative imports instead of vscode-file:// URLs, resolving the WKWebView (macOS) limitation where custom URL schemes cannot be used with import().
Also fix potential null reference in ProcessPolyfill by deferring hrtimeStart initialization. The previous code called process.hrtime() at module evaluation time, but Wind sets window.vscode.process after Install.ts runs, not globalThis.process. Initialize to [0, 0] and let the actual timer start lazily.
These changes enable the VS Code workbench to render properly in the Tauri webview on macOS.1 parent d3b21da commit 08d44f8
4 files changed
Lines changed: 34 additions & 13 deletions
File tree
- Source
- Function
- Polyfills
- Target
- Function
- Polyfills
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | 172 | | |
177 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
178 | 182 | | |
179 | 183 | | |
180 | 184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
158 | 163 | | |
159 | 164 | | |
160 | 165 | | |
| |||
239 | 244 | | |
240 | 245 | | |
241 | 246 | | |
242 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
243 | 251 | | |
244 | 252 | | |
245 | 253 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments