-
Notifications
You must be signed in to change notification settings - Fork 87
/
rollup.config.js
47 lines (45 loc) · 1.13 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
// import uglify from "rollup-plugin-uglify-es";
import cleaner from 'rollup-plugin-cleaner'
import resolve from 'rollup-plugin-node-resolve'
import typescript from 'rollup-plugin-typescript2'
export default [
// iife bundle
{
input: 'src/index.ts',
output: { file: 'dist/etro-iife.js', format: 'iife', name: 'etro' },
plugins: [
cleaner({
targets: ['dist']
}),
typescript(),
resolve()
]
},
{
input: 'src/index.ts',
output: { file: 'dist/etro-cjs.js', format: 'cjs' },
plugins: [
typescript(),
resolve()
]
}
// // es6 module bundle
// {
// input: "src/index.js",
// output: { file: "dist/etro-esm.js", format: "esm", name: "etro" }
// },
/* ERRORS FOR SOME REASON
// iife bundle (minified)
{
input: 'src/index.js',
output: { file: 'dist/etro-iife.min.js', format: 'iife', name: 'mv' },
plugins: [ uglify() ]
},
// es6 module bundle (minified)
{
input: 'src/index.js',
output: { file: 'dist/etro-esm.min.js', format: 'esm', name: 'mv' },
plugins: [ uglify() ]
}
*/
]