Texonom
Texonom
/
Application
Application
/Linguistics/Linguistics Object/Language/Formal Language/Document Language/Markup Language/HTML/HTML Tag/HTML Head Tag/<script/>/<script> type/<script> module type/
import.meta
Search

import.meta

// index.mjs import './index2.mjs?someURLInfo=5'; // index2.mjs new URL(import.meta.url).searchParams.get('someURLInfo'); // 5
developer.mozilla.org
The import.meta object exposes context-specific metadata to a JavaScript module. It contains information about the module, like the module's URL. The syntax consists of the keyword , a dot, and the identifier meta. Normally the left-hand side of the dot is the object on which property access is performed, but here import is not really an object.
developer.mozilla.org
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import.meta
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import.meta

Recommendations

Texonom
Texonom
/
Application
Application
/Linguistics/Linguistics Object/Language/Formal Language/Document Language/Markup Language/HTML/HTML Tag/HTML Head Tag/<script/>/<script> type/<script> module type/
import.meta
Copyright Seonglae Cho