Skip to content

Commit a70c006

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

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

lib/stub-generator.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,15 @@ 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-
}
91-
85+
fs.writeFileSync(fullOutputPath, rewriteImports(content, imports));
9286
this.stubs.set(fullInputPath, imports);
9387

9488
break;
9589
}
90+
9691
}, this);
9792

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

0 commit comments

Comments
 (0)