Skip to content

Commit 9748b53

Browse files
fix: restoring umd format
1 parent 48f3a26 commit 9748b53

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

rollup.config.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// tslint:disable
2+
import { camelCase } from 'lodash';
23
import commonjs from 'rollup-plugin-commonjs';
34
import json from '@rollup/plugin-json';
45
import resolve from '@rollup/plugin-node-resolve';
@@ -11,7 +12,20 @@ const libraryName = 'hyperdash';
1112

1213
export default {
1314
input: `src/${libraryName}.ts`,
14-
output: [{ file: pkg.module, format: 'es', sourcemap: true }],
15+
output: [
16+
{
17+
file: pkg.main,
18+
name: camelCase(libraryName),
19+
format: 'umd',
20+
sourcemap: true,
21+
globals: {
22+
'lodash-es': '_',
23+
rxjs: 'rxjs',
24+
'rxjs/operators': 'rxjs.operators'
25+
}
26+
},
27+
{ file: pkg.module, format: 'es', sourcemap: true }
28+
],
1529
// Indicate here external modules you don't wanna include in your bundle (i.e.: 'lodash')
1630
external: ['lodash-es', 'rxjs', 'rxjs/operators', 'core-js/es7/reflect'],
1731
watch: {

0 commit comments

Comments
 (0)