Skip to content

Commit 93ada63

Browse files
Fix HMR on windows (#487)
1 parent 451d128 commit 93ada63

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/module.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { relative, resolve } from 'node:path'
1+
import { relative, resolve, normalize } from 'node:path'
22
import { existsSync, statSync } from 'node:fs'
33
import { defu } from 'defu'
44
import { upperFirst } from 'scule'
@@ -174,7 +174,9 @@ export default defineNuxtModule<GqlConfig>({
174174
async function generateGqlTypes(hmrDoc?: string) {
175175
const documents: string[] = []
176176
for await (const path of documentPaths) {
177-
const files = (await resolveFiles(path, [gqlMatch, '!**/schemas'], { followSymbolicLinks: false })).filter(allowDocument)
177+
const files = (await resolveFiles(path, [gqlMatch, '!**/schemas'], { followSymbolicLinks: false }))
178+
.filter(allowDocument)
179+
.map(file => normalize(file))
178180

179181
documents.push(...files)
180182
}

0 commit comments

Comments
 (0)