File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/vite/src/node/server/environments Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -186,14 +186,14 @@ export class FullBundleDevEnvironment extends DevEnvironment {
186186 }
187187
188188 async triggerBundleRegenerationIfStale ( ) : Promise < boolean > {
189- const scheduled = await this . devEngine . scheduleBuildIfStale ( )
190- if ( scheduled === 'scheduled' ) {
191- this . devEngine . ensureCurrentBuildFinish ( ) . then ( ( ) => {
189+ const hasLatestBuildOutput = await this . devEngine . hasLatestBuildOutput ( )
190+ if ( ! hasLatestBuildOutput ) {
191+ this . devEngine . ensureLatestBuildOutput ( ) . then ( ( ) => {
192192 this . debouncedFullReload ( )
193193 } )
194194 debug ?.( `TRIGGER: access to stale bundle, triggered bundle re-generation` )
195195 }
196- return ! ! scheduled
196+ return ! hasLatestBuildOutput
197197 }
198198
199199 override async close ( ) : Promise < void > {
You can’t perform that action at this time.
0 commit comments