Fix esmodule not having __dirname defined in scope
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import sqlite3 from "sqlite3";
|
||||
import { fileURLToPath } from "url";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
class SqliteDatabase {
|
||||
constructor(host) {
|
||||
|
||||
Reference in New Issue
Block a user