diff --git a/doc/api/esm.md b/doc/api/esm.md index 4d257c37bf01ff..29435c96b5c8b4 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -384,6 +384,22 @@ import { readFileSync } from 'node:fs'; const buffer = readFileSync(new URL('./data.proto', import.meta.url)); ``` +### `import.meta.require(filename)` + + + +> Stability: 1.1 - Active development + +* `filename` {string|URL} Filename to be used to construct the require + function. Must be a file URL object, file URL string, or absolute path + string. +* Returns: {any} The module exports. + +Alias for [`module.createRequire(import.meta.url)(specifier)`][]. + ### `import.meta.resolve(specifier)`