IMPORTMETA.md

December 19, 2018 ยท View on GitHub

import.meta properties

The TC39 import.meta

url

From the HTML specification,

the module script's base URL, serialized At a high level, roughly, this means: the directory where the running module came from.

Environment support:

  • Shipping on the Web
  • Shipping in Node.js (Still experimental, modules are being re-considered by the Modules Team)

resolveURL

Status: Proposed for the web

require

Status: Proposed for Node.js (TODO: link?)

Contents

  1. 1import.meta properties
  2. 1.1url
  3. 1.2resolveURL
  4. 1.3require