Load .fxrc.js via file: prefix

This commit is contained in:
Anton Medvedev 2023-09-19 13:32:41 +02:00
parent f9cd047294
commit b3b5e6255f

View File

@ -577,8 +577,9 @@ function stringify(value, isPretty = false) {
async function importFxrc(path) {
const {join} = await import('node:path')
const {pathToFileURL} = await import('node:url')
try {
await import(join(path, '.fxrc.js'))
await import(pathToFileURL(join(path, '.fxrc.js')))
} catch (err) {
if (err.code !== 'ERR_MODULE_NOT_FOUND') throw err
}