forked from Javey/misstime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
35 lines (32 loc) · 855 Bytes
/
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
const babel = require('rollup-plugin-babel');
const replace = require('rollup-plugin-replace');
const config = {
entry: 'src/index.js',
plugins: [
babel({
exclude: 'node_modules/**',
presets: [
['es2015', {"modules": false, "loose": true}]
],
plugins: [
"external-helpers",
"minify-constant-folding",
"transform-es3-property-literals",
"transform-es3-member-expression-literals",
],
babelrc: false
})
]
};
module.exports = [
Object.assign({}, config, {
dest: 'dist/misstime.js',
format: 'umd',
moduleName: 'misstime',
legacy: true,
}),
Object.assign({}, config, {
dest: 'dist/index.js',
format: 'cjs'
}),
];