-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
63 lines (56 loc) · 1.14 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
* @Description: rollup配置文件
* @Author: yangrongxin
* @Date: 2022-03-14 16:27:28
* @LastEditors: yangrongxin
* @LastEditTime: 2022-03-14 17:22:09
*/
import resolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'
import babel from 'rollup-plugin-babel'
import typescript from 'rollup-plugin-typescript2'
import {
uglify
} from 'rollup-plugin-uglify'
export default {
input: './index.ts',
// external,
// plugins,
// // 额外选项
// onwarn,
// // danger zone
// acorn,
// context,
// moduleContext,
// legacy
output: { // 必须 (如果要输出多个,可以是一个数组)
// 核心选项
file: './dist/index.js', // 必须
format: 'cjs', // 必须
// name,
// globals,
// 额外选项
// paths,
// banner,
// footer,
// intro,
// outro,
sourcemap: true
// sourcemapFile,
// interop,
// // 高危选项
// exports,
// amd,
// indent
// strict
},
plugins: [
resolve(),
commonjs(),
babel({
exclude: 'node_modules/**' // 只编译我们的源代码
}),
typescript(),
uglify()
]
}