9a28e467ba
Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
10 lines
233 B
TypeScript
10 lines
233 B
TypeScript
import path from 'path'
|
|
import { fileURLToPath } from 'url'
|
|
|
|
export const getDirname = (importMetaUrl: string) => {
|
|
const __filename = fileURLToPath(importMetaUrl)
|
|
const __dirname = path.dirname(__filename)
|
|
|
|
return __dirname
|
|
}
|