diff --git a/processor/rewrite-url.js b/processor/rewrite-url.js index 6e375ad..3a756c1 100644 --- a/processor/rewrite-url.js +++ b/processor/rewrite-url.js @@ -78,6 +78,7 @@ var defaultConfig = { * for example, it is possible to add cache-busting tokens */ staticMap: { + img: ['src'], script: ['src'], link: ['href'], video: ['src'], @@ -104,6 +105,10 @@ function createConfig(config) { if (config && config.rewriteMapAddon) { out.rewriteMap = extend({}, defaultConfig.rewriteMap, config.rewriteMapAddon); } + + if (config && config.staticMapAddon) { + out.staticMap = extend({}, defaultConfig.staticMap, config.staticMapAddon); + } return out; } @@ -252,4 +257,4 @@ module.exports = function(config) { module.exports.config = defaultConfig; module.exports.absoluteUrl = absoluteUrl; -module.exports.rebuildUrl = rebuildUrl; \ No newline at end of file +module.exports.rebuildUrl = rebuildUrl;