This commit is contained in:
2026-06-22 18:53:46 +03:00
parent 67695e8d47
commit 60277dfbd7
2 changed files with 3 additions and 5 deletions
@@ -22,10 +22,8 @@ async function createAdmin() {
dashboard: { component: Components.Dashboard },
});
if (process.env.NODE_ENV === "development")
await admin.watch();
else
await admin.initialize();
if (process.env.NODE_ENV === "development") await admin.watch();
else await admin.initialize();
const router = AdminJSExpress.buildAuthenticatedRouter(
admin,
@@ -2,7 +2,7 @@ import { ComponentLoader } from "adminjs";
import path from "path";
import * as url from "url";
const __dirname = url.fileURLToPath(new URL('.', import.meta.url));
const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
export const componentLoader = new ComponentLoader();
const add = (filePath: string, componentName: string): string =>