0.0.2 • Published 6 years ago

webpack-env-plugin v0.0.2

Weekly downloads
4
License
ISC
Repository
github
Last release
6 years ago

WebpackEnvPlugin

emit a env.json by own env variables

install

yarn add webpack-env-plugin
# or
npm install webpack-env-plugin

use

const EnvPlugin = require('webpack-env-plugin')
// webpack.config.js
{
  plugins:[
    new EnvPlugin({
      filename:'env.json', // default env.json
      env:{
        a:1,
        b:2
      },
      verbose:true // default:true
    })
  ]
}

it will produce a env.json in your dist folder env.json

{
  "a": 1,
  "b": 2
}
0.0.2

6 years ago

0.0.1

6 years ago