Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix: Change import method in config

Richie McIlroyaf4cf72986dc
diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs
index e960c1c76..6e0e19fd5 100644
--- a/apps/web/next.config.mjs
+++ b/apps/web/next.config.mjs
@@ -1,5 +1,6 @@
import million from "million/compiler";
-import { join } from 'path';
+import { join, dirname } from 'path';
+import { fileURLToPath } from 'url';
/** @type {import('next').NextConfig} */
@@ -14,6 +15,9 @@ if (process.env.DB_PLANETSCALE_HOST !== undefined) {
import fs from "fs";
import path from "path";
+const __filename = fileURLToPath(import.meta.url);
+const __dirname = dirname(__filename);
+
const packageJson = JSON.parse(
fs.readFileSync(path.resolve("./package.json"), "utf8")
);