{"id":13506565,"url":"https://github.com/nuxt-community/separate-env-module","last_synced_at":"2025-04-06T02:08:17.740Z","repository":{"id":54558356,"uuid":"152883249","full_name":"nuxt-community/separate-env-module","owner":"nuxt-community","description":"Tear your variables apart!","archived":false,"fork":false,"pushed_at":"2025-03-18T13:46:52.000Z","size":1130,"stargazers_count":56,"open_issues_count":13,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-30T01:08:30.143Z","etag":null,"topics":["environment","nuxt","nuxt-module","nuxtjs","separate"],"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/nuxt-community.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":"2018-10-13T15:01:19.000Z","updated_at":"2024-10-29T20:57:37.000Z","dependencies_parsed_at":"2025-01-23T08:10:39.010Z","dependency_job_id":"440f6145-944a-4a3b-b2f2-71fa7960b974","html_url":"https://github.com/nuxt-community/separate-env-module","commit_stats":{"total_commits":30,"total_committers":8,"mean_commits":3.75,"dds":0.6666666666666667,"last_synced_commit":"e73004586ab2e3a78f87bbfd058f20bd2784e577"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuxt-community%2Fseparate-env-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuxt-community%2Fseparate-env-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuxt-community%2Fseparate-env-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuxt-community%2Fseparate-env-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nuxt-community","download_url":"https://codeload.github.com/nuxt-community/separate-env-module/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423514,"owners_count":20936626,"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","nuxt","nuxt-module","nuxtjs","separate"],"created_at":"2024-08-01T01:00:53.758Z","updated_at":"2025-04-06T02:08:17.705Z","avatar_url":"https://github.com/nuxt-community.png","language":"JavaScript","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# Separate env module - Tear your variables apart!\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![Circle CI][circle-ci-src]][circle-ci-href]\n[![Codecov][codecov-src]][codecov-href]\n[![License][license-src]][license-href]\n\n\u003e Separated environment variables for `server` and `client` build\n\n[📖 **Release Notes**](./CHANGELOG.md)\n\n:warning: With Nuxt v2.13 you might want to  use the [new runtime config](https://nuxtjs.org/blog/moving-from-nuxtjs-dotenv-to-runtime-config) instead of this.\n\n## Setup\n\n1. Add `@nuxtjs/separate-env` dependency to your project\n\n```bash\nyarn add @nuxtjs/separate-env # or npm install @nuxtjs/separate-env\n```\n\n2. Add `@nuxtjs/separate-env` to the `modules` section of `nuxt.config.js`\n\n```js\n{\n  modules: [\n    '@nuxtjs/separate-env'\n  ],\n  env: {\n    // Your environment variables here (see Configuration section below)\n  }\n}\n```\n\n## Configuration\n\nTo define environment variables only available on `server`/`client` side,\nuse the `env` key of your `nuxt.config.js` and nest the variables\nin a `server` or `client` object:\n\n```js\n{\n  env: {\n    server: {\n      ONLY_SERVER: 'yup',\n      DIFFERENT_ON_BOTH: 'server'\n    },\n    client: {\n      ONLY_CLIENT: 'okay',\n      DIFFERENT_ON_BOTH: 'client'\n    },\n    normalEnvVariableThatWillBeAvailableEverywhere: 'Hi'\n  }\n}\n```\n\nThat's it! You are good to go.\n\n## Caveats\n\n**IMPORTANT:** Be aware that `server-side` means on **every** first render of your application.\nYour secret tokens won't be included anywhere **except where you use them**\n\n## Development\n\n1. Clone this repository\n2. Install dependencies using `yarn install` or `npm install`\n3. Start development server using `npm run dev`\n\n## License\n\n[MIT License](./LICENSE)\n\nCopyright (c) - Nuxt Community\n\n\u003c!-- Badges --\u003e\n[npm-version-src]: https://img.shields.io/npm/v/@nuxtjs/separate-env/latest.svg?style=flat-square\n[npm-version-href]: https://npmjs.com/package/@nuxtjs/separate-env\n\n[npm-downloads-src]: https://img.shields.io/npm/dt/@nuxtjs/separate-env.svg?style=flat-square\n[npm-downloads-href]: https://npmjs.com/package/@nuxtjs/separate-env\n\n[circle-ci-src]: https://img.shields.io/circleci/project/github/nuxt-community/separate-env-module.svg?style=flat-square\n[circle-ci-href]: https://circleci.com/gh/nuxt-community/separate-env-module\n\n[codecov-src]: https://img.shields.io/codecov/c/github/nuxt-community/separate-env-module.svg?style=flat-square\n[codecov-href]: https://codecov.io/gh/nuxt-community/separate-env-module\n\n[license-src]: https://img.shields.io/npm/l/@nuxtjs/separate-env.svg?style=flat-square\n[license-href]: https://npmjs.com/package/@nuxtjs/separate-env\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuxt-community%2Fseparate-env-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnuxt-community%2Fseparate-env-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuxt-community%2Fseparate-env-module/lists"}