Skip to content

Commit 321b89b

Browse files
committed
fix: error when dynamic importing ESM
1 parent 81073ff commit 321b89b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

launcher.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ process.on('message', options => {
2323
module._load = function(name, parent, isMain) {
2424
const file = module._resolveFilename(name, parent)
2525
if (
26+
parent &&
2627
(options.includeModules || file.indexOf('node_modules') < 0) &&
2728
!natives[file] &&
2829
file !== main

0 commit comments

Comments
 (0)