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
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