mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 13:47:15 +01:00
Replaced __dirname usage.
This commit is contained in:
parent
b5efbbbb2e
commit
73b45a9f5e
11 changed files with 25 additions and 28 deletions
|
|
@ -2,14 +2,11 @@
|
|||
import 'dotenv/config';
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import url from "node:url";
|
||||
|
||||
const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
|
||||
|
||||
const endPoint = process.env.COLLECT_API_ENDPOINT;
|
||||
|
||||
if (endPoint) {
|
||||
const file = path.resolve(__dirname, '../public/script.js');
|
||||
const file = path.resolve(process.cwd(), 'public/script.js');
|
||||
|
||||
const tracker = fs.readFileSync(file);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue