Work around missing __dirname in modules

This commit is contained in:
James Brunton 2025-09-03 14:04:01 +01:00
parent 76c4f58b9d
commit ab82090602
2 changed files with 10 additions and 2 deletions

View File

@ -2,7 +2,11 @@
import { icons } from '@iconify-json/material-symbols'; import { icons } from '@iconify-json/material-symbols';
import fs from 'fs'; import fs from 'fs';
import path from 'path'; import { fileURLToPath } from 'url';
import path, { dirname } from 'path';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
// Check for verbose flag // Check for verbose flag
const isVerbose = process.argv.includes('--verbose') || process.argv.includes('-v'); const isVerbose = process.argv.includes('--verbose') || process.argv.includes('-v');

View File

@ -2,7 +2,11 @@
import { execSync } from 'child_process'; import { execSync } from 'child_process';
import fs from 'fs'; import fs from 'fs';
import path from 'path'; import { fileURLToPath } from 'url';
import path, { dirname } from 'path';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
/** /**
* Generate 3rd party licenses for frontend dependencies * Generate 3rd party licenses for frontend dependencies