Do not calculate rebuild dirs in "meteor run"

It is never used in the bundles created by "meteor run", and adds 0.5 - 1.5 seconds per build for smaller apps.
This commit is contained in:
zodern
2018-12-31 21:46:52 -06:00
parent e14ce5b908
commit 99f969b930

View File

@@ -2420,7 +2420,9 @@ class JsImage {
_.each(nodeModulesDirectories, function (nmd) {
assert.strictEqual(typeof nmd.preferredBundlePath, "string");
if (! nmd.isPortable()) {
// Skip calculating isPortable in 'meteor run' since the
// modules are never rebuilt
if (includeNodeModules !== 'symlink' && !nmd.isPortable()) {
const parentDir = files.pathDirname(nmd.preferredBundlePath);
rebuildDirs[parentDir] = parentDir;
}