diff --git a/lib/parse/amd.js b/lib/parse/amd.js
index <HASH>..<HASH> 100644
--- a/lib/parse/amd.js
+++ b/lib/parse/amd.js
@@ -107,13 +107,10 @@ AMD.prototype.addOptimizedModules = function (filename) {
 
 	amdetective(this.getFileSource(filename)).forEach(function (obj) {
 		if (!self.isExcluded(obj.name)) {
-			var deps = [];
-			for(var i = 0; i < obj.deps.length;i++) {
-				if(!self.isExcluded(obj.deps[i])){
-					deps.push(obj.deps[i]);
-				}
-			}
-			self.tree[obj.name] = deps;
+
+			self.tree[obj.name] = obj.deps.filter(function(id) {
+				return id !== 'require' && id !== 'exports' && id !== 'module' && !id.match(/\.?\w\!/) && !self.isExcluded(id);
+			})
 		}
 	});
 };
filter out require/plugins and excluded