From 6818eedc2dd27c66ebeee3f359ea83ca8f72a24f Mon Sep 17 00:00:00 2001 From: Alexander Wesolowski Date: Wed, 10 Feb 2016 01:23:06 -0800 Subject: [PATCH] Accomodated for change to Loader API in Webpack 2 issue#213 --- lib/loader.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/loader.js b/lib/loader.js index 2e11d88..21396c3 100644 --- a/lib/loader.js +++ b/lib/loader.js @@ -9,7 +9,8 @@ module.exports = function (source) { this.cacheable(); } var allLoadersButThisOne = this.loaders.filter(function (loader) { - return loader.module !== module.exports; + // Loader API changed from `loader.module` to `loader.normal` in Webpack 2. + return (loader.module || loader.normal) !== module.exports; }); // This loader shouldn't kick in if there is any other loader if (allLoadersButThisOne.length > 0) {