mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-27 16:33:49 +00:00
10 lines
284 B
TypeScript
10 lines
284 B
TypeScript
export const getWorkerPath = (name: string) => {
|
|
// @ts-ignore
|
|
const isSubModule = !!global?.systemConfig;
|
|
|
|
const isProd = process.env.NODE_ENV === 'production';
|
|
return isProd
|
|
? `/app/worker/${name}.js`
|
|
: `../../${isSubModule ? 'FastGPT/' : ''}/worker/${name}.js`;
|
|
};
|