added JSON modules and import attributes

This commit is contained in:
Fabrice Bellard
2025-05-20 18:27:23 +02:00
parent 838124580b
commit f10ef299a6
10 changed files with 424 additions and 100 deletions

2
qjs.c
View File

@@ -465,7 +465,7 @@ int main(int argc, char **argv)
}
/* loader for ES6 modules */
JS_SetModuleLoaderFunc(rt, NULL, js_module_loader, NULL);
JS_SetModuleLoaderFunc2(rt, NULL, js_module_loader, js_module_check_attributes, NULL);
if (dump_unhandled_promise_rejection) {
JS_SetHostPromiseRejectionTracker(rt, js_std_promise_rejection_tracker,