What does the ‘import.meta’ object provide in ES modules?

JavaScript Professional Hard

JavaScript Professional — Hard

What does the ‘import.meta’ object provide in ES modules?

Key points

  • 'import.meta' contains host-specific metadata
  • Includes properties like import.meta.url
  • Shape of 'import.meta' is not defined by the ECMAScript spec
  • Host environment determines the metadata

Ready to go further?

Related questions