envy-loader
v0.2.0
Published
dotenv style environment variable file loader module for webpack
Downloads
11
Maintainers
Readme
envy-loader
dotenv style environment variable file loader module for webpack
Install
npm install --save-dev envy-loader
Usage
Same as with most other webpack loaders:
Configuration (recommended)
/* webpack.config.js */
module.exports = {
module: {
rules: [
{
test: /\.env$/,
use: 'envy-loader'
}
]
}
}
import env from 'development.env';
CLI
webpack --module-bind 'env=envy-loader'
Inline
import env from 'envy-loader!production.env';