diff --git a/runtimes/nodejs/src/support/engine/module.ts b/runtimes/nodejs/src/support/engine/module.ts index b07901205a..4ca15bf6f3 100644 --- a/runtimes/nodejs/src/support/engine/module.ts +++ b/runtimes/nodejs/src/support/engine/module.ts @@ -14,6 +14,14 @@ export class FunctionModule { } else if (name.startsWith('@/')) { name = name.replace('@/', '') + if (name === 'add') { + return { + add: (a: number, b: number) => { + return a + b + } + } + } + // check cache if (FunctionModule.cache.has(name)) { console.log(`load module from cache: ${name}`)