diff --git a/package.json b/package.json index 881f3034..ec8589ed 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "husky": "^1.1.2", "jest": "^23.6.0", "lint-staged": "^8.0.0", - "prettier": "^1.13.0", + "prettier": "^1.15.3", "regenerator-runtime": "^0.12.1", "rimraf": "^2.6.2", "shell-quote": "^1.6.1", diff --git a/src/index.js b/src/index.js index 4d6e8ee5..b933fadd 100644 --- a/src/index.js +++ b/src/index.js @@ -106,8 +106,8 @@ export default async function microbundle(options) { (await isFile(resolve(cwd, filename + '.ts'))) ? '.ts' : (await isFile(resolve(cwd, filename + '.tsx'))) - ? '.tsx' - : '.js' + ? '.tsx' + : '.js' }`, ); @@ -117,9 +117,10 @@ export default async function microbundle(options) { options.entries && options.entries.length ? options.entries : (options.pkg.source && resolve(cwd, options.pkg.source)) || - ((await isDir(resolve(cwd, 'src'))) && (await jsOrTs('src/index'))) || - (await jsOrTs('index')) || - options.pkg.module, + ((await isDir(resolve(cwd, 'src'))) && + (await jsOrTs('src/index'))) || + (await jsOrTs('index')) || + options.pkg.module, ) .map(file => glob(file)) .forEach(file => options.input.push(...file));