UNPKG

602 BJavaScriptView Raw
1import resolve from 'rollup-plugin-node-resolve';
2
3const dist = 'dist';
4const getOutputFileByFormatType = type => `${dist}/melting-pot.${type}.js`;
5
6export 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', // same as 'es' (shorthand)
17 },
18 {
19 name: 'MeltingPot',
20 file: getOutputFileByFormatType('umd'),
21 format: 'umd',
22 globals: {
23 react: 'React',
24 },
25 },
26 ],
27 plugins: [resolve()],
28};