Skip to content

Commit 9b979ac

Browse files
committed
Document code-server injection
1 parent 3badf6b commit 9b979ac

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/node/plugin.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ export interface Plugin {
1313
activate: Activate
1414
}
1515

16+
/**
17+
* Intercept imports so we can inject code-server when the plugin tries to
18+
* import it.
19+
*/
1620
const originalLoad = require("module")._load
1721
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1822
require("module")._load = function (request: string, parent: object, isMain: boolean): any {

0 commit comments

Comments
 (0)