Skip to content

Commit

Permalink
Prioritize browser field over module (#1662)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist authored and devongovett committed Jul 4, 2018
1 parent 1ab0558 commit 96856ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Resolver.js
Expand Up @@ -273,9 +273,9 @@ class Resolver {
}

// libraries like d3.js specifies node.js specific files in the "main" which breaks the build
// we use the "module" or "browser" field to get the full dependency tree if available.
// we use the "browser" or "module" field to get the full dependency tree if available.
// If this is a linked module with a `source` field, use that as the entry point.
let main = [pkg.source, pkg.module, browser, pkg.main].find(
let main = [pkg.source, browser, pkg.module, pkg.main].find(
entry => typeof entry === 'string'
);

Expand Down

0 comments on commit 96856ba

Please sign in to comment.