diff --git a/packages/solutions/app-tools/src/index.ts b/packages/solutions/app-tools/src/index.ts index 792759b4722e..4e50b729fb05 100644 --- a/packages/solutions/app-tools/src/index.ts +++ b/packages/solutions/app-tools/src/index.ts @@ -157,7 +157,7 @@ export const appTools = ( } }); - api.onWatchFiles(async () => { + api.addWatchFiles(async () => { const appContext = api.getAppContext(); const config = api.getNormalizedConfig(); const files = await generateWatchFiles( diff --git a/packages/solutions/app-tools/src/utils/restart.ts b/packages/solutions/app-tools/src/utils/restart.ts index b8e7d268c7cc..e3c3e5d66da6 100644 --- a/packages/solutions/app-tools/src/utils/restart.ts +++ b/packages/solutions/app-tools/src/utils/restart.ts @@ -1,7 +1,7 @@ import { cli } from '@modern-js/plugin-v2/cli'; import { chalk, clearConsole, getFullArgv, logger } from '@modern-js/utils'; import { program } from '@modern-js/utils/commander'; -import type { AppToolsHooks } from '../types/hooks'; +import type { AppToolsHooks } from '../types/new'; export async function restart( hooks: AppToolsHooks<'shared'>, diff --git a/packages/solutions/app-tools/tests/analyze/getFileSystemEntry.test.ts b/packages/solutions/app-tools/tests/analyze/getFileSystemEntry.test.ts index 9fa7e10347f6..31fc8096a66f 100644 --- a/packages/solutions/app-tools/tests/analyze/getFileSystemEntry.test.ts +++ b/packages/solutions/app-tools/tests/analyze/getFileSystemEntry.test.ts @@ -3,7 +3,7 @@ import { type Plugin, createPluginManager } from '@modern-js/plugin-v2'; import { createContext, initPluginAPI } from '@modern-js/plugin-v2/cli'; import { runtimePlugin } from '../../../../runtime/plugin-runtime/src/cli'; import { appTools } from '../../src'; -import { handleSetupResult } from '../../src/new/compat/hooks'; +import { handleSetupResult } from '../../src/compat/hooks'; import { getFileSystemEntry } from '../../src/plugins/analyze/getFileSystemEntry'; import type { AppNormalizedConfig, AppTools } from '../../src/types'; import type { AppToolsContext } from '../../src/types/new';