[quickjs-devel] Re: import.meta

  • From: Fabrice Bellard <fabrice@xxxxxxxxxxx>
  • To: quickjs-devel@xxxxxxxxxxxxx
  • Date: Wed, 21 Aug 2019 20:44:06 +0200

The next release will contain the API to modify import.meta from the
module loader.

Best regards,

Fabrice.

On 8/21/19 11:22 AM, Saúl Ibarra Corretgé wrote:


On 21/08/2019 10:11, Fabrice Bellard wrote:
There is no standard yet for the content of import.meta hence it is
empty. I agree that "url" could be a good candidate.

Best regards,

Fabrice.

True that. Since the content is not defined yet, how about adding a way
to customize it? Then the module loader could put stuff in there for
example.

I'll try to come up with a patch.


Cheers,


On 8/19/19 10:48 PM, Saúl Ibarra Corretgé wrote:
Hi there,

Thanks a lot for the last release, love the cadence of updates :-)

I noticed the changelog mentions import.meta was added, but I can't seem
to find what it contains in the code. When I print it all I see is an
empty object.

Am I missing something or this is just the start? Are there plans to
include the "url" aka full path of the module file?

Context: I'm in need of some equivalent to __filename (in Node lingo)
and import.meta seems to be that.


Cheers,






Other related posts: