forked from eKoopmans/html2pdf.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
45 lines (44 loc) · 897 Bytes
/
rollup.config.js
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Import dependencies.
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import pkg from './package.json';
export default [
// Bundled builds.
{
name: 'html2pdf',
input: 'src/index.js',
output: [
{ file: pkg.browser.replace(/js$/, 'bundle.js'), format: 'umd' }
],
globals: {
jspdf: 'jsPDF',
html2canvas: 'html2canvas'
},
plugins: [
resolve(),
commonjs()
]
},
// Un-bundled builds.
{
name: 'html2pdf',
input: 'src/index.js',
output: [
{ file: pkg.main, format: 'cjs' },
{ file: pkg.module, format: 'es' },
{ file: pkg.browser, format: 'umd' }
],
external: [
'jspdf',
'html2canvas'
],
globals: {
jspdf: 'jsPDF',
html2canvas: 'html2canvas'
},
plugins: [
resolve(),
commonjs()
]
}
];