{"id":20276183,"url":"https://github.com/vanilla-icecream/process-envify","last_synced_at":"2026-03-08T06:32:26.152Z","repository":{"id":46932178,"uuid":"126461150","full_name":"Vanilla-IceCream/process-envify","owner":"Vanilla-IceCream","description":"A process env helper for injecting strings.","archived":false,"fork":false,"pushed_at":"2023-10-07T06:13:25.000Z","size":147,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T18:47:00.570Z","etag":null,"topics":["env","processing","vite"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Vanilla-IceCream.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-23T09:15:52.000Z","updated_at":"2022-12-08T02:28:56.000Z","dependencies_parsed_at":"2024-06-21T04:19:53.803Z","dependency_job_id":null,"html_url":"https://github.com/Vanilla-IceCream/process-envify","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"d0bbe074d6f69c91b2b8a5f905dbeeacfb48ea6e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vanilla-IceCream%2Fprocess-envify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vanilla-IceCream%2Fprocess-envify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vanilla-IceCream%2Fprocess-envify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vanilla-IceCream%2Fprocess-envify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vanilla-IceCream","download_url":"https://codeload.github.com/Vanilla-IceCream/process-envify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248351391,"owners_count":21089269,"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":["env","processing","vite"],"created_at":"2024-11-14T13:12:47.335Z","updated_at":"2026-03-08T06:32:26.093Z","avatar_url":"https://github.com/Vanilla-IceCream.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# process-envify [![Build Status](https://travis-ci.org/Vanilla-IceCream/process-envify.svg?branch=master)](https://travis-ci.org/Vanilla-IceCream/process-envify) [![Coverage Status](https://coveralls.io/repos/github/Vanilla-IceCream/process-envify/badge.svg?branch=master)](https://coveralls.io/github/Vanilla-IceCream/process-envify?branch=master)\n\nA process env helper for injecting strings.\n\n## Install\n\n```bash\n$ npm i process-envify -D\n# or\n$ pnpm i process-envify -D\n# or\n$ yarn add process-envify -D\n```\n\n## Usage\n\n```js\n// Input:\nconst getBookName = () =\u003e process.env.BOOK_NAME;\n```\n\n```js\n// In your build tool (see below):\nimport envify from 'process-envify';\n\nenvify({ BOOK_NAME: 'ECMAScript: Up and Running' });\n```\n\n```js\n// Output:\nconst getBookName = () =\u003e 'ECMAScript: Up and Running';\n```\n\n### Vite (`vite.config.ts`)\n\n```ts\nimport { defineConfig } from 'vite';\nimport envify from 'process-envify';\n\nexport default defineConfig({\n  define: envify({ BOOK_NAME: 'ECMAScript: Up and Running' }),\n});\n```\n\n### Vue CLI (`vue.config.js`)\n\n```js\nconst envify = require('process-envify');\n\nmodule.exports = {\n  chainWebpack: (config) =\u003e {\n    config.plugin('define').tap((args) =\u003e {\n      Object.assign(\n        args[0],\n        envify({ BOOK_NAME: 'ECMAScript: Up and Running' }),\n      );\n\n      return args;\n    });\n  },\n};\n```\n\n### CRACO (Create React App Configuration Override, `craco.config.js`)\n\n```js\nconst webpack = require('webpack');\n\nmodule.exports = {\n  webpack: {\n    configure: {\n      plugins: [\n        new webpack.DefinePlugin(\n          envify({ BOOK_NAME: 'ECMAScript: Up and Running' }),\n        ),\n      ],\n    },\n  },\n};\n```\n\n### Angular CLI (`angular.json`) + Angular Builders (`extra-webpack.config.js`)\n\n```json\n{\n  \"architect\": {\n    \"serve\": {\n      \"builder\": \"@angular-builders/custom-webpack:dev-server\",\n      \"options\": {\n        \"customWebpackConfig\": {\n          \"path\": \"./extra-webpack.config.js\"\n        }\n      }\n    },\n    \"build\": {\n      \"builder\": \"@angular-builders/custom-webpack:browser\",\n      \"options\": {\n        \"customWebpackConfig\": {\n          \"path\": \"./extra-webpack.config.js\"\n        }\n      }\n    }\n  }\n}\n```\n\n```js\nconst webpack = require('webpack');\nconst envify = require('process-envify');\n\nmodule.exports = {\n  plugins: [\n    new webpack.DefinePlugin(\n      envify({ BOOK_NAME: 'ECMAScript: Up and Running' }),\n    ),\n  ],\n};\n```\n\n### Rollup (`rollup.config.js`)\n\n```js\nimport replace from '@rollup/plugin-replace';\nimport envify from 'process-envify';\n\nexport default {\n  plugins: [\n    replace(\n      envify({ BOOK_NAME: 'ECMAScript: Up and Running' }),\n    ),\n  ],\n};\n```\n\n### Webpack (`webpack.config.js`)\n\n```js\nconst webpack = require('webpack');\nconst envify = require('process-envify');\n\nmodule.exports = {\n  plugins: [\n    new webpack.DefinePlugin(\n      envify({ BOOK_NAME: 'ECMAScript: Up and Running' }),\n    ),\n  ],\n};\n```\n\n### Gulp (`gulpfile.js`)\n\n```js\nconst gulp = require('gulp');\nconst replaces = require('gulp-replaces');\nconst envify = require('process-envify');\n\nfunction defaultTask() {\n  return gulp\n    .src('./src/main.js')\n    .pipe(replaces(\n      envify({ BOOK_NAME: 'ECMAScript: Up and Running' }),\n    ))\n    .pipe(gulp.dest('./dist'));\n}\n\nexports.default = defaultTask;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanilla-icecream%2Fprocess-envify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvanilla-icecream%2Fprocess-envify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanilla-icecream%2Fprocess-envify/lists"}