module: use undefined if no main
If the package.json file does not have a "main" entry, return undefined rather than an empty string. This is to make more consistent behavior. For example, when package.json is a directory, "main" is undefined rather than an empty string. PR-URL: https://github.com/nodejs/node/pull/18593 Reviewed-By:Bradley Farias <bradley.meck@gmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By:
Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By:
Benedikt Meurer <benedikt.meurer@gmail.com> Reviewed-By:
Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com>
parent
2aa3e3b0
Please register or sign in to comment