We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d664b8 commit 4b0f271Copy full SHA for 4b0f271
src/extension.ts
@@ -166,6 +166,18 @@ try {
166
167
return readFileSyncUnpatched(...args)
168
}
169
+
170
+ const loadedModule = require.cache[extensionJsPath]
171
+ if (loadedModule) {
172
+ // eslint-disable-next-line @typescript-eslint/no-dynamic-delete
173
+ delete require.cache[extensionJsPath]
174
+ const patchedModule = require(extensionJsPath)
175
+ Object.assign(loadedModule.exports, patchedModule)
176
+ }
177
178
+ if (tsExtension.isActive) {
179
+ void vscode.commands.executeCommand('workbench.action.restartExtensionHost')
180
181
} catch (e) {
182
console.error('Error patching TS extension', e)
183
0 commit comments