Fix custom source with cwd issue: resolve source path before passing it further

This commit is contained in:
Sergey Petushkov 2018-07-28 13:44:52 +02:00
parent 64986611ef
commit 56f6b7a697

View File

@ -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,