use modernizr with webpack easily
npm install modernizr-loader  
```
$ npm install --save-dev modernizr modernizr-loader
You have to create a .modernizrrc configuration file and put your modernizr stuff in it. Like so
`javascript`
// .modernizrrc
{
"minify": true,
"options": [
"setClasses"
],
"feature-detects": []
}
Full list of supported "options" and "feature-detects" can be found in Modernizr config-all.json.
Put the following code to your webpack config file:
`javascript`
module.exports = {
module: {
loaders: [
{
test: /\.modernizrrc.js$/,
loader: "modernizr"
},
{
test: /\.modernizrrc(\.json)?$/,
loader: "modernizr!json"
}
]
},
resolve: {
alias: {
modernizr$: path.resolve(__dirname, "path/to/.modernizrrc")
}
}
}
Now you are able to import your custom Modernizr build as a module throughout your application like so:
`javscript
import Modernizr from 'modernizr';
if (!Modernizr.promises) {
// ...
}
``
See the Modernizr documentation for all available options.
Don't hesitate to create a pull request. Every contribution is appreciated.