Skip to content

Commit 1347207

Browse files
authored
fix: adopt forward-compatible approach to builder:watch (#207)
1 parent bf15c89 commit 1347207

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/utils/loader.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { relative, resolve } from 'node:path'
12
import type { Nuxt } from '@nuxt/schema'
23
import defu from 'defu'
34
import { debounce } from 'perfect-debounce'
@@ -105,6 +106,7 @@ export function registerWatcher(options: VuetifyModuleOptions, nuxt: Nuxt, ctx:
105106
let pageReload: (() => Promise<void>) | undefined
106107

107108
nuxt.hooks.hook('builder:watch', (_event, path) => {
109+
path = relative(nuxt.options.srcDir, resolve(nuxt.options.srcDir, path))
108110
if (!pageReload && ctx.vuetifyFilesToWatch.includes(path))
109111
return nuxt.callHook('restart')
110112
})

0 commit comments

Comments
 (0)