mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Don't run static analysis on app code
The static analysis is used to determine what "var"s need to be automatically inserted by the linker at the package level. But for app code, we never actually insert these vars, since apps run in "global namespace" mode. So it's a waste of time to run the static analysis at all.
This commit is contained in:
@@ -72,6 +72,14 @@ _.extend(Module.prototype, {
|
||||
return self.declaredExports;
|
||||
}
|
||||
|
||||
// The assigned variables in the app aren't actually used for anything:
|
||||
// we're using the global namespace, so there's no header where we declare
|
||||
// all of the assigned variables as vars. So there's no use wasting time
|
||||
// running static analysis on app code.
|
||||
if (self.useGlobalNamespace) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// Find all global references in any files
|
||||
var assignedVariables = [];
|
||||
_.each(self.files, function (file) {
|
||||
|
||||
Reference in New Issue
Block a user