Skip to content

Commit 96856ba

Browse files
Andaristdevongovett
authored andcommitted
Prioritize browser field over module (#1662)
1 parent 1ab0558 commit 96856ba

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Resolver.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,9 @@ class Resolver {
273273
}
274274

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

0 commit comments

Comments
 (0)