New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gatsby-plugin-env-variables

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-plugin-env-variables

Gatsby plugin to allow system environment variables to be made available to client-side scripts

  • 2.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Gatsby Environment Variables Plugin

A Gatsby plugin to allow system environment variables to be made available to client-side scripts.

By default, Gatsby only makes system environment variables prefixed with GATSBY_ available to client scripts. Using this plugin, you can make any arbitrary environment variable available at runtime.

Install

npm install gatsby-plugin-env-variables

How to use

In gatsby-config.js:

module.exports = {
  plugins: [
    {
      resolve: `gatsby-plugin-env-variables`,
      options: {
        allowList: ["MY_VAR", "MY_OTHER_VAR"]
      },
    },
  ],
}

This will make MY_VAR & MY_OTHER_VAR available at runtime in your app by accessing process.env.MY_VAR or process.env.MY_OTHER_VAR.

Keywords

FAQs

Package last updated on 22 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc