diff --git a/lib/builder.js b/lib/builder.js index e295ea6..2c8d892 100644 --- a/lib/builder.js +++ b/lib/builder.js @@ -495,7 +495,7 @@ Builder.prototype.compile = function(moduleNameOrLoad, outFile, opts) { return moduleNameOrLoad; return self.loader.normalize(moduleNameOrLoad) .then(function(moduleName) { - if (opts.cache !== true) + if (!opts || opts.cache !== true) self.invalidate(moduleName); return self.tracer.getLoadRecord(getCanonicalName(self.loader, moduleName), true); });