From e57e59ba2423fb3b1bed99f9b40f27a1d0e2af4b Mon Sep 17 00:00:00 2001 From: Timeless0911 <1604889533@qq.com> Date: Fri, 27 Dec 2024 13:39:39 +0800 Subject: [PATCH] fix: should use correct default previewMode --- packages/plugin-preview/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-preview/src/index.ts b/packages/plugin-preview/src/index.ts index 7a1ea957e..67f7e40d9 100644 --- a/packages/plugin-preview/src/index.ts +++ b/packages/plugin-preview/src/index.ts @@ -38,7 +38,7 @@ export function pluginPreview(options?: Options): RspressPlugin { previewCodeTransform = ({ code }: { code: string }) => code, } = options ?? {}; const previewMode = - (options?.previewMode ?? isMobile) ? 'iframe' : 'internal'; + options?.previewMode ?? (isMobile ? 'iframe' : 'internal'); const { devPort = 7890, framework = 'react',