envy-loader

0.2.0 • Public • Published

npm node deps

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';

Package Sidebar

Install

npm i envy-loader

Weekly Downloads

5

Version

0.2.0

License

ISC

Last publish

Collaborators

  • json2d