From 9b979ac869a783a507a158400e77c84044bd73e0 Mon Sep 17 00:00:00 2001 From: Asher Date: Wed, 5 Aug 2020 12:54:58 -0500 Subject: [PATCH] Document code-server injection --- src/node/plugin.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/node/plugin.ts b/src/node/plugin.ts index f838f756..54f7f2b7 100644 --- a/src/node/plugin.ts +++ b/src/node/plugin.ts @@ -13,6 +13,10 @@ export interface Plugin { activate: Activate } +/** + * Intercept imports so we can inject code-server when the plugin tries to + * import it. + */ const originalLoad = require("module")._load // eslint-disable-next-line @typescript-eslint/no-explicit-any require("module")._load = function (request: string, parent: object, isMain: boolean): any {