Skip to content

Commit 944075e

Browse files
committed
use abs
1 parent 9860d26 commit 944075e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/core/src/config.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -890,8 +890,11 @@ const composeEntryConfig = async (
890890
if (bundle !== false) {
891891
let isFileEntry = false;
892892
traverseEntryQuery(entries, (entry) => {
893-
if (fs.existsSync(entry)) {
894-
const stats = fs.statSync(entry);
893+
const entryAbsPath = path.isAbsolute(entry)
894+
? entry
895+
: path.resolve(root, entry);
896+
if (fs.existsSync(entryAbsPath)) {
897+
const stats = fs.statSync(entryAbsPath);
895898
isFileEntry = stats.isFile();
896899
}
897900

0 commit comments

Comments
 (0)