mirror of
https://github.com/ByteAtATime/raycast-linux.git
synced 2025-08-30 18:57:25 +00:00
refactor: simplify module requiring in plugin.ts
This commit is contained in:
parent
6e98d829bc
commit
c096ee5397
1 changed files with 2 additions and 6 deletions
|
@ -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[] => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue