diff --git a/src/meta/css.js b/src/meta/css.js index a1a29cb731..91932d8233 100644 --- a/src/meta/css.js +++ b/src/meta/css.js @@ -127,7 +127,6 @@ function getBundleMetadata(target, callback) { themeData.bootswatchSkin = skin || themeData.bootswatchSkin; } - async.parallel({ less: function (cb) { async.waterfall([ diff --git a/src/middleware/index.js b/src/middleware/index.js index ff58331799..165342e3d7 100644 --- a/src/middleware/index.js +++ b/src/middleware/index.js @@ -210,9 +210,10 @@ middleware.buildSkinAsset = function (req, res, next) { // If this middleware is reached, a skin was requested, so it is built on-demand var target = path.basename(req.originalUrl).match(/(client-[a-z]+)/); if (target) { - meta.css.buildBundle(target[0], true, function () { - next(); - }); + async.waterfall([ + async.apply(plugins.prepareForBuild, ['client side styles']), + async.apply(meta.css.buildBundle, target[0], true), + ], next); } else { setImmediate(next); }