The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/packages/apps-engine/deno-runtime/lib/require.ts

14 lines
550 B

import { createRequire } from 'node:module';
const _require = createRequire(import.meta.url);
export const require = (mod: string) => {
// When we try to import something from the apps-engine, we resolve the path using import maps from Deno
// However, the import maps are configured to look at the source folder for typescript files, but during
// runtime those files are not available
if (mod.startsWith('@rocket.chat/apps-engine')) {
mod = import.meta.resolve(mod).replace('file://', '').replace('src/', '');
}
return _require(mod);
};