diff --git a/lib/config.js b/lib/config.js
index <HASH>..<HASH> 100644
--- a/lib/config.js
+++ b/lib/config.js
@@ -80,6 +80,7 @@ config.set = function(options) {
 
 function cleanInjects(injects, ext, watch) {
   injects = Array.isArray(injects) ? injects : injects ? [injects] : []
+  injects = injects.map(inject => typeof inject === 'function' ? { compile: inject } : inject)
   injects = injects.map(inject => typeof inject === 'string' ? { compile: inject } : inject)
   injects.filter(inject => typeof inject.compile === 'string').forEach(processifyCompile)
   injects.filter(inject => inject.path).forEach(inject => inject.path = url.resolve('/', inject.path))
Allow js and css to take a function directly