mirror of https://github.com/webpack/webpack.git
DedupePlugin cannot be cached
This commit is contained in:
parent
3939bc40e5
commit
b93aacbecf
|
@ -18,7 +18,11 @@ CachePlugin.prototype.apply = function(compiler) {
|
||||||
} else {
|
} else {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
compiler.plugin("compilation", function(compilation) {
|
compiler.plugin("compilation", function(compilation) {
|
||||||
compilation.cache = _this.cache;
|
if(compilation.notCacheable) {
|
||||||
|
compilation.warnings.push(new Error("CachePlugin - Cache cannot be used because of: " + compilation.notCacheable))
|
||||||
|
} else {
|
||||||
|
compilation.cache = _this.cache;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
compiler.plugin("run", function(compiler, callback) {
|
compiler.plugin("run", function(compiler, callback) {
|
||||||
if(!compiler._lastCompilationFileDependencies) return callback();
|
if(!compiler._lastCompilationFileDependencies) return callback();
|
||||||
|
|
|
@ -10,6 +10,7 @@ module.exports = DedupePlugin;
|
||||||
|
|
||||||
DedupePlugin.prototype.apply = function(compiler) {
|
DedupePlugin.prototype.apply = function(compiler) {
|
||||||
compiler.plugin("compilation", function(compilation) {
|
compiler.plugin("compilation", function(compilation) {
|
||||||
|
compilation.notCacheable = "DedupePlugin";
|
||||||
|
|
||||||
compilation.dependencyTemplates.set(TemplateArgumentDependency, new TemplateArgumentDependency.Template());
|
compilation.dependencyTemplates.set(TemplateArgumentDependency, new TemplateArgumentDependency.Template());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue