From 5b0b5e4169ea99d7da11450749d94cab3da57301 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Fri, 8 Jul 2016 13:13:28 -0700 Subject: [PATCH] Tweak ModuleLoader handling of index files, fix #3783 --- app/core/ModuleLoader.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/core/ModuleLoader.coffee b/app/core/ModuleLoader.coffee index 0771ab657..495cd5dd4 100644 --- a/app/core/ModuleLoader.coffee +++ b/app/core/ModuleLoader.coffee @@ -60,6 +60,11 @@ module.exports = ModuleLoader = class ModuleLoader extends CocoClass # load dependencies if it's not a vendor library if not _.string.startsWith(e.item.id, 'vendor') have = window.require.list() + haveWithIndexRemoved = _(have) + .filter (file) -> _.string.endsWith(file, 'index') + .map (file) -> file.slice(0,-6) + .value() + have = have.concat(haveWithIndexRemoved) console.group('Dependencies', e.item.id) if LOG @recentLoadedBytes += e.rawResult.length dependencies = @parseDependencies(e.rawResult)