-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrollup.conf.js
45 lines (43 loc) · 865 Bytes
/
rollup.conf.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 babel from 'rollup-plugin-babel'
import { terser } from 'rollup-plugin-terser'
process.env.BABEL_ENV = 'es5'
export default [
{
input: 'src/index.js',
output: [
{
file: './dist/index.es.js',
format: 'es'
}, {
file: './dist/index.js',
format: 'cjs',
exports: 'named',
footer: 'module.exports = exports.default;'
}],
plugins: [
babel({
exclude: 'node_modules/**'
})
]
},
{
input: 'src/index.js',
output: [
{
file: './dist/index.es.min.js',
format: 'es'
}, {
file: './dist/index.min.js',
format: 'cjs',
exports: 'named',
footer: 'module.exports = exports.default;'
}
],
plugins: [
babel({
exclude: 'node_modules/**'
}),
terser({})
]
}
]