-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.dist.js
More file actions
43 lines (42 loc) · 849 Bytes
/
rollup.config.dist.js
File metadata and controls
43 lines (42 loc) · 849 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import babel from '@rollup/plugin-babel';
import json from '@rollup/plugin-json';
import terser from '@rollup/plugin-terser';
/**
* @type {import('rollup').RollupOptions}
*/
export default {
input : 'src/index.js',
output : [
{
file : 'dist/dist-es6.js',
format : 'es',
sourcemap: false,
},
{
file : 'dist/dist-node.cjs',
format : 'cjs',
sourcemap: false,
},
],
plugins: [
babel({
babelHelpers: 'bundled',
configFile : './babel.config.json',
}),
json(),
terser({
format: {
comments : false,
keep_quoted_props: true,
// max_line_len: 130,
quote_style: 1,
preamble :
'/*\n'
+ ' * @copyright 2024 smiley\n'
+ ' * @license MIT\n'
+ ' * @link https://github.com/chillerlan/js-library-template\n'
+ ' */',
},
}),
],
};