Skip to content

Commit

Permalink
!module: detect ESM syntax by trying to recompile as SourceTextModule
Browse files Browse the repository at this point in the history
Co-authored-by: Geoffrey Booth <webadmin@geoffreybooth.com>
  • Loading branch information
joyeecheung and GeoffreyBooth authored Apr 12, 2024
1 parent dc9f175 commit 1b571e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_contextify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1583,7 +1583,7 @@ static void ContainsModuleSyntax(const FunctionCallbackInfo<Value>& args) {
CHECK(args[1]->IsString());
Local<String> filename = args[1].As<String>();

// Argument 2: resource name (URL for module).
// Argument 2: resource name (URL for ES module).
Local<String> resource_name = filename;
if (args[2]->IsString()) {
resource_name = args[2].As<String>();
Expand Down

0 comments on commit 1b571e1

Please sign in to comment.