sebastienros / jint

Javascript Interpreter for .NET
BSD 2-Clause "Simplified" License
4.04k stars 558 forks source link

Fix dynamic importing of JSON modules #1837

Closed adams85 closed 5 months ago

adams85 commented 5 months ago

While doing the parser migration, I spotted a bug: dynamically importing JSON modules (e.g. await import("package.json", { with: { type: "json" } })) results in an error ("default is not defined").

This PR attempts to fix the issue.