mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(vite): close vite watcher before building (#5875)
This commit is contained in:
parent
0ef08190ae
commit
3ad12b5f4a
@ -101,6 +101,15 @@ export async function bundle (nuxt: Nuxt) {
|
|||||||
if (!nuxt.options.dev) {
|
if (!nuxt.options.dev) {
|
||||||
ctx.config.server.hmr = false
|
ctx.config.server.hmr = false
|
||||||
ctx.config.server.watch = undefined
|
ctx.config.server.watch = undefined
|
||||||
|
|
||||||
|
// TODO: Workaround for vite watching tsconfig changes
|
||||||
|
// https://github.com/nuxt/framework/pull/5875
|
||||||
|
ctx.config.plugins.push({
|
||||||
|
name: 'nuxt:close-vite-watcher',
|
||||||
|
configureServer (server) {
|
||||||
|
return server?.watcher?.close()
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
await nuxt.callHook('vite:extend', ctx)
|
await nuxt.callHook('vite:extend', ctx)
|
||||||
|
Loading…
Reference in New Issue
Block a user