This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const path = require('path'); | |
const extensions = ['.mjs', '.cjs', '.js']; | |
async function loadConfig(name) { | |
// check if node version supports dynamic imports | |
const supportsEsm = await (async () => { | |
try { | |
await import(__filename); |