From 56f6b7a6973f7cd8b0751047ba35f9535239e40e Mon Sep 17 00:00:00 2001 From: Sergey Petushkov Date: Sat, 28 Jul 2018 13:44:52 +0200 Subject: [PATCH] Fix custom source with cwd issue: resolve source path before passing it further --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 081e9f9..944d790 100644 --- a/src/index.js +++ b/src/index.js @@ -94,7 +94,7 @@ export default async function microbundle(options) { .concat( options.entries && options.entries.length ? options.entries - : options.pkg.source || + : (options.pkg.source && resolve(cwd, options.pkg.source)) || ((await isDir(resolve(cwd, 'src'))) && (await jsOrTs('src/index'))) || (await jsOrTs('index')) || options.pkg.module,