Skip to content

Commit e4b6e7f

Browse files
committed
remove optimization for now. Bring back with tests.
1 parent f5908b9 commit e4b6e7f

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

lib/stub-generator.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,16 @@ StubGenerator.prototype.build = function() {
7979
var needsImportsReWritten = false;
8080

8181
Object.keys(imports).forEach(function(name) {
82-
needsImportsReWritten = true;
8382
imports[name].version = versionForModuleName(name, this.basedir);
8483
}, this);
8584

86-
if (needsImportsReWritten) {
87-
fs.writeFileSync(fullOutputPath, rewriteImports(content, imports));
88-
} else {
89-
fs.writeFileSync(fullOutputPath, content);
90-
}
85+
fs.writeFileSync(fullOutputPath, rewriteImports(content, imports));
86+
}
9187

92-
this.stubs.set(fullInputPath, imports);
88+
this.stubs.set(fullInputPath, imports);
9389

94-
break;
95-
}
90+
break;
91+
}
9692
}, this);
9793

9894
debug('patched applied in: %dms', Date.now() - applyPatch);

0 commit comments

Comments
 (0)