diff --git a/src/index.ts b/src/index.ts index 1917d0af1..aad26dd33 100644 --- a/src/index.ts +++ b/src/index.ts @@ -118,12 +118,13 @@ const normalizeOptions = async ( } if (Array.isArray(entry)) { - const matcher = picomatch(entry) - options.entry = await new fdir() + const matcher = picomatch(entry, { windows: true }) + const entries = await new fdir() .withRelativePaths() .filter((file) => matcher(file)) .crawl(process.cwd()) .withPromise() + options.entry = entries.map((f) => f.replaceAll(/\\/g, '/')) // Ensure entry exists if (!options.entry || options.entry.length === 0) { throw new PrettyError(`Cannot find ${entry}`)