Skip to content

Commit

Permalink
fix: handle multiple node_modules folders determining mainFilename fo…
Browse files Browse the repository at this point in the history
…r ESM (#2123)

Co-authored-by: Landon Yarrington <33426811+jly36963@users.noreply.github.com>
Co-authored-by: Benjamin E. Coe <bencoe@google.com>
  • Loading branch information
3 people committed May 14, 2022
1 parent b42e0ca commit e0823dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/platform-shims/esm.mjs
Expand Up @@ -21,7 +21,7 @@ try {
} catch (e) {
__dirname = process.cwd();
}
const mainFilename = __dirname.split('node_modules')[0]
const mainFilename = __dirname.substring(0, __dirname.lastIndexOf('node_modules'));

export default {
assert: {
Expand Down

0 comments on commit e0823dd

Please sign in to comment.