diff --git a/packages/preset-umi/src/features/devTool/devTool.ts b/packages/preset-umi/src/features/devTool/devTool.ts index e07afba030bb..1cab8ccf360e 100644 --- a/packages/preset-umi/src/features/devTool/devTool.ts +++ b/packages/preset-umi/src/features/devTool/devTool.ts @@ -7,9 +7,8 @@ const devToolAppDist = join(__dirname, '../../../devToolAppDist'); const assetsDir = join(__dirname, '../../../assets'); export default (api: IApi) => { - if (process.env.OKAM) return; - api.addBeforeMiddlewares(async () => { + if (process.env.OKAM) return []; // get loading html const $ = await api.applyPlugins({ key: 'modifyDevToolLoadingHTML',