{"id":20906209,"url":"https://github.com/webpack-config/webpack-config-env","last_synced_at":"2025-07-18T18:32:38.162Z","repository":{"id":57141457,"uuid":"81034070","full_name":"webpack-config/webpack-config-env","owner":"webpack-config","description":null,"archived":false,"fork":false,"pushed_at":"2017-07-09T21:02:21.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-21T10:43:15.808Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webpack-config.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}},"created_at":"2017-02-06T01:00:42.000Z","updated_at":"2020-06-19T15:37:51.000Z","dependencies_parsed_at":"2022-09-04T13:12:16.807Z","dependency_job_id":null,"html_url":"https://github.com/webpack-config/webpack-config-env","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/webpack-config/webpack-config-env","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpack-config%2Fwebpack-config-env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpack-config%2Fwebpack-config-env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpack-config%2Fwebpack-config-env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpack-config%2Fwebpack-config-env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webpack-config","download_url":"https://codeload.github.com/webpack-config/webpack-config-env/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpack-config%2Fwebpack-config-env/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265810017,"owners_count":23831945,"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-18T13:32:28.287Z","updated_at":"2025-07-18T18:32:38.138Z","avatar_url":"https://github.com/webpack-config.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#webpack-config-env\n\nInject environment variables into your [webpack] build.\n\n[![build status](http://img.shields.io/travis/webpack-config/webpack-config-env/master.svg?style=flat)](https://travis-ci.org/webpack-config/webpack-config-env)\n[![coverage](http://img.shields.io/coveralls/webpack-config/webpack-config-env/master.svg?style=flat)](https://coveralls.io/github/webpack-config/webpack-config-env?branch=master)\n[![license](http://img.shields.io/npm/l/webpack-config-env.svg?style=flat)](https://www.npmjs.com/package/webpack-config-env)\n[![version](http://img.shields.io/npm/v/webpack-config-env.svg?style=flat)](https://www.npmjs.com/package/webpack-config-env)\n[![downloads](http://img.shields.io/npm/dm/webpack-config-env.svg?style=flat)](https://www.npmjs.com/package/webpack-config-env)\n\n## Usage\n\nInstall:\n```sh\nnpm install --save webpack-config-env\n```\n\nAdd to your `webpack.config.babel.js`:\n\n```js\nimport env from `webpack-config-env`;\n\nenv({\n  NODE_ENV: {required: false},\n  DEPLOY_ENV: {required: process.env.NODE_ENV === 'production'},\n  API_URL: {\n    required: true,\n    value: process.env.NODE_ENV !== 'production'\n     ? 'https://my-app-api.herokuapp.com/api'\n     : undefined,\n  },\n})({\n  /* existing webpack configuration */\n})\n```\n\n[webpack]: https://webpack.github.io\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebpack-config%2Fwebpack-config-env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebpack-config%2Fwebpack-config-env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebpack-config%2Fwebpack-config-env/lists"}