Last active
January 15, 2016 08:25
-
-
Save sapegin/1ed6515f4ead7b9ec3c1 to your computer and use it in GitHub Desktop.
Detect minified files in Webpack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
module: { | |
loaders: [ | |
{ | |
test: /\.jsx?$/, | |
loaders: ['detect-min'] | |
}, | |
] | |
} | |
*/ | |
module.exports = function(content) { | |
this.cacheable && this.cacheable(); | |
if (content.length > 50000) { | |
console.log(this.resource); | |
} | |
return content; | |
} | |
module.exports.raw = true; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment