From 2a3fcf2e7bd1f43e2228684e07e8c1917807d6ef Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 10 Feb 2016 17:07:12 -0500 Subject: [PATCH] Remove optimization that classified all .json files as lazy. Fixes #6014. Fixes #6174. --- tools/isobuild/compiler-plugin.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tools/isobuild/compiler-plugin.js b/tools/isobuild/compiler-plugin.js index 415a1facf1..d39e783d87 100644 --- a/tools/isobuild/compiler-plugin.js +++ b/tools/isobuild/compiler-plugin.js @@ -379,20 +379,12 @@ class ResourceSlot { return lazy; } - const sourcePath = this.inputResource.path; - - if (sourcePath.endsWith(".json")) { - // JSON files have no side effects, so there is no reason for them - // ever to be evaluated eagerly. - return true; - } - // If file.lazy was not previously defined, mark the file lazy if it // is contained by an imports directory. Note that any files contained // by a node_modules directory will already have been marked lazy in // PackageSource#_inferFileOptions. return this.packageSourceBatch.useMeteorInstall && - files.pathDirname(sourcePath) + files.pathDirname(this.inputResource.path) .split(files.pathSep) .indexOf("imports") >= 0; }