Skip to content

Commit

Permalink
Fallback to index.js.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed May 10, 2018
1 parent 873f020 commit bdfbfe4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function resolveMeta(name) {

function resolveTarget(target) {
return resolveMeta(`${target.name}@${target.version || "latest"}`).then(meta => {
return `${origin}${meta.name}@${meta.version}/${target.path || meta.unpkg || meta.main}`;
return `${origin}${meta.name}@${meta.version}/${target.path || meta.unpkg || meta.main || "index.js"}`;
});
}

Expand Down

0 comments on commit bdfbfe4

Please sign in to comment.