1.0.1 • Published 3 years ago

dotenv-webpack-plugin v1.0.1

Weekly downloads
10
License
MIT
Repository
github
Last release
3 years ago

Dotenv for Webpack HTML Plugin

通过 dotenv 将环境变量挂在到浏览器 window 对象上。

Installation

$ npm install -D dotenv-webpack-plugin

Configuration

const HtmlWebpackPlugin = require('html-webpack-plugin')
const DotenvWebpackPlugin = require('dotenv-webpack-plugin')

module.exports = {
  ...
  plugins: [
    new HtmlWebpackPlugin(),
    new DotenvWebpackPlugin(),
  ],
  ...
}

Options

NameTypeDefaultDescription
dotenvobjectundefinedDotenv configuration options
propertystring'env'Property name of environment object on window
1.0.1

3 years ago

1.0.0

3 years ago

0.3.0

3 years ago

0.2.0

4 years ago

0.1.0

4 years ago