Skip to content

Commit

Permalink
fix: check type property to detect esm usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ridvanaltun committed Sep 25, 2021
1 parent 7007969 commit 22bae7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DepCheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exports.default = (userPkgPath = path.join(process.cwd(), 'package.json')) => {

return {
name: dep,
supportsEsm: 'module' in pkg || 'jsnext:main' in pkg
supportsEsm: 'module' in pkg || 'jsnext:main' in pkg || pkg.type === 'module'
};
});
};

0 comments on commit 22bae7c

Please sign in to comment.