Skip to content

Commit

Permalink
fix(router-generator): fix virtual file routes on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
nekochan0122 committed Nov 1, 2024
1 parent ab3f744 commit 0cc307c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { pathToFileURL } from 'node:url'
import { tsImport } from 'tsx/esm/api'

export async function loadConfigFile(filePath: string) {
const loaded = await tsImport(filePath, './')
const fileURL = pathToFileURL(filePath).href
const loaded = await tsImport(fileURL, './')
return loaded
}

0 comments on commit 0cc307c

Please sign in to comment.