interface ImportMeta
Properties Jump to heading
Jump to headingdirname: stringThe directory name of the current module. This is the same as the path.dirname() of the import.meta.filename.
Caveat: only present on file: modules.
Jump to headingfilename: stringThe full absolute path and filename of the current module, with symlinks resolved.
This is the same as the url.fileURLToPath() of the import.meta.url.
Caveat: only local modules support this property. Modules not using the file: protocol will not provide it.
Jump to headingurl: stringThe absolute file: URL of the module.
Methods Jump to heading
Jump to headingresolve(specifier: string,parent?: ,): stringProvides a module-relative resolution function scoped to each module, returning the URL string.
Second parent parameter is only used when the --experimental-import-meta-resolve
command flag enabled.