All Projects â†’ itgalaxy â†’ webpack-modernizr-loader

itgalaxy / webpack-modernizr-loader

Licence: MIT license
Get your modernizr build bundled with webpack, use modernizr with webpack easily

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to webpack-modernizr-loader

Svgr
Transform SVGs into React components 🊁
Stars: ✭ 8,263 (+23508.57%)
Mutual labels:  loader, webpack-loader
markup-inline-loader
a webpack loader to embed svg/MathML to html
Stars: ✭ 24 (-31.43%)
Mutual labels:  loader, webpack-loader
Vue Svg Inline Loader
Webpack loader used for inline replacement of SVG images with actual content of SVG files in Vue projects.
Stars: ✭ 105 (+200%)
Mutual labels:  loader, webpack-loader
Wasm Loader
✹ WASM webpack loader
Stars: ✭ 604 (+1625.71%)
Mutual labels:  loader, webpack-loader
angular-translate-loader
"angular-translate" loader for webpack
Stars: ✭ 15 (-57.14%)
Mutual labels:  loader, webpack-loader
Stylefmt Loader
Webpack-loader. Fixes stylelint issues automatically while bundling with Webpack.
Stars: ✭ 24 (-31.43%)
Mutual labels:  loader, webpack-loader
Style Loader
Style Loader
Stars: ✭ 1,572 (+4391.43%)
Mutual labels:  loader, webpack-loader
Markdown Loader
markdown loader for webpack
Stars: ✭ 335 (+857.14%)
Mutual labels:  loader, webpack-loader
Pug As Jsx Loader
Stars: ✭ 168 (+380%)
Mutual labels:  loader, webpack-loader
Rust Native Wasm Loader
Stars: ✭ 156 (+345.71%)
Mutual labels:  loader, webpack-loader
Inject Loader
💉📊 A Webpack loader for injecting code into modules via their dependencies.
Stars: ✭ 474 (+1254.29%)
Mutual labels:  loader, webpack-loader
jsx-compress-loader
⚛JSX optimisation loader to reduce size of React application
Stars: ✭ 40 (+14.29%)
Mutual labels:  loader, webpack-loader
Css Loader
CSS Loader
Stars: ✭ 4,067 (+11520%)
Mutual labels:  loader, webpack-loader
Thread Loader
Runs the following loaders in a worker pool
Stars: ✭ 945 (+2600%)
Mutual labels:  loader, webpack-loader
Sass Loader
Compiles Sass to CSS
Stars: ✭ 3,718 (+10522.86%)
Mutual labels:  loader, webpack-loader
Sass Vars Loader
Use Sass variables defined in Webpack config or in external Javascript or JSON files
Stars: ✭ 112 (+220%)
Mutual labels:  loader, webpack-loader
nunjucks-loader
Webpack loader for Nunjucks templates
Stars: ✭ 20 (-42.86%)
Mutual labels:  loader, webpack-loader
typed-css-modules-loader
💠 Webpack loader for typed-css-modules auto-creation
Stars: ✭ 62 (+77.14%)
Mutual labels:  loader, webpack-loader
Vue Pretty Logger
The console is more cool to use, easier to debug, and more fun log output. Enjoy the vue-pretty-logger in the vue project.
Stars: ✭ 150 (+328.57%)
Mutual labels:  loader, webpack-loader
sizeof-loader
Webpack loader that works like url-loader (or file-loader) but with extracted information such as image dimensions and file-size.
Stars: ✭ 20 (-42.86%)
Mutual labels:  loader, webpack-loader

webpack-modernizr-loader

NPM version Travis Build Status dependencies Status devDependencies Status

Get your modernizr build bundled with webpack.

Installation

$ npm install webpack-modernizr-loader --save-dev

Usage

Documentation: Using loaders

There are three use case.

  1. Using loader options.
const modernizr = require("modernizr");

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        loader: "webpack-modernizr-loader",
        options: {
          // Full list of supported options can be found in [config-all.json](https://github.com/Modernizr/Modernizr/blob/master/lib/config-all.json).
          options: ["setClasses"],
          "feature-detects": [
            "test/css/flexbox",
            "test/es6/promises",
            "test/serviceworker"
          ]
          // Uncomment this when you use `JSON` format for configuration
          // type: 'javascript/auto'
        },
        test: /empty-alias-file\.js$/
      }
    ]
  },
  resolve: {
    alias: {
      // You can add comment "Please do not delete this file" in this file
      modernizr$: path.resolve(__dirname, "/path/to/empty-alias-file.js")
    }
  }
};
  1. Using config file through alias (supported JavaScript and JSON syntax).
const modernizr = require("modernizr");

.modernizrrc.js

module.exports = {
  options: ["setClasses"],
  "feature-detects": [
    "test/css/flexbox",
    "test/es6/promises",
    "test/serviceworker"
  ]
};

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        loader: "webpack-modernizr-loader",
        test: /\.modernizrrc\.js$/
        // Uncomment this when you use `JSON` format for configuration
        // type: 'javascript/auto'
      }
    ]
  },
  resolve: {
    alias: {
      modernizr$: path.resolve(__dirname, "/path/to/.modernizrrc.js")
    }
  }
};
  1. Using config (supported JavaScript and JSON syntax) file directly (see below example how it is use).
const modernizr = require("modernizr");

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        loader: "webpack-modernizr-loader",
        test: /\.modernizrrc\.js$/
        // Uncomment this when you use `JSON` format for configuration
        // type: 'javascript/auto'
      }
    ]
  }
};

Related

Contribution

Feel free to push your code if you agree with publishing under the MIT license.

Changelog

License

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].