{"id":20066427,"url":"https://github.com/itgalaxy/webpack-modernizr-loader","last_synced_at":"2025-09-21T00:04:16.582Z","repository":{"id":12228708,"uuid":"71264391","full_name":"itgalaxy/webpack-modernizr-loader","owner":"itgalaxy","description":"Get your modernizr build bundled with webpack, use modernizr with webpack easily","archived":false,"fork":false,"pushed_at":"2023-01-07T02:17:28.000Z","size":1914,"stargazers_count":39,"open_issues_count":17,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-12T09:04:24.706Z","etag":null,"topics":["loader","modernizr","webpack","webpack-loader"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itgalaxy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-18T15:44:45.000Z","updated_at":"2023-11-09T12:46:08.000Z","dependencies_parsed_at":"2023-01-13T16:50:45.967Z","dependency_job_id":null,"html_url":"https://github.com/itgalaxy/webpack-modernizr-loader","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/itgalaxy/webpack-modernizr-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itgalaxy%2Fwebpack-modernizr-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itgalaxy%2Fwebpack-modernizr-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itgalaxy%2Fwebpack-modernizr-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itgalaxy%2Fwebpack-modernizr-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itgalaxy","download_url":"https://codeload.github.com/itgalaxy/webpack-modernizr-loader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itgalaxy%2Fwebpack-modernizr-loader/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261441470,"owners_count":23158484,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["loader","modernizr","webpack","webpack-loader"],"created_at":"2024-11-13T13:57:05.408Z","updated_at":"2025-09-21T00:04:11.544Z","avatar_url":"https://github.com/itgalaxy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webpack-modernizr-loader\n\n[![NPM version](https://img.shields.io/npm/v/webpack-modernizr-loader.svg)](https://www.npmjs.org/package/webpack-modernizr-loader)\n[![Travis Build Status](https://img.shields.io/travis/itgalaxy/webpack-modernizr-loader/master.svg?label=build)](https://travis-ci.org/itgalaxy/webpack-modernizr-loader)\n[![dependencies Status](https://david-dm.org/itgalaxy/webpack-modernizr-loader/status.svg)](https://david-dm.org/itgalaxy/webpack-modernizr-loader)\n[![devDependencies Status](https://david-dm.org/itgalaxy/webpack-modernizr-loader/dev-status.svg)](https://david-dm.org/itgalaxy/webpack-modernizr-loader?type=dev)\n\nGet your modernizr build bundled with webpack.\n\n## Installation\n\n```shell\n$ npm install webpack-modernizr-loader --save-dev\n```\n\n## Usage\n\n[Documentation: Using loaders](http://webpack.github.io/docs/using-loaders.html)\n\nThere are three use case.\n\n1. Using loader `options`.\n\n```javascript\nconst modernizr = require(\"modernizr\");\n```\n\n**webpack.config.js**\n\n```javascript\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        loader: \"webpack-modernizr-loader\",\n        options: {\n          // Full list of supported options can be found in [config-all.json](https://github.com/Modernizr/Modernizr/blob/master/lib/config-all.json).\n          options: [\"setClasses\"],\n          \"feature-detects\": [\n            \"test/css/flexbox\",\n            \"test/es6/promises\",\n            \"test/serviceworker\"\n          ]\n          // Uncomment this when you use `JSON` format for configuration\n          // type: 'javascript/auto'\n        },\n        test: /empty-alias-file\\.js$/\n      }\n    ]\n  },\n  resolve: {\n    alias: {\n      // You can add comment \"Please do not delete this file\" in this file\n      modernizr$: path.resolve(__dirname, \"/path/to/empty-alias-file.js\")\n    }\n  }\n};\n```\n\n2. Using config file through alias (supported **JavaScript** and **JSON** syntax).\n\n```javascript\nconst modernizr = require(\"modernizr\");\n```\n\n**.modernizrrc.js**\n\n```javascript\nmodule.exports = {\n  options: [\"setClasses\"],\n  \"feature-detects\": [\n    \"test/css/flexbox\",\n    \"test/es6/promises\",\n    \"test/serviceworker\"\n  ]\n};\n```\n\n**webpack.config.js**\n\n```javascript\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        loader: \"webpack-modernizr-loader\",\n        test: /\\.modernizrrc\\.js$/\n        // Uncomment this when you use `JSON` format for configuration\n        // type: 'javascript/auto'\n      }\n    ]\n  },\n  resolve: {\n    alias: {\n      modernizr$: path.resolve(__dirname, \"/path/to/.modernizrrc.js\")\n    }\n  }\n};\n```\n\n3. Using config (supported **JavaScript** and **JSON** syntax) file directly (see below example how it is use).\n\n```javascript\nconst modernizr = require(\"modernizr\");\n```\n\n**webpack.config.js**\n\n```javascript\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        loader: \"webpack-modernizr-loader\",\n        test: /\\.modernizrrc\\.js$/\n        // Uncomment this when you use `JSON` format for configuration\n        // type: 'javascript/auto'\n      }\n    ]\n  }\n};\n```\n\n## Related\n\n- [Modernizr](https://github.com/Modernizr/Modernizr) - API for this module\n\n## Contribution\n\nFeel free to push your code if you agree with publishing under the MIT license.\n\n## [Changelog](CHANGELOG.md)\n\n## [License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitgalaxy%2Fwebpack-modernizr-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitgalaxy%2Fwebpack-modernizr-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitgalaxy%2Fwebpack-modernizr-loader/lists"}