From 6a4090cff05a1f57bf9bb831d95694642cd578dc Mon Sep 17 00:00:00 2001 From: whxaxes Date: Thu, 6 Jun 2024 11:03:36 +0800 Subject: [PATCH] fix: exports is object --- 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) {