diff --git a/packages/core/server/src/locale/resource.ts b/packages/core/server/src/locale/resource.ts index 56bc3cc0c..f9d7a56f7 100644 --- a/packages/core/server/src/locale/resource.ts +++ b/packages/core/server/src/locale/resource.ts @@ -12,6 +12,14 @@ export const getResource = (packageName: string, lang: string, isPlugin = true) const resources = []; const prefixes = [isPlugin ? 'dist' : 'lib']; if (process.env.APP_ENV !== 'production') { + try { + require.resolve('@nocobase/client/src'); + if (packageName === '@nocobase/plugin-client') { + packageName = '@nocobase/client'; + } + } catch (error) { + // empty + } prefixes.unshift('src'); } for (const prefix of prefixes) {