{"id":18369235,"url":"https://github.com/envkey/envkey-webpack-plugin","last_synced_at":"2025-04-06T17:32:00.588Z","repository":{"id":54716457,"uuid":"97560224","full_name":"envkey/envkey-webpack-plugin","owner":"envkey","description":" A webpack plugin that wraps EnvKey's Node.js library so you can easily inject whitelisted configuration into your browser apps.","archived":false,"fork":false,"pushed_at":"2022-03-10T21:26:56.000Z","size":9,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-22T04:03:27.836Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.envkey.com","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/envkey.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2017-07-18T06:21:12.000Z","updated_at":"2023-12-06T07:05:10.000Z","dependencies_parsed_at":"2022-08-14T00:40:48.184Z","dependency_job_id":null,"html_url":"https://github.com/envkey/envkey-webpack-plugin","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/envkey%2Fenvkey-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/envkey%2Fenvkey-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/envkey%2Fenvkey-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/envkey%2Fenvkey-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/envkey","download_url":"https://codeload.github.com/envkey/envkey-webpack-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247522469,"owners_count":20952557,"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-05T23:28:50.304Z","updated_at":"2025-04-06T17:32:00.309Z","avatar_url":"https://github.com/envkey.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## envkey-webpack-plugin\n\nA webpack plugin that wraps [EnvKey's](https://www.envkey.com) [Node.js library](https://www.github.com/envkey/envkey-node) so you can easily inject whitelisted configuration into your browser apps.\n\nAll vars will be available on `process.env` in the browser.\n\nTo make `process.env.NODE_ENV` available, just add it to the `permitted` whitelist (see below).\n\n# v2\n\nNow that [EnvKey v2](https://v2.envkey.com) has been released, you can find version 2 of this package in [a subdirectory of the EnvKey v2 monorepo](https://github.com/envkey/envkey/tree/main/public/sdks/languages-and-frameworks/webpack). Using v2 requires an EnvKey v2 organization (it won't work with ENVKEYs generated in a v1 org).\n\n[Here's a guide on migrating from v1 to v2.](https://docs-v2.envkey.com/docs/migrating-from-v1)\n\nTo continue using version 1 of this package, make sure you specify make sure you specify `@\"^1.x\"` when installing with npm so that you don't accidentally install v2.\n\n## Install\n\n`npm i envkey-webpack-plugin@\"^1.x\" --save-dev`\n\n## Usage\n\n```javascript\nvar webpack = require('webpack'),\n    EnvkeyWebpackPlugin = require('envkey-webpack-plugin');\n\nmodule.exports = {\n  //...\n\n  plugins: [\n    new EnvkeyWebpackPlugin({\n\n      permitted: [\"STRIPE_PUBLISHABLE_KEY\", \"PUSHER_APP_KEY\", \"NODE_ENV\"], // required, specify whitelist of vars to pull from Envkey -- you can also include \"NODE_ENV\" to make that available\n\n      dotEnvFile: \".env\", // optional, specify alternate dotenv file path like \".env.staging\" -- file should include valid ENVKEY variable\n\n      define: {ANOTHER_VAR: \"anotherVal\"} // optional, set additional vars on `process.env`\n\n    })\n  ]\n\n //...\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenvkey%2Fenvkey-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenvkey%2Fenvkey-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenvkey%2Fenvkey-webpack-plugin/lists"}