Fix esmodule not having __dirname defined in scope

This commit is contained in:
2022-08-24 18:37:55 +02:00
parent 4c0dd11c46
commit 3af27af7bb
2 changed files with 9 additions and 1 deletions

View File

@@ -1,7 +1,11 @@
import path from "path";
import Field from "./field";
import { fileURLToPath } from "url";
import Field from "./field.js";
let instance = null;
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
class Config {
constructor() {