1 | import resolve from 'rollup-plugin-node-resolve';
|
2 |
|
3 | const dist = 'dist';
|
4 | const getOutputFileByFormatType = type => `${dist}/melting-pot.${type}.js`;
|
5 |
|
6 | export default {
|
7 | input: 'src/index.js',
|
8 | external: ['react'],
|
9 | output: [
|
10 | {
|
11 | file: getOutputFileByFormatType('cjs'),
|
12 | format: 'cjs',
|
13 | },
|
14 | {
|
15 | file: getOutputFileByFormatType('esm'),
|
16 | format: 'esm',
|
17 | },
|
18 | {
|
19 | name: 'MeltingPot',
|
20 | file: getOutputFileByFormatType('umd'),
|
21 | format: 'umd',
|
22 | globals: {
|
23 | react: 'React',
|
24 | },
|
25 | },
|
26 | ],
|
27 | plugins: [resolve()],
|
28 | };
|