Open
Description
Environment
windows
mlly 1.7.3
Reproduction
danielroe/windows-reproductions#1
Describe the bug
When called with an absolute path on Windows, resolvePathSync
fails.
Sample code:
import { dirname, resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import { resolvePathSync } from 'mlly'
resolvePathSync(
resolve(fileURLToPath(import.meta.url), '../plugins/router'))
{ extensions: ['.ts', '.js'] }
)
Additional context
originally encountered in nuxt/nuxt#30540
Logs
No response