File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,11 @@ CachePlugin.prototype.apply = function(compiler) {
1818 } else {
1919 var _this = this ;
2020 compiler . plugin ( "compilation" , function ( compilation ) {
21- compilation . cache = _this . cache ;
21+ if ( compilation . notCacheable ) {
22+ compilation . warnings . push ( new Error ( "CachePlugin - Cache cannot be used because of: " + compilation . notCacheable ) )
23+ } else {
24+ compilation . cache = _this . cache ;
25+ }
2226 } ) ;
2327 compiler . plugin ( "run" , function ( compiler , callback ) {
2428 if ( ! compiler . _lastCompilationFileDependencies ) return callback ( ) ;
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ module.exports = DedupePlugin;
1010
1111DedupePlugin . prototype . apply = function ( compiler ) {
1212 compiler . plugin ( "compilation" , function ( compilation ) {
13+ compilation . notCacheable = "DedupePlugin" ;
1314
1415 compilation . dependencyTemplates . set ( TemplateArgumentDependency , new TemplateArgumentDependency . Template ( ) ) ;
1516
You can’t perform that action at this time.
0 commit comments