peerigon / Modernizr Loader
Licence: mit
Get your modernizr build bundled with webpack
Stars: ✭ 162
Programming Languages
javascript
184084 projects - #8 most used programming language
Labels
Projects that are alternatives of or similar to Modernizr Loader
Svg Spritemap Webpack Plugin
SVG spritemap plugin for webpack
Stars: ✭ 160 (-1.23%)
Mutual labels: webpack
Angular Electron
Angular2 and Electron starter using webpack
Stars: ✭ 155 (-4.32%)
Mutual labels: webpack
Express Webpack React Redux Typescript Boilerplate
🎉 A full-stack boilerplate that using express with webpack, react and typescirpt!
Stars: ✭ 156 (-3.7%)
Mutual labels: webpack
Reactn
React, but with built-in global state management.
Stars: ✭ 1,906 (+1076.54%)
Mutual labels: webpack
Webpack Fast Refresh
React Fast Refresh plugin and loader for webpack
Stars: ✭ 155 (-4.32%)
Mutual labels: webpack
Prerender Loader
📰 Painless universal pre-rendering for Webpack.
Stars: ✭ 1,908 (+1077.78%)
Mutual labels: webpack
Reactconfbr
Public infos and issues about React Conf Brasil organization
Stars: ✭ 156 (-3.7%)
Mutual labels: webpack
Deventy
A minimal 11ty starting point for building static websites with modern tools.
Stars: ✭ 157 (-3.09%)
Mutual labels: webpack
Awesome Vue Cli3 Example
🦅 Awesome example for rapid Vue.js development using vue-cli3 .
Stars: ✭ 160 (-1.23%)
Mutual labels: webpack
Webpack Encore
A simple but powerful API for processing & compiling assets built around Webpack
Stars: ✭ 1,975 (+1119.14%)
Mutual labels: webpack
React Boilerplate
A slightly opinionated yet dead simple boilerplate for React 17.x, Webpack 5 and React Router v5
Stars: ✭ 158 (-2.47%)
Mutual labels: webpack
Webpack Interview Questions
Webpack questions/answers you can use to prepare for interviews or test your knowledge.
Stars: ✭ 159 (-1.85%)
Mutual labels: webpack
modernizr-loader for webpack
Installation
$ npm install --save-dev modernizr modernizr-loader json-loader
Initialization
You have to create a .modernizrrc
configuration file and put your modernizr stuff in it. Like so
// .modernizrrc
{
"minify": true,
"options": [
"setClasses"
],
"feature-detects": []
}
Full list of supported "options" and "feature-detects" can be found in Modernizr config-all.json.
Webpack config
Put the following code to your webpack config file:
const path = require('path');
module.exports = {
module: {
rules: [
{
test: /\.modernizrrc.js$/,
use: [ 'modernizr-loader' ]
},
{
test: /\.modernizrrc(\.json)?$/,
use: [ 'modernizr-loader', 'json-loader' ]
}
]
},
resolve: {
alias: {
modernizr$: path.resolve(__dirname, "path/to/.modernizrrc")
}
}
}
Usage
Now you are able to import your custom Modernizr build as a module throughout your application like so:
import Modernizr from 'modernizr';
if (!Modernizr.promises) {
// ...
}
See the Modernizr documentation for all available options.
Contribution
Don't hesitate to create a pull request. Every contribution is appreciated.
Sponsors
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].