Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

__filename not defined in mjs files


import { fileURLToPath } from 'url';
import { dirname } from 'path';

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

Source by nullorempty.org #
 
PREVIOUS NEXT
Tagged: #defined #mjs #files
ADD COMMENT
Topic
Name
7+3 =