Merge pull request #214 from foglerek/master

Accomodated for change to Loader API in Webpack 2
This commit is contained in:
Jan Nicklas 2016-02-10 13:04:40 +01:00
commit 2ed44aad42
1 changed files with 2 additions and 1 deletions

View File

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