6 lines
191 B
TypeScript
6 lines
191 B
TypeScript
import { fileURLToPath } from "url";
|
|
|
|
/**
|
|
* Pass in `import.meta` to get the __dirname.
|
|
*/
|
|
export const getDirname = (importMeta: ImportMeta) => fileURLToPath(new URL('.', importMeta.url)); |