Skip to content

lucasbento/dotenv-webpack

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotenv-webpack

A simple webpack plugin to support dotenv.

Status

npm Travis Coverage Status Dependency Status devDependency Status js-standard-style npm pull requests

Installation

Include the package locally in your repository.

npm install dotenv-webpack --save

Basic Usage

The plugin can be installed with little-to-no configuration needed.

// webpack.config.js
const Dotenv = require('dotenv-webpack');

module.exports = {
  ...
  plugins: [
    new Dotenv({
      path: './.env', // can be ommitted as this is the default
      safe: false, // make true to use dotenv-safe and require varialbes
      sample: './.env.example', // if safe=true, use this to define the safe env
      systemvars: false // if true, also loads system env variables
    })
  ]
  ...
};

LICENSE

MIT

About

A simple webpack plugin to support dotenv.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%