forked from jquense/yup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
44 lines (42 loc) · 857 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
36
37
38
39
40
41
42
43
44
const nodeResolve = require('rollup-plugin-node-resolve');
const babel = require('rollup-plugin-babel');
const filesize = require('rollup-plugin-filesize');
const base = {
input: './src/index.js',
plugins: [
nodeResolve(),
babel({
babelrc: false,
presets: [['jason', { modules: false, runtime: false }]],
}),
],
external: [
'lodash/has',
'lodash/cloneDeepWith',
'lodash/toArray',
'lodash/mapKeys',
'lodash/mapValues',
'lodash/snakeCase',
'lodash/camelCase',
'toposort',
'fn-name',
'synchronous-promise',
'property-expr',
],
};
module.exports = [
{
...base,
output: [
{
file: 'dist/yup.js',
format: 'cjs',
},
{
file: 'dist/yup.esm.js',
format: 'es',
},
],
plugins: [...base.plugins, filesize()],
},
];