On Tue, Jul 27, 2021 at 7:22 AM 'Cisco Ortega' via v8-dev <[email protected]> wrote: > The only source for using modules seems to be this Stack Overflow post here: > https://stackoverflow.com/questions/52023157/how-would-one-enable-and-use-es6-modules-in-the-v8-javascript-engine > > However it is still unclear to me how to actually resolve the import requests > in code. If anyone could help me with that, it would be greatly appreciated.
When you instantiate the module graph, you pass a callback whose job is to resolve the module specifiers of imports. See the d8 implementation as an example: https://source.chromium.org/chromium/chromium/src/+/main:v8/src/d8/d8.cc;l=1288;drc=80def040657db16e79f59e7e3b27857014c0f58d;bpv=1;bpt=1 Best, Georg -- Georg Neis Software Engineer Google Germany GmbH Erika-Mann-Straße 33 80636 München Geschäftsführer: Paul Manicle, Halimah DeLaine Prado Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde. This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person. -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/CABT__oFghWoCa00JgMQ%2BGscPeO%2B-GQF9dUZU0HGrdEQD0QbkuA%40mail.gmail.com.
