From 8e37dce5c19dd7c00802995fcf62376314283dec Mon Sep 17 00:00:00 2001 From: Michael Frye Date: Mon, 23 May 2016 19:50:32 -0700 Subject: [PATCH] handle versioned components --- index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.js b/index.js index 9ab0025..a9ff0df 100644 --- a/index.js +++ b/index.js @@ -83,6 +83,12 @@ ComponentPlugin.prototype.apply = function(compiler) { log(componentFilePath + " doesn't contain a dependency matching " + requestName); return callback(); } + + // Load versioned + if (componentFileContent.dependencies[fullName] !== '*') { + fullName = fullName + '@' + componentFileContent.dependencies[fullName]; + } + log(componentFilePath + " contains a dependency " + fullName); findInDirectories.call(this, fullName); }