mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-18 17:51:24 +00:00
v4.6.5 (#620)
This commit is contained in:
9
packages/service/common/string/utils.ts
Normal file
9
packages/service/common/string/utils.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
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`;
|
||||
};
|
Reference in New Issue
Block a user