-
-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathrollup.config.js
More file actions
27 lines (26 loc) · 655 Bytes
/
rollup.config.js
File metadata and controls
27 lines (26 loc) · 655 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import typescript2 from 'rollup-plugin-typescript2';
import { terser } from 'rollup-plugin-terser';
import json from 'rollup-plugin-json';
export default [
// browser-friendly UMD build
{
input: 'src/index.browser.ts',
external: ['react'],
output: {
name: 'htmr',
file: 'lib/htmr.browser.js',
format: 'umd',
globals: {
react: 'React',
},
},
plugins: [typescript2(), terser(), json()],
},
// commonJS
{
input: 'src/index.ts',
external: ['htmlparser2', 'react', 'html-entities'],
output: [{ file: 'lib/htmr.js', format: 'cjs' }],
plugins: [typescript2(), json()],
},
];