JSPM

  • Created
  • Published
  • Downloads 977357
  • Score
    100M100P100Q180515F
  • License MIT

A simple webpack plugin to support dotenv.

Package Exports

  • dotenv-webpack

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (dotenv-webpack) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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