1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2024-12-27 12:45:25 +00:00

Document code-server injection

This commit is contained in:
Asher 2020-08-05 12:54:58 -05:00
parent 3badf6bf7b
commit 9b979ac869
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A

View File

@ -13,6 +13,10 @@ export interface Plugin {
activate: Activate activate: Activate
} }
/**
* Intercept imports so we can inject code-server when the plugin tries to
* import it.
*/
const originalLoad = require("module")._load const originalLoad = require("module")._load
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
require("module")._load = function (request: string, parent: object, isMain: boolean): any { require("module")._load = function (request: string, parent: object, isMain: boolean): any {