diff --git a/lib/server_functions.js b/lib/server_functions.js index 38b4ece..e93cd9d 100644 --- a/lib/server_functions.js +++ b/lib/server_functions.js @@ -1584,7 +1584,7 @@ module.exports = function serverFunctions(Blast, extras) { * * @author Jelle De Loecker * @since 0.9.0 - * @version 0.9.0 + * @version 0.9.3 */ Blast.requireFileViaVm = function requireFileViaVm(path, options) { @@ -1609,6 +1609,7 @@ module.exports = function serverFunctions(Blast, extras) { let exported_function = libvm.runInThisContext(head + source + '\n/**/})', { filename: path, lineOffset: -1, + importModuleDynamically: libvm.constants?.USE_MAIN_CONTEXT_DEFAULT_LOADER }); let args = [ diff --git a/package.json b/package.json index 4a121fc..a07f528 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,6 @@ "mm" : "~3.2.1" }, "engines": { - "node" : ">=14.0.0" + "node" : ">=20.13.0" } } \ No newline at end of file