File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
packages/vite/src/node/server/environments Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -116,12 +116,19 @@ export class FullBundleDevEnvironment extends DevEnvironment {
116
116
debug ?.( 'INITIAL: run error' )
117
117
} ,
118
118
)
119
- this . devEngine . ensureCurrentBuildFinish ( ) . then ( ( ) => {
119
+ this . waitForInitialBuildFinish ( ) . then ( ( ) => {
120
120
debug ?.( 'INITIAL: build done' )
121
121
this . hot . send ( { type : 'full-reload' , path : '*' } )
122
122
} )
123
123
}
124
124
125
+ private async waitForInitialBuildFinish ( ) : Promise < void > {
126
+ while ( this . memoryFiles . size === 0 ) {
127
+ await this . devEngine . ensureCurrentBuildFinish ( )
128
+ await new Promise ( ( resolve ) => setTimeout ( resolve , 10 ) )
129
+ }
130
+ }
131
+
125
132
override async warmupRequest ( _url : string ) : Promise < void > {
126
133
// no-op
127
134
}
You can’t perform that action at this time.
0 commit comments