File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
packages/vite/src/node/server/environments Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,19 @@ export class FullBundleDevEnvironment extends DevEnvironment {
107
107
}
108
108
} ,
109
109
} )
110
- this . devEngine . run ( ) . catch ( ( ) => { } )
110
+ debug ?.( 'INITIAL: setup dev engine' )
111
+ this . devEngine . run ( ) . then (
112
+ ( ) => {
113
+ debug ?.( 'INITIAL: run done' )
114
+ } ,
115
+ ( ) => {
116
+ debug ?.( 'INITIAL: run error' )
117
+ } ,
118
+ )
119
+ this . devEngine . ensureCurrentBuildFinish ( ) . then ( ( ) => {
120
+ debug ?.( 'INITIAL: build done' )
121
+ this . hot . send ( { type : 'full-reload' , path : '*' } )
122
+ } )
111
123
}
112
124
113
125
override async warmupRequest ( _url : string ) : Promise < void > {
@@ -152,14 +164,14 @@ export class FullBundleDevEnvironment extends DevEnvironment {
152
164
153
165
async triggerBundleRegenerationIfStale ( ) : Promise < boolean > {
154
166
const scheduled = await this . devEngine . scheduleBuildIfStale ( )
155
- if ( scheduled ) {
167
+ if ( scheduled === 'scheduled' ) {
156
168
this . devEngine . ensureCurrentBuildFinish ( ) . then ( ( ) => {
157
169
this . hot . send ( { type : 'full-reload' , path : '*' } )
158
170
this . logger . info ( colors . green ( `page reload` ) , { timestamp : true } )
159
171
} )
160
172
debug ?.( `TRIGGER: access to stale bundle, triggered bundle re-generation` )
161
173
}
162
- return scheduled
174
+ return ! ! scheduled
163
175
}
164
176
165
177
override async close ( ) : Promise < void > {
You can’t perform that action at this time.
0 commit comments