You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Setting any watch option causes vite to build in watch mode #20657
We need to set the allowInputInsideOutputPath watch option for rollup.
But as soon as we set anything under watch of the vite config, vite will not build but run in watch mode.
Meaning even npx vite build runs in watch mode (note the missing --watch).
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
This is the expected behaviour as described in the docs. If build.watch is non-null the build will run in watch mode. I think you can detect and conditionally apply the option instead with process.argv or a plugin.
Activity
bluwy commentedon Aug 20, 2025
This is the expected behaviour as described in the docs. If
build.watchis non-null the build will run in watch mode. I think you can detect and conditionally apply the option instead withprocess.argvor a plugin.susnux commentedon Aug 24, 2025
Thank you in that case it seems here is a but in vite: #20673