1 | import _ from 'lodash';
|
2 | import replace from 'rollup-plugin-replace';
|
3 | import { browser } from './shared-configs';
|
4 |
|
5 | const envify = () =>
|
6 | replace(
|
7 | _(process.env)
|
8 | .mapKeys((value, key) => `process.env.${key}`)
|
9 | .mapValues(JSON.stringify)
|
10 | .value()
|
11 | );
|
12 |
|
13 | export 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 | });
|