Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove janky memoization in dependenciesFromRequire

  • Loading branch information...
commit f366ee73519651950e532f6c791c83d68b8273bb 1 parent fe8c9cc
@shinypb shinypb authored
Showing with 4 additions and 10 deletions.
  1. +4 −10 lib/loadbuilder/asset.js
View
14 lib/loadbuilder/asset.js
@@ -162,17 +162,11 @@ util.extend(Module.prototype, {
return this._deps;
},
dependenciesFromRequire: function() {
- var requires;
+ var requires = analyzer.analyze(REQUIRE, this.fromFile());
- if (!dependencyCache[this.id]) {
- requires = analyzer.analyze(REQUIRE, this.fromFile());
-
- dependencyCache[this.id] = requires.map(function(r) {
- return this.builder.matchAsset(r.values[0]);
- }, this);
- }
-
- return dependencyCache[this.id];
+ return requires.map(function(r) {
+ return this.builder.matchAsset(r.values[0]);
+ }, this);
},
addId: function() {
var tree = uglify.parser.parse(this.fromFile()),
Please sign in to comment.
Something went wrong with that request. Please try again.