File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -18,12 +18,17 @@ CachePlugin.prototype.apply = function(compiler) {
1818 } else {
1919 var _this = this ;
2020 compiler . plugin ( "compilation" , function ( compilation ) {
21- if ( compilation . notCacheable ) {
22- compilation . warnings . push ( new Error ( "CachePlugin - Cache cannot be used because of: " + compilation . notCacheable ) )
23- } else {
21+ if ( ! compilation . notCacheable ) {
2422 compilation . cache = _this . cache ;
23+ } else if ( _this . watching ) {
24+ compilation . warnings . push (
25+ new Error ( "CachePlugin - Cache cannot be used because of: " + compilation . notCacheable )
26+ ) ;
2527 }
2628 } ) ;
29+ compiler . plugin ( "watch-run" , function ( ) {
30+ _this . watching = true ;
31+ } ) ;
2732 compiler . plugin ( "run" , function ( compiler , callback ) {
2833 if ( ! compiler . _lastCompilationFileDependencies ) return callback ( ) ;
2934 var fs = compiler . inputFileSystem ;
You can’t perform that action at this time.
0 commit comments