-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
rollup.config.dist.js
55 lines (54 loc) · 1.08 KB
/
rollup.config.dist.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
46
47
48
49
50
51
52
53
54
55
import babel from '@rollup/plugin-babel';
import terser from '@rollup/plugin-terser';
/**
* @type {import('rollup').RollupOptions}
*/
export default {
input: 'src/index.js',
output: [
{
file: 'dist/js-qrcode-es6.js',
format: 'es',
sourcemap: false,
},
{
file: 'dist/js-qrcode-amd.js',
format: 'amd',
sourcemap: false,
},
{
file: 'dist/js-qrcode-iife.js',
format: 'iife',
sourcemap: false,
name: 'jsqrcode',
},
{
file: 'dist/js-qrcode-node.cjs',
format: 'cjs',
sourcemap: false,
},
],
plugins: [
babel({
babelHelpers: 'bundled',
configFile: './babel.config.json',
}),
terser({
format: {
comments: false,
keep_quoted_props: true,
// max_line_len: 130,
quote_style: 1,
preamble:
'/*\n'
+ ' * js-qrcode - a javascript port of chillerlan/php-qrcode\n'
+ ' *\n'
+ ' * @copyright 2022 smiley\n'
+ ' * @license MIT\n'
+ ' * @link https://github.com/chillerlan/js-qrcode\n'
+ ' * @link https://github.com/chillerlan/php-qrcode\n'
+ ' */',
},
}),
],
};