fix __dirname being undefined (#19955)

This commit is contained in:
Nitwel
2023-10-09 12:54:15 +02:00
committed by GitHub
parent d4e1668b2b
commit fe833626d4

View File

@@ -5,6 +5,10 @@ import path from 'path';
import env from '../env.js';
import logger from '../logger.js';
import { Url } from '../utils/url.js';
import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
const __dirname = dirname(fileURLToPath(import.meta.url));
export const getSharedDepsMapping = async (deps: string[]): Promise<Record<string, string>> => {
const appDir = await readdir(path.join(resolvePackage('@directus/app', __dirname), 'dist', 'assets'));