+ ;
+
+ if (module) {
+ graph[module] = {
+ file: file,
+ imports: imports || []
+ };
+ }
+ });
+
+ return graph;
+}
+
+function findDeps(graph, module) {
+ function go(acc, module){
+ var node = graph[module];
+
+ var imports = node && node.imports;
+
+ if (lodash.isEmpty(imports)) return acc;
+ else {
+ var deps =
+ lodash.map(imports, function(i){
+ return go(acc.concat(imports), i);
+ })
+ ;
+ return lodash.flatten(deps);
+ }
+ }
+
+ return lodash.unique(go([], module));
+}
+
+function loader(source) {
+ this.cacheable && this.cacheable();
+
+ this.clearDependencies();
+
+ this.addDependency(this.resourcePath);
+
+ var callback = this.async();
+
+ var request = lu.getRemainingRequest(this)
+
+ var root = path.dirname(path.relative(cwd, request));
+
+ var query = lu.parseQuery(this.query);
+
+ var opts = mkOptions(query);
+
+ var that = this;
+