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 {
186
186
}
187
187
188
188
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 ( ( ) => {
192
192
this . debouncedFullReload ( )
193
193
} )
194
194
debug ?.( `TRIGGER: access to stale bundle, triggered bundle re-generation` )
195
195
}
196
- return ! ! scheduled
196
+ return ! hasLatestBuildOutput
197
197
}
198
198
199
199
override async close ( ) : Promise < void > {
You can’t perform that action at this time.
0 commit comments