{"id":24490234,"url":"https://github.com/mckomo/webpack-mode","last_synced_at":"2025-10-24T03:12:00.556Z","repository":{"id":65379343,"uuid":"128187852","full_name":"mckomo/webpack-mode","owner":"mckomo","description":"Get current mode of Webpack 4 build","archived":false,"fork":false,"pushed_at":"2023-04-23T23:05:53.000Z","size":78,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T23:07:34.727Z","etag":null,"topics":["environment","javascript","webpack","webpack-mode"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mckomo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-04-05T09:54:47.000Z","updated_at":"2021-01-26T13:28:19.000Z","dependencies_parsed_at":"2024-06-19T16:45:22.525Z","dependency_job_id":null,"html_url":"https://github.com/mckomo/webpack-mode","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"b890fc62f65d024537188164c5ac8fe0c26258ed"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mckomo%2Fwebpack-mode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mckomo%2Fwebpack-mode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mckomo%2Fwebpack-mode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mckomo%2Fwebpack-mode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mckomo","download_url":"https://codeload.github.com/mckomo/webpack-mode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248794571,"owners_count":21162615,"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":["environment","javascript","webpack","webpack-mode"],"created_at":"2025-01-21T17:17:28.639Z","updated_at":"2025-10-24T03:12:00.454Z","avatar_url":"https://github.com/mckomo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webpack-mode\n\n[![Build Status](https://travis-ci.org/mckomo/webpack-mode.svg?branch=master)](https://travis-ci.org/mckomo/webpack-mode)\n\nGet easily environment mode of Webpack build. **Works only with Webpack 4**.\n\n### Install\n\nSimply run in terminal:\n\n```sh\nnpm add --save-dev webpack-mode\n```\n\nor (if you use Yarn)\n\n```sh\nyarn add --dev webpack-mode\n```\n\n### Usage\n\nWhen you run `webpack --mode=production` or `NODE_ENV=production webpack`\n\n```js\n// webpack.config.js\nconst { isProduction } = require(\"webpack-mode\");\n\nconsole.log(isProduction); // =\u003e true\n\n// ... rest of the config\n```\n\n### API\n\nWhen you run `webpack --mode=development`\n\n```js\nconst webpackMode = require(\"webpack-mode\");\n\nwebpackMode.isProduction; // false\nwebpackMode.isDevelopment; // true\n\nwebpackMode == \"development\"; // true\nwebpackMode === \"development\"; // false - webpackMode is not a string\n\nconsole.log(`${webpackMode}`); // 'development'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmckomo%2Fwebpack-mode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmckomo%2Fwebpack-mode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmckomo%2Fwebpack-mode/lists"}