webpack-env-plugin
v0.0.2
Published
emit a `env.json` in dist folder then you can use this after
Downloads
19
Readme
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
}