Rollup Plugin Variables
Rollup plugin for parse variables
Install
npm install rollup-plugin-variables
or
yarn add rollup-plugin-variables
Usage
env.js
module { return URL: 'http://www.example.com' ;};
rollup.config.js
; plugins: ;
How will the result be?
before in Link.jsx
import React from 'react'; const LinkComponent = <a ="[[URL]]">Link</a>; ;
after in Link.jsx
import React from 'react'; const LinkComponent = <a ="http://www.example.com">Link</a>; ;
Options
fileName
Type String|Function
Default: env.js
rollup.config.js
String
plugins: ;
Function
plugins: ;
format
Type String<js,json,txt>|Function<js,json,env>
Default: js
rollup.config.js
String
plugins: ;
Function
plugins: ;
marker
Type String|Function|Array
Default: [[]]
rollup.config.js
String
plugins: ;
Function
plugins: ;
NPM Statistics
Download stats for this NPM package
License
Rollup Plugin Variables is open source software licensed as MIT.