Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix package main resolving issue
  • Loading branch information
Mackenzie Turner committed Jan 18, 2018
commit 143cfa33c0d7938409db174b0c0936e95aecc354
2 changes: 1 addition & 1 deletion packages/jest-resolve/src/default_resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function resolveSync(target: Path, options: ResolverOptions): Path {
pkgmain = JSON.parse(body).main;
} catch (e) {}

if (pkgmain) {
if (pkgmain && pkgmain !== '.') {
const resolveTarget = path.resolve(name, pkgmain);
const result = tryResolve(resolveTarget);
if (result) {
Expand Down