Skip to content

Instantly share code, notes, and snippets.

@sapegin
Last active January 15, 2016 08:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sapegin/1ed6515f4ead7b9ec3c1 to your computer and use it in GitHub Desktop.
Save sapegin/1ed6515f4ead7b9ec3c1 to your computer and use it in GitHub Desktop.
Detect minified files in Webpack
/*
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