We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc6064d commit 7c29865Copy full SHA for 7c29865
src/node/main.ts
@@ -49,7 +49,9 @@ export interface OpenCommandPipeArgs {
49
export const runCodeCli = async (args: DefaultedArgs): Promise<void> => {
50
logger.debug("Running Code CLI")
51
try {
52
- const mod = require(path.join(vsRootPath, "out/server-main")) as VSCodeModule
+ // See vscode.loadVSCode for more on this jank.
53
+ const modPath = path.join(vsRootPath, "out/server-main.js")
54
+ const mod = (await eval(`import("${modPath}")`)) as VSCodeModule
55
const serverModule = await mod.loadCodeWithNls()
56
await serverModule.spawnCli(await toCodeArgs(args))
57
// Rather than have the caller handle errors and exit, spawnCli will exit
0 commit comments