itgalaxy / webpack-modernizr-loader

Get your modernizr build bundled with webpack, use modernizr with webpack easily
MIT License
39 stars 5 forks source link

Doesn't seem to work at all #103

Open developdeez opened 3 years ago

developdeez commented 3 years ago

Followed the instructions and no result in the html. must be outdated

cascornelissen commented 3 years ago

I've been searching/debugging for a few hours today so I'm hoping this helps you or someone else. All Webpack loaders and plugins that handle Modernizr builds don't seem to be updated for Webpack 5 or are no longer maintained at all anymore.

There's a guide within the official Webpack documentation on how to set this up with val-loader but it requires quite a big custom implementation. Since I needed this in multiple projects I have abstracted this away into (shameless plug) val-loader-modernizr, feel free to use it if you're using Webpack 5 ✌🏼

alexander-akait commented 3 years ago

Yep, original solution here https://github.com/webpack-contrib/val-loader#modernizr