From 34d8816dbfed8c838205dd025dae6f2f4031bf2b Mon Sep 17 00:00:00 2001 From: Richard Ivan Date: Thu, 1 Sep 2016 15:59:09 +0200 Subject: [PATCH 1/2] ammend --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 2ddf780..c17e15e 100644 --- a/index.js +++ b/index.js @@ -26,7 +26,8 @@ function resolveImageSrc(loaderContext, image, callback) { // Update the image src property to match the generated filename // Is it always the first key in the assets object? - image.src = Object.keys(module.assets)[0]; + image.src = image.src = source.match( /"(.*?)"/ )[1] + // image.src = Object.keys(module.assets)[0]; callback(null); }); From 42fca01fe1dad23ef8e105325534274a466cee2a Mon Sep 17 00:00:00 2001 From: Richard Ivan Date: Thu, 1 Sep 2016 16:15:17 +0200 Subject: [PATCH 2/2] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index c17e15e..d652888 100644 --- a/index.js +++ b/index.js @@ -26,7 +26,7 @@ function resolveImageSrc(loaderContext, image, callback) { // Update the image src property to match the generated filename // Is it always the first key in the assets object? - image.src = image.src = source.match( /"(.*?)"/ )[1] + image.src = source.match( /"(.*?)"/ )[1] // image.src = Object.keys(module.assets)[0]; callback(null);