{"id":18513352,"url":"https://github.com/jbox-web/webpack-modernizr-loader","last_synced_at":"2025-05-14T12:20:33.908Z","repository":{"id":146101502,"uuid":"338176964","full_name":"jbox-web/webpack-modernizr-loader","owner":"jbox-web","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-29T02:04:45.000Z","size":305,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-25T21:10:01.255Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/jbox-web.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-11T23:11:04.000Z","updated_at":"2024-08-29T02:04:48.000Z","dependencies_parsed_at":"2024-08-28T15:32:22.437Z","dependency_job_id":"07d5070e-2d16-462f-8651-421029de9343","html_url":"https://github.com/jbox-web/webpack-modernizr-loader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbox-web%2Fwebpack-modernizr-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbox-web%2Fwebpack-modernizr-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbox-web%2Fwebpack-modernizr-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbox-web%2Fwebpack-modernizr-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jbox-web","download_url":"https://codeload.github.com/jbox-web/webpack-modernizr-loader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239226397,"owners_count":19603256,"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":[],"created_at":"2024-11-06T15:37:46.909Z","updated_at":"2025-02-17T03:20:49.136Z","avatar_url":"https://github.com/jbox-web.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webpack-modernizr-loader\n\n[![GitHub license](https://img.shields.io/github/license/jbox-web/webpack-modernizr-loader.svg)](https://github.com/jbox-web/webpack-modernizr-loader/blob/master/LICENSE)\n[![Build Status](https://github.com/jbox-web/webpack-modernizr-loader/workflows/Github%20CI/badge.svg?branch=master)](https://github.com/jbox-web/webpack-modernizr-loader/actions)\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%2Fjbox-web%2Fwebpack-modernizr-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjbox-web%2Fwebpack-modernizr-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbox-web%2Fwebpack-modernizr-loader/lists"}