Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 1.09 KB

README.md

File metadata and controls

48 lines (31 loc) · 1.09 KB

@constgen/neutrino-env

npm npm

Neutrino middleware that exposes an access to all environment variables (process.env) during the build time

Requirements

  • Node.js v10+
  • Neutrino v9
  • Webpack v4

Installation

@constgen/neutrino-env can be installed from NPM. You should install it to "dependencies" (--save) or "devDependncies" (--save-dev) depending on your goal.

npm install --save @constgen/neutrino-env

Usage

In preset

Require this package and plug it into Neutrino. The middleware has no options:

let env = require('@constgen/neutrino-env')

neutrino.use(env())

In neutrinorc

The middleware also may be used together with another presets in Neutrino rc-file, e.g.:

.neutrinorc.js

let env = require('@constgen/neutrino-env')

module.exports = {
   use: [
      env()
   ]
}