Skip to content

Commit 74de3d9

Browse files
committedJun 30, 2019
feat: use types/typings/module first to use .d.ts whenever possible
1 parent b11ede3 commit 74de3d9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed
 

‎index.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,8 @@ function resolveFile(source, file, config) {
9292
};
9393
}
9494
function packageFilter(pkg) {
95-
if (pkg['jsnext:main']) {
96-
pkg['main'] = pkg['jsnext:main'];
97-
}
95+
pkg.main =
96+
pkg.types || pkg.typings || pkg.module || pkg['jsnext:main'] || pkg.main;
9897
return pkg;
9998
}
10099

0 commit comments

Comments
 (0)
Please sign in to comment.