From 9a149a5c6f2aae196afa3cca9deae612a2865998 Mon Sep 17 00:00:00 2001 From: Kiril Vatev Date: Tue, 14 Apr 2015 15:29:53 -0400 Subject: [PATCH] added query parameter url=false https://github.com/webpack/css-loader/issues/44 --- lib/loader.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/loader.js b/lib/loader.js index b75309fb..427de3fc 100644 --- a/lib/loader.js +++ b/lib/loader.js @@ -44,9 +44,11 @@ module.exports = function(content, map) { result.push("exports.i(require(" + loaderUtils.stringifyRequest(this, importUrl) + "), " + JSON.stringify(imp.mediaQuery) + ");"); } }, this); - stuff.urls.forEach(function(url, idx) { - replacer.replace(url.start, url.length, "__CSSLOADERURL_" + idx + "__"); - }); + if (query.url !== 'false') { + stuff.urls.forEach(function(url, idx) { + replacer.replace(url.start, url.length, "__CSSLOADERURL_" + idx + "__"); + }); + } var placeholders = {}; stuff.placeholders.forEach(function(placeholder) { var hash = require("crypto").createHash("md5");