Skip to content

Commit

Permalink
Fallback to undefined for resolve.modules instead of empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
styfle committed Sep 17, 2021
1 parent 573b1cf commit c68542c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ function ncc (
// webpack defaults to `module` and `main`, but that's
// not really what node.js supports, so we reset it
mainFields: ["main"],
modules: resolveModules,
modules: resolveModules.length > 0 ? resolveModules : undefined,
plugins: resolvePlugins
},
// https://github.com/vercel/ncc/pull/29#pullrequestreview-177152175
Expand Down

0 comments on commit c68542c

Please sign in to comment.