Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix(vite): unset build.watch options for production build
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jul 17, 2022
1 parent 8b6bb92 commit 4e5a592
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 0 additions & 3 deletions packages/vite/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ export async function buildServer (ctx: ViteBuildContext) {
rollupWarn(warning)
}
}
},
watch: {
exclude: ctx.nuxt.options.ignore
}
},
server: {
Expand Down
4 changes: 4 additions & 0 deletions packages/vite/src/vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ export async function bundle (nuxt: Nuxt) {
rollupOptions: {
output: { sanitizeFileName: sanitizeFilePath },
input: resolve(nuxt.options.appDir, 'entry')
},
watch: {
exclude: nuxt.options.ignore
}
},
plugins: [
Expand Down Expand Up @@ -101,6 +104,7 @@ export async function bundle (nuxt: Nuxt) {
if (!nuxt.options.dev) {
ctx.config.server.hmr = false
ctx.config.server.watch = undefined
ctx.config.build.watch = undefined
}

await nuxt.callHook('vite:extend', ctx)
Expand Down

0 comments on commit 4e5a592

Please sign in to comment.