From 9c2ea7d2bc619ca6ed59b948bb6c9be3d75316f0 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Wed, 12 Mar 2025 09:32:20 -0700 Subject: [PATCH] server: another attempt at node/esmodule interop with tsc --- server/src/plugin/plugin-remote-worker.ts | 2 +- server/tsconfig.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/src/plugin/plugin-remote-worker.ts b/server/src/plugin/plugin-remote-worker.ts index 83d92c3e1..007aa7266 100644 --- a/server/src/plugin/plugin-remote-worker.ts +++ b/server/src/plugin/plugin-remote-worker.ts @@ -387,7 +387,7 @@ export function startPluginRemote(mainFilename: string, pluginId: string, peerSe if (isModule) { process.env.SCRYPTED_SDK_ES_MODULE = __filename; - const { eseval } = await import('../es/es-eval'); + const { eseval } = await import('../es/es-eval.js'); const module = await eseval(mainNodeJsOnFilesystem); params.module.exports = module; } diff --git a/server/tsconfig.json b/server/tsconfig.json index 1a3e29a1e..b01dbe99c 100644 --- a/server/tsconfig.json +++ b/server/tsconfig.json @@ -1,11 +1,12 @@ { "compilerOptions": { "declaration": true, - "module": "commonjs", + "module": "NodeNext", "target": "esnext", "noImplicitAny": true, "outDir": "./dist", "esModuleInterop": true, + "moduleResolution": "NodeNext", // skip error: Interface 'WebGL2RenderingContext' incorrectly extends interface 'WebGL2RenderingContextBase'. // https://github.com/tensorflow/tfjs/issues/4201 "skipLibCheck": true,