This post is from a low-reputation account and contains an unverified outbound link. Be cautious before clicking external links.

ES proposal: import.meta – module metadata

opticons(25)
Published in
#js
Words
99
Reading
1 min
Listen
Play
9y

The proposal “import.meta” by Domenic Denicola is currently at stage 3. This blog post explains how it works.

Module metadata

When it comes to working with a module, you are normally interested in what’s inside it. But occasionally, you need information about the module – its metadata. One example of module metadata for Node.js modules is the global variable __dirname which contains the path of the directory in which the current module is stored.

The proposal introduces the pseudo-property import.meta which holds an object with metadata for the current module. Let’s look at uses cases for module metadata.

http://2ality.com/2017/11/import-meta.html

See here

ES proposal: import.meta – module metadata | Ecency