Skip to content

Commit 755186f

Browse files
committed
DRY
1 parent 0a30042 commit 755186f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/utils.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ export const isAsyncFunction = function (fn) {
4747
* @returns {Promise<any>} The imported module.
4848
*/
4949
export const importModule = async function (modulePath, options) {
50-
if (isWindows() && typeof modulePath === 'string' && path.isAbsolute(modulePath)) {
51-
return await import(pathToFileURL(modulePath).href)
50+
if (typeof modulePath === 'string' && path.isAbsolute(modulePath)) {
51+
return import(pathToFileURL(modulePath).href, options)
5252
}
53-
return await import(modulePath)
53+
return import(modulePath, options)
5454
}
5555

5656
export const fileExists = function (filePath) {

0 commit comments

Comments
 (0)