UNPKG

478 BJavaScriptView Raw
1import _ from 'lodash';
2import replace from 'rollup-plugin-replace';
3import { browser } from './shared-configs';
4
5const envify = () =>
6 replace(
7 _(process.env)
8 .mapKeys((value, key) => `process.env.${key}`)
9 .mapValues(JSON.stringify)
10 .value()
11 );
12
13export default Object.assign({}, browser, {
14 input: 'test/index.js',
15 output: Object.assign({}, browser.output, {
16 file: 'test/browser/index.js',
17 }),
18 plugins: browser.plugins.concat(envify()),
19});