From 5888095dd42f811287ec8f47b49263983128e597 Mon Sep 17 00:00:00 2001 From: Liad Yosef Date: Mon, 8 May 2017 13:51:45 +0300 Subject: [PATCH] fix: stringify the options.transform request (#230) --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index ed7fb67b..e4074e92 100644 --- a/index.js +++ b/index.js @@ -16,7 +16,7 @@ module.exports.pitch = function(remainingRequest) { "if(typeof content === 'string') content = [[module.id, content, '']];", "// Prepare cssTransformation", "var transform;", - query.transform ? "transform = require('" + path.resolve(query.transform) + "');" : "", + query.transform ? "transform = require(" + loaderUtils.stringifyRequest(this, "!" + path.resolve(query.transform)) + ");" : "", "var options = " + JSON.stringify(query), "options.transform = transform", "// add the styles to the DOM",