From b942d5095c8e9a98194a82509120bdda7f63a164 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=96=E7=8C=A9?= Date: Thu, 6 Jun 2024 11:15:53 +0800 Subject: [PATCH] fix: exports is object (#276) --- src/plugin/common.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugin/common.ts b/src/plugin/common.ts index 7b3d89f..ab44ccc 100644 --- a/src/plugin/common.ts +++ b/src/plugin/common.ts @@ -73,7 +73,7 @@ export async function getInlinePackageEntryPath( } else if (typeof pkgJson.exports === "string") { entryFilePath = pkgJson.exports; } else if (pkgJson.exports?.["."]) { - entryFilePath = pkgJson.exports["."]; + entryFilePath = pkgJson.exports["."].require; } } if (!entryFilePath && pkgJson.main) {