rollup-plugin-config
Rollup plugin designed mainly for use with node-config (though you can pass any object you want).
Installation
Install the package:
- npm
npm install --save-dev rollup-plugin-config
- yarn
yarn add --dev rollup-plugin-config
Usage
Pass any object with a single root node to the plugin (it can be named anything you want).
const configObject = one: 1 two: 2 three: four: 'four' ;
Use that node name as a global variable in your script.
console
It'll get replaced with an actual value from the object you provided.
console