refactor: simplify module requiring in plugin.ts

This commit is contained in:
ByteAtATime 2025-06-15 13:04:44 -07:00
parent 6e98d829bc
commit c096ee5397
No known key found for this signature in database

View file

@ -18,12 +18,8 @@ const createPluginRequire =
return getRaycastApi();
}
try {
return eval('require')(moduleName);
} catch (error) {
writeLog(`Failed to require module: ${moduleName}, error: ${error}`);
throw error;
}
// eslint-disable-next-line @typescript-eslint/no-require-imports
return require(moduleName);
};
export const discoverPlugins = (): PluginInfo[] => {