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) {