mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(vite): normalize paths before comparing (#763)
Co-Authored-By: Anthony Fu <hi@antfu.me>
This commit is contained in:
parent
d41c034af7
commit
3c132a8de0
@ -1,4 +1,4 @@
|
||||
import { resolve } from 'pathe'
|
||||
import { resolve, normalize } from 'pathe'
|
||||
import * as vite from 'vite'
|
||||
import vuePlugin from '@vitejs/plugin-vue'
|
||||
import fse from 'fs-extra'
|
||||
@ -117,6 +117,7 @@ export async function buildServer (ctx: ViteBuildContext) {
|
||||
|
||||
// Watch
|
||||
viteServer.watcher.on('all', (_event, file) => {
|
||||
file = normalize(file) // Fix windows paths
|
||||
if (file.indexOf(ctx.nuxt.options.buildDir) === 0) { return }
|
||||
doBuild()
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user