Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

es module __dirname alternative

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

const __dirname = dirname(fileURLToPath(import.meta.url));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #es #module #alternative
ADD COMMENT
Topic
Name
1+9 =