Skip to content

Commit

Permalink
fix: Convert paths to fix ERR_UNSUPPORTED_ESM_URL_SCHEME errors on Wi…
Browse files Browse the repository at this point in the history
…ndows (#238)
  • Loading branch information
michael42 committed May 31, 2022
1 parent e72f6d0 commit 4acf85e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
@@ -1,6 +1,7 @@
'use strict'

const resolve = require('path').resolve
const url = require('url')

const config = require('lilconfig')
const yaml = require('yaml')
Expand Down Expand Up @@ -67,7 +68,7 @@ const createContext = (ctx) => {
}

const importDefault = async filepath => {
const module = await import(filepath)
const module = await import(url.pathToFileURL(filepath).href)
return module.default
}

Expand Down

0 comments on commit 4acf85e

Please sign in to comment.