New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@bitscheme/babel-plugin-dotenv

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bitscheme/babel-plugin-dotenv

Load environment variables from .env file using import statement

latest
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

babel-plugin-dotenv

Loads environment variables from a .env file through import statement.

Installation

$ npm install babel-plugin-dotenv

Usage

.babelrc

{
  "plugins": [["babel-plugin-dotenv", {
      "replacedModuleName": "babel-dotenv"
   }]]
}

.env

DB_HOST=localhost
DB_USER=root
DB_PASS=s1mpl3

In whatever.js

import { DB_HOST, DB_USER, DB_PASS } from "babel-dotenv"
db.connect({
  host: DB_HOST,
  username: DB_USER,
  password: DB_PASS
});

Keywords

dotenv

FAQs

Package last updated on 21 Nov 2017

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