Closed
Description
- Version: node v10.3.0
- Platform: linux, windows, wsl
When running node with --experimental-modules flag, the global require
object has a main
property but its value is always undefined
. Is this by design?
// index.js
console.log(require.main === undefined)
$ node index.js
false
$ node --experimental-modules index.js
true