From 52ffc48cded88052a2c45ff1eac03c3bfdf2cc2d Mon Sep 17 00:00:00 2001 From: leejooy96 Date: Tue, 9 Jan 2024 10:02:17 +0900 Subject: [PATCH] main: `dirname` for esm supported --- src/main/utils/Constants.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/utils/Constants.ts b/src/main/utils/Constants.ts index 683e231..d385093 100644 --- a/src/main/utils/Constants.ts +++ b/src/main/utils/Constants.ts @@ -1,5 +1,8 @@ -import { join } from 'path' +import { join, dirname } from 'path' import { name, version } from '../../../package.json' +import { fileURLToPath } from 'url' + +const __dirname = dirname(fileURLToPath(import.meta.url)) export default class Constants { // Display app name (uppercase first letter)