Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/json2d/envy-loader
dotenv style environment variable file loader module for webpack
https://github.com/json2d/envy-loader
Last synced: 27 days ago
JSON representation
dotenv style environment variable file loader module for webpack
- Host: GitHub
- URL: https://github.com/json2d/envy-loader
- Owner: json2d
- Created: 2017-06-20T02:49:33.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-20T04:33:34.000Z (over 7 years ago)
- Last Synced: 2024-04-24T13:44:28.804Z (9 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![npm][npm]][npm-url]
[![node][node]][node-url]
[![deps][deps]][deps-url]# envy-loader
dotenv style environment variable file loader module for webpack
## Install
```bash
npm install --save-dev envy-loader
```## Usage
Same as with most other webpack loaders:### Configuration (recommended)
```js
/* webpack.config.js */module.exports = {
module: {
rules: [
{
test: /\.env$/,
use: 'envy-loader'
}
]
}
}
``````js
import env from 'development.env';
```### CLI
```bash
webpack --module-bind 'env=envy-loader'
```### Inline
```js
import env from 'envy-loader!production.env';
```[npm]: https://img.shields.io/npm/v/envy-loader.svg
[npm-url]: https://npmjs.com/package/envy-loader[node]: https://img.shields.io/node/v/envy-loader.svg
[node-url]: https://nodejs.org[deps]: https://david-dm.org/bitstrider/envy-loader.svg
[deps-url]: https://david-dm.org/bitstrider/envy-loader