diff options
Diffstat (limited to 'src/node_file.cc')
-rw-r--r-- | src/node_file.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/node_file.cc b/src/node_file.cc index 564c63bad7..e11aa90546 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -872,7 +872,9 @@ static void InternalModuleReadJSON(const FunctionCallbackInfo<Value>& args) { } const size_t size = offset - start; - if (size == 0 || size == SearchString(&chars[start], size, "\"main\"")) { + if (size == 0 || ( + size == SearchString(&chars[start], size, "\"main\"") && + size == SearchString(&chars[start], size, "\"exports\""))) { return; } else { Local<String> chars_string = |