Skip to content

Commit

Permalink
fix(runtime): pass path instead of fileURL to isFilePathESM (#15908)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red authored Feb 14, 2024
1 parent 7440191 commit 7b15607
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/ssr/fetchModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export async function fetchModule(
throw err
}
const file = pathToFileURL(resolved.id).toString()
const type = isFilePathESM(file, server.config.packageCache)
const type = isFilePathESM(resolved.id, server.config.packageCache)
? 'module'
: 'commonjs'
return { externalize: file, type }
Expand Down

0 comments on commit 7b15607

Please sign in to comment.