File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { globby } from 'globby'
3
3
import { lilconfig } from 'lilconfig'
4
4
import { createRequire } from 'node:module'
5
5
import { dirname , isAbsolute , join , relative } from 'node:path'
6
- import { fileURLToPath } from 'node:url'
6
+ import { fileURLToPath , pathToFileURL } from 'node:url'
7
7
8
8
import { SizeLimitError } from './size-limit-error.js'
9
9
@@ -83,7 +83,8 @@ function toName(files, cwd) {
83
83
return files . map ( i => ( i . startsWith ( cwd ) ? relative ( cwd , i ) : i ) ) . join ( ', ' )
84
84
}
85
85
86
- const dynamicImport = async filePath => ( await import ( filePath ) ) . default
86
+ const dynamicImport = async filePath =>
87
+ ( await import ( pathToFileURL ( filePath ) . href ) ) . default
87
88
88
89
const tsLoader = async filePath => {
89
90
let jiti = ( await import ( 'jiti' ) ) . default ( fileURLToPath ( import . meta. url ) , {
You can’t perform that action at this time.
0 commit comments