File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,9 @@ class NormalModule extends Module {
9191 // TODO refactor this -> options object filled from Factory
9292 this . useSourceMap = false ;
9393 this . lineToLine = false ;
94+
95+ // Cache
96+ this . _lastSuccessfulBuildMeta = { } ;
9497 }
9598
9699 identifier ( ) {
@@ -228,6 +231,9 @@ class NormalModule extends Module {
228231 }
229232
230233 markModuleAsErrored ( error ) {
234+ // Restore build meta from successfull build to keep importing state
235+ this . buildMeta = Object . assign ( { } , this . _lastSuccessfulBuildMeta ) ;
236+
231237 this . error = error ;
232238 this . errors . push ( this . error ) ;
233239 this . _source = new RawSource ( "throw new Error(" + JSON . stringify ( this . error . message ) + ");" ) ;
@@ -323,6 +329,8 @@ class NormalModule extends Module {
323329 this . markModuleAsErrored ( error ) ;
324330 return callback ( ) ;
325331 }
332+
333+ this . _lastSuccessfulBuildMeta = this . buildMeta ;
326334 return callback ( ) ;
327335 } ) ;
328336 }
You can’t perform that action at this time.
0 commit comments