diff --git a/lib/findJsModulesFor.js b/lib/findJsModulesFor.js
index <HASH>..<HASH> 100644
--- a/lib/findJsModulesFor.js
+++ b/lib/findJsModulesFor.js
@@ -169,11 +169,11 @@ function findJsModulesFor(config, pathToCurrentFile, variableName) {
 
   let matchedModules = [];
 
+  matchedModules.push(...findEnvironmentCoreModules(config, variableName));
+  matchedModules.push(...findImportsFromPackageJson(config, variableName));
   matchedModules.push(
     ...findImportsFromLocalFiles(config, variableName, pathToCurrentFile)
   );
-  matchedModules.push(...findEnvironmentCoreModules(config, variableName));
-  matchedModules.push(...findImportsFromPackageJson(config, variableName));
 
   // If you have overlapping lookup paths, you might end up seeing the same
   // module to import twice. In order to dedupe these, we remove the module
Find imports from local files last

This order now matches the order that imports will be grouped in, which
I think gives some nice symmetry. Since this list is sorted next anyway,
the order that we do this in shouldn't make any difference to the user.