diff --git a/packages/app/.umirc.ts b/packages/app/.umirc.ts index 548909ee50..a47097428e 100644 --- a/packages/app/.umirc.ts +++ b/packages/app/.umirc.ts @@ -35,5 +35,12 @@ export default defineConfig({ '@nocobase/client', resolve(__dirname, '../client/src'), ); + config.module.rules + .get('ts-in-node_modules') + .include.add(resolve(__dirname, '../utils/src')); + config.resolve.alias.set( + '@nocobase/utils', + resolve(__dirname, '../utils/src'), + ); }, }); diff --git a/packages/utils/src/registry.ts b/packages/utils/src/registry.ts index ae95b21210..3dd4a07f04 100644 --- a/packages/utils/src/registry.ts +++ b/packages/utils/src/registry.ts @@ -1,5 +1,3 @@ -import path from 'path'; -import { promises as fs } from 'fs'; export interface RegistryOptions { override: boolean;