Comparing version 0.0.22 to 0.0.23
@@ -352,14 +352,17 @@ var path = require('path'); | ||
// 异步资源的deps中剔除非JS资源 | ||
var deps = res['deps'].filter(function(dep){ | ||
var info = fis.getInfo(dep, true); | ||
if (info.isJsLike){ | ||
return true; | ||
if (res['deps']){ | ||
// 异步资源的deps中剔除非JS资源 | ||
var deps = res['deps'].filter(function(dep){ | ||
var info = fis.getInfo(dep, true); | ||
if (info.isJsLike){ | ||
return true; | ||
} | ||
}) || []; | ||
if (deps.length !== 0){ | ||
rMap['res'][id].deps = deps; | ||
} | ||
}) || []; | ||
if (deps.length !== 0){ | ||
rMap['res'][id].deps = deps; | ||
} | ||
if (res['pkg']) { | ||
@@ -366,0 +369,0 @@ rMap['res'][id]['pkg'] = res['pkg']; |
{ | ||
"name": "yog-view", | ||
"version": "0.0.22", | ||
"version": "0.0.23", | ||
"description": "An express.js middleware for optimizing the order of js\\css output, and enabling render template in bigpipe mode.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
20423
494