webpack-env-plugin

0.0.2 • Public • Published

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
}
 

Readme

Keywords

Package Sidebar

Install

npm i webpack-env-plugin

Weekly Downloads

1

Version

0.0.2

License

ISC

Last publish

Collaborators

  • flynnlee123