From c6406a0c4718a3acb570a045cfc4ded5f1004849 Mon Sep 17 00:00:00 2001 From: sealday Date: Sat, 13 Apr 2024 00:35:20 +0800 Subject: [PATCH] fix: import json warnning --- packages/core/cli/src/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/cli/src/util.ts b/packages/core/cli/src/util.ts index 72c70a50f..ac1313f61 100644 --- a/packages/core/cli/src/util.ts +++ b/packages/core/cli/src/util.ts @@ -230,7 +230,7 @@ export async function genTsConfigPaths() { await Promise.all( packages.map(async (packageFile) => { - const packageJsonName = (await import(packageFile, { assert: { type: 'json' } })).name; + const packageJsonName = JSON.parse(await readFile(packageFile, 'utf-8')).name; const packageDir = dirname(packageFile); const relativePath = packageDir .slice(cwdLength + 1)