fix: import json warnning

This commit is contained in:
sealday 2024-04-13 00:35:20 +08:00
parent a1223960e2
commit c6406a0c47

View File

@ -230,7 +230,7 @@ export async function genTsConfigPaths() {
await Promise.all( await Promise.all(
packages.map(async (packageFile) => { 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 packageDir = dirname(packageFile);
const relativePath = packageDir const relativePath = packageDir
.slice(cwdLength + 1) .slice(cwdLength + 1)